public NonDelayedClassInfo resolveClassInfo(String name) {
        NonDelayedClassInfo cachedClassInfo = basicGetClassInfo(name);
        if (cachedClassInfo != null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] ENTER / RETURN [ {1} ] - cached",
                                                  new Object[] { getHashText(), cachedClassInfo.getHashText() }));
            }
            return cachedClassInfo;
        }

        String useHashText = (tc.isDebugEnabled() ? getHashText() : null);

        NonDelayedClassInfo javaClassInfo = basicGetJavaClassInfo(name);

        if (javaClassInfo != null) {
            if (useHashText != null) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN [ {1} ] java class",
                                                  new Object[] { useHashText, javaClassInfo.getHashText() }));
            }
            return javaClassInfo;
        }

        NonDelayedClassInfo annotatedClassInfo = basicGetAnnotatedClassInfo(name);

        if (annotatedClassInfo != null) {
            if (useHashText != null) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN [ {1} ] annotated class",
                                                  new Object[] { useHashText, annotatedClassInfo.getHashText() }));
            }
            return annotatedClassInfo;
        }

        if (useHashText != null) {
            Tr.debug(tc, MessageFormat.format("ENTRY [ {0} ] Class [ {1} ] ",
                                              new Object[] { useHashText, name }));
        }

        try {
            scanClass(name); // This has side effects on the ClassInfoCache!
            // throws InfoStoreException

        } catch (InfoStoreException e) {
            Tr.warning(tc, "ANNO_CLASSINFO_SCAN_EXCEPTION", getHashText(), name, e.getMessage(),
                       e.getCause() == null ? e.getMessage() : e.getCause().getMessage()); // CWWKC0022W

            if (useHashText != null) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN [ null ]; class scan failed with an exception",
                                                  new Object[] { useHashText, name }));
            }
            return null;
        }

        cachedClassInfo = basicGetClassInfo(name);

        if (cachedClassInfo != null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] ENTER / RETURN [ {1} ] - newly cached",
                                                  new Object[] { getHashText(), cachedClassInfo.getHashText() }));
            }
            return cachedClassInfo;
        }

        javaClassInfo = basicGetJavaClassInfo(name);

        if (javaClassInfo != null) {
            if (useHashText != null) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN [ {1} ] newly added java class",
                                                  new Object[] { useHashText, javaClassInfo.getHashText() }));
            }
            return javaClassInfo;
        }

        annotatedClassInfo = basicGetAnnotatedClassInfo(name);

        if (annotatedClassInfo != null) {
            if (useHashText != null) {
                Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN [ {1} ] new added annotated class",
                                                  new Object[] { useHashText, annotatedClassInfo.getHashText() }));
            }
            return annotatedClassInfo;
        }

        // START: TFB: Defect 59284: Don't throw an exception for a failed load.

        // A warning is logged by DelayedClassInfo.getClassInfo.
        //
        // scanLogger.logp(Level.WARNING, CLASS_NAME, methodName,
        //                 "[ {0} ] Internal error resolving [ {1} ]",
        //                 new Object[] { getHashText(), name });

        if (useHashText != null) {
            Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN [ null ] for class which was not found",
                                              new Object[] { useHashText, name }));
        }
        return null;

        // String eMsg = "[ " + getHashText() + " ] Internal error resolving [ " + name + " ]";
        // RuntimeException e = new RuntimeException(eMsg);
        //
        // scanLogger.log(Level.WARNING, eMsg, e);
        // throw e;

        // END: TFB: Defect 59284
    }
public NonDelayedClassInfo resolveClassInfo ( String name ) { NonDelayedClassInfo cachedClassInfo = basicGetClassInfo ( name ) ; if ( cachedClassInfo != null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] ENTER / RETURN [ {1} ] - cached" , new Object [ ] { getHashText ( ) , cachedClassInfo . getHashText ( ) } ) ) ; } return cachedClassInfo ; } String useHashText = ( tc . isDebugEnabled ( ) ? getHashText ( ) : null ) ; NonDelayedClassInfo javaClassInfo = basicGetJavaClassInfo ( name ) ; if ( javaClassInfo != null ) { if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] RETURN [ {1} ] java class" , new Object [ ] { useHashText , javaClassInfo . getHashText ( ) } ) ) ; } return javaClassInfo ; } NonDelayedClassInfo annotatedClassInfo = basicGetAnnotatedClassInfo ( name ) ; if ( annotatedClassInfo != null ) { if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] RETURN [ {1} ] annotated class" , new Object [ ] { useHashText , annotatedClassInfo . getHashText ( ) } ) ) ; } return annotatedClassInfo ; } if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "ENTRY [ {0} ] Class [ {1} ] " , new Object [ ] { useHashText , name } ) ) ; } try { scanClass ( name ) ; } catch ( InfoStoreException e ) { Tr . warning ( tc , "ANNO_CLASSINFO_SCAN_EXCEPTION" , getHashText ( ) , name , e . getMessage ( ) , e . getCause ( ) == null ? e . getMessage ( ) : e . getCause ( ) . getMessage ( ) ) ; if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] RETURN [ null ]; class scan failed with an exception" , new Object [ ] { useHashText , name } ) ) ; } return null ; } cachedClassInfo = basicGetClassInfo ( name ) ; if ( cachedClassInfo != null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] ENTER / RETURN [ {1} ] - newly cached" , new Object [ ] { getHashText ( ) , cachedClassInfo . getHashText ( ) } ) ) ; } return cachedClassInfo ; } javaClassInfo = basicGetJavaClassInfo ( name ) ; if ( javaClassInfo != null ) { if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] RETURN [ {1} ] newly added java class" , new Object [ ] { useHashText , javaClassInfo . getHashText ( ) } ) ) ; } return javaClassInfo ; } annotatedClassInfo = basicGetAnnotatedClassInfo ( name ) ; if ( annotatedClassInfo != null ) { if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] RETURN [ {1} ] new added annotated class" , new Object [ ] { useHashText , annotatedClassInfo . getHashText ( ) } ) ) ; } return annotatedClassInfo ; } if ( useHashText != null ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] RETURN [ null ] for class which was not found" , new Object [ ] { useHashText , name } ) ) ; } return null ; }
TFB: END: Defect 59284 Notes