src/main/java/org/jboss/util/NestedThrowable.java
/**
       * Check and possibly warn if the nested exception type is the same
       * as the parent type (duplicate nesting).
       */
Check and possibly warn if the nested exception type is the same
as the parent type (duplicate nesting).
Check and possibly warn if the nested exception type is the same as the parent type ( duplicate nesting ) .
public static void checkNested(final NestedThrowable parent,
                                     final Throwable child)
      {
         if (!DETECT_DUPLICATE_NESTING || parent == null || child == null) return;
         Class<?> parentType = parent.getClass();
         Class<?> childType = child.getClass();
          This might be backwards... I always get this confused
         if (parentType.isAssignableFrom(childType)) {
             HACK see getLogger() for details
            Logger log = getLogger();
            log.warn("Duplicate throwable nesting of same base type: " +
                     parentType + " is assignable from: " + childType);
         }
      }
public static void checkNested ( final NestedThrowable parent , final Throwable child ) { if ( ! DETECT_DUPLICATE_NESTING || parent == null || child == null ) return ; Class < ? > parentType = parent . getClass ( ) ; Class < ? > childType = child . getClass ( ) ; if ( parentType . isAssignableFrom ( childType ) ) { Logger log = getLogger ( ) ; log . warn ( "Duplicate throwable nesting of same base type: " + parentType + " is assignable from: " + childType ) ; } }
Check and possibly warn if the nested exception type is the same
 as the parent type (duplicate nesting).
Check and possibly warn if the nested exception type is the same as the parent type ( duplicate nesting ) .
// // This might be backwards... I always get this confused // // HACK see getLogger() for details