View | Details | Raw Unified | Return to bug 37458
Collapse All | Expand All

(-)org/apache/catalina/loader/WebappClassLoader.java (-20 / +19 lines)
Lines 1793-1799 Link Here
1793
            return clazz;
1793
            return clazz;
1794
1794
1795
        synchronized (this) {
1795
        synchronized (this) {
1796
            if (entry.binaryContent == null && entry.loadedClass == null)
1796
            clazz = entry.loadedClass;
1797
            if (clazz != null)
1798
                return clazz;
1799
1800
            if (entry.binaryContent == null)
1797
                throw new ClassNotFoundException(name);
1801
                throw new ClassNotFoundException(name);
1798
1802
1799
            // Looking up the package
1803
            // Looking up the package
Lines 1842-1867 Link Here
1842
    
1846
    
1843
            }
1847
            }
1844
1848
1845
            if (entry.loadedClass == null) {
1849
            try {
1846
                try {
1850
                clazz = defineClass(name, entry.binaryContent, 0,
1847
                    clazz = defineClass(name, entry.binaryContent, 0,
1851
                        entry.binaryContent.length, 
1848
                            entry.binaryContent.length, 
1852
                        new CodeSource(entry.codeBase, entry.certificates));
1849
                            new CodeSource(entry.codeBase, entry.certificates));
1853
            } catch (UnsupportedClassVersionError ucve) {
1850
                } catch (UnsupportedClassVersionError ucve) {
1854
                throw new UnsupportedClassVersionError(
1851
                    throw new UnsupportedClassVersionError(
1855
                        ucve.getLocalizedMessage() + " " +
1852
                            ucve.getLocalizedMessage() + " " +
1856
                        sm.getString("webappClassLoader.wrongVersion", name));
1853
                            sm.getString("webappClassLoader.wrongVersion",
1854
                                    name));
1855
                }
1856
                entry.loadedClass = clazz;
1857
                entry.binaryContent = null;
1858
                entry.source = null;
1859
                entry.codeBase = null;
1860
                entry.manifest = null;
1861
                entry.certificates = null;
1862
            } else {
1863
                clazz = entry.loadedClass;
1864
            }
1857
            }
1858
            entry.loadedClass = clazz;
1859
            entry.binaryContent = null;
1860
            entry.source = null;
1861
            entry.codeBase = null;
1862
            entry.manifest = null;
1863
            entry.certificates = null;
1865
        }
1864
        }
1866
        
1865
        
1867
        return clazz;
1866
        return clazz;

Return to bug 37458