User: jules_gosnell Date: 02/03/15 17:16:38 Modified: jetty/src/main/org/jboss/jetty JBossWebApplicationContext.java Log: fix NPE Revision Changes Path 1.33 +27 -24 contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java Index: JBossWebApplicationContext.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- JBossWebApplicationContext.java 11 Mar 2002 05:28:58 -0000 1.32 +++ JBossWebApplicationContext.java 16 Mar 2002 01:16:38 -0000 1.33 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: JBossWebApplicationContext.java,v 1.32 2002/03/11 05:28:58 janb Exp $ +// $Id: JBossWebApplicationContext.java,v 1.33 2002/03/16 01:16:38 jules_gosnell Exp $ // A Jetty HttpServer with the interface expected by JBoss' // J2EEDeployer... @@ -154,14 +154,14 @@ protected void initClassLoader(boolean forceContextLoader) throws java.net.MalformedURLException, IOException - { - // force the creation of a context class loader for JBoss - // web apps - super.initClassLoader(true); - - ClassLoader _loader=getClassLoader(); - if (_loader instanceof org.mortbay.http.ContextLoader) - ((org.mortbay.http.ContextLoader)_loader).setJava2Compliant(_jetty.getJava2ClassLoadingCompliance()); + { + // force the creation of a context class loader for JBoss + // web apps + super.initClassLoader(true); + + ClassLoader _loader=getClassLoader(); + if (_loader instanceof org.mortbay.http.ContextLoader) + ((org.mortbay.http.ContextLoader)_loader).setJava2Compliant(_jetty.getJava2ClassLoadingCompliance()); } String _separator=System.getProperty("path.separator"); @@ -169,27 +169,30 @@ public String getFileClassPath() { - String[] entries=_jetty.getCompileClasspath(getClassLoader()); + String[] entries=_jetty.getCompileClasspath(getClassLoader()); - // temporary fix until - // AbstractWebContainer.getCompileClasspath () returns non-URL - // entries - // NOTE: this fix won't work for the njar URLs + // temporary fix until + // AbstractWebContainer.getCompileClasspath () returns non-URL + // entries + // NOTE: this fix won't work for the njar URLs String classpath=""; for (int i=0; i<entries.length; i++) { - try - { - Resource res = Resource.newResource (entries[i]); - classpath+=(classpath.length()==0?"":_separator)+res.getFile().getCanonicalPath(); - } - catch (IOException ioe) - { - _log.warn ("JSP Classpath is damaged, can't convert path for :"+entries[i], ioe); - } + try + { + Resource res = Resource.newResource (entries[i]); + if (res.getFile()==null) + _log.warn("bad classpath entry: "+entries[i]); + else + classpath+=(classpath.length()==0?"":_separator)+res.getFile().getCanonicalPath(); + } + catch (IOException ioe) + { + _log.warn ("JSP Classpath is damaged, can't convert path for :"+entries[i], ioe); + } } - + if (_log.isDebugEnabled()) _log.debug("JSP classpath: "+classpath);
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development