public synchronized TagLibraryInfoImpl getTagLibraryInfo(String uri, String prefix, String jspUri) {
        int type = uriType(uri);
        TagLibraryInfoImpl tli = null;
        if (containsKey(uri)) {
            Object o = get(uri);
            if (o instanceof TagLibraryInfoImpl) {
                TagLibraryInfoImpl impl = (TagLibraryInfoImpl)o;
                tli = impl.copy(prefix);
            }
            else if (o instanceof TagLibraryInfoProxy) {
                TagLibraryInfoProxy proxy = (TagLibraryInfoProxy)o;
                tli = proxy.getTagLibraryInfoImpl(prefix);
                if(tli != null){    // defect 220310: ensure tli is not null.
                    put(uri, tli);
                }
            }
        }
        else {
            if (type == ROOT_REL_URI || type == NOROOT_REL_URI) {
                if (uri.endsWith(".jar")) {
                    TagLibraryInfoImpl impl = loadTaglibTldFromJar(uri);
                    if (impl != null) {
                        impl.setURI(uri);
                        put(uri, impl);
                        tli = impl.copy(prefix);
                    }
                }
                else {
                    try {
                        TagLibraryInfoImpl impl = null;
                        String path = uri;
                        if (type == NOROOT_REL_URI) {
                            path = jspUri.substring(0, jspUri.lastIndexOf("/") + 1);
                            path = path + uri;
                        }
                        JspInputSource tldInputSource = getInputSource(container, path, null, null);
                        impl = tldParser.parseTLD(tldInputSource, "webinf");
                        if (impl != null) {
                            impl.setURI(uri);
                            put(uri, impl);
                            tli = impl.copy(prefix);
                        }
                    }
                    catch (JspCoreException e) {
                       if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable(Level.WARNING)){
                            logger.logp(Level.WARNING, CLASS_NAME, "getTagLibraryInfo", "jsp error failed to parse tld in WEB-INF. uri = ["+uri+"]", e);
                       }
                    }
                }
            }
        }
        return (tli);
    }
public synchronized TagLibraryInfoImpl getTagLibraryInfo ( String uri , String prefix , String jspUri ) { int type = uriType ( uri ) ; TagLibraryInfoImpl tli = null ; if ( containsKey ( uri ) ) { Object o = get ( uri ) ; if ( o instanceof TagLibraryInfoImpl ) { TagLibraryInfoImpl impl = ( TagLibraryInfoImpl ) o ; tli = impl . copy ( prefix ) ; } else if ( o instanceof TagLibraryInfoProxy ) { TagLibraryInfoProxy proxy = ( TagLibraryInfoProxy ) o ; tli = proxy . getTagLibraryInfoImpl ( prefix ) ; if ( tli != null ) { put ( uri , tli ) ; } } } else { if ( type == ROOT_REL_URI || type == NOROOT_REL_URI ) { if ( uri . endsWith ( ".jar" ) ) { TagLibraryInfoImpl impl = loadTaglibTldFromJar ( uri ) ; if ( impl != null ) { impl . setURI ( uri ) ; put ( uri , impl ) ; tli = impl . copy ( prefix ) ; } } else { try { TagLibraryInfoImpl impl = null ; String path = uri ; if ( type == NOROOT_REL_URI ) { path = jspUri . substring ( 0 , jspUri . lastIndexOf ( "/" ) + 1 ) ; path = path + uri ; } JspInputSource tldInputSource = getInputSource ( container , path , null , null ) ; impl = tldParser . parseTLD ( tldInputSource , "webinf" ) ; if ( impl != null ) { impl . setURI ( uri ) ; put ( uri , impl ) ; tli = impl . copy ( prefix ) ; } } catch ( JspCoreException e ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . WARNING ) ) { logger . logp ( Level . WARNING , CLASS_NAME , "getTagLibraryInfo" , "jsp error failed to parse tld in WEB-INF. uri = [" + uri + "]" , e ) ; } } } } } return ( tli ) ; }
PK68590 end