tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r763190 - /tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
Date Wed, 08 Apr 2009 11:25:46 GMT
Author: markt
Date: Wed Apr  8 11:25:45 2009
New Revision: 763190

URL: http://svn.apache.org/viewvc?rev=763190&view=rev
Log:
Fix unlikely NPE

Modified:
    tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=763190&r1=763189&r2=763190&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java Wed Apr  8 11:25:45
2009
@@ -834,10 +834,10 @@
         Container[] contexts = host.findChildren();
         for (int i = 0; i < contexts.length; i++) {
             Context context = (Context) contexts[i];
-            String displayPath = context.getPath();
-            if( displayPath.equals("") )
-                displayPath = "/";
             if (context != null ) {
+                String displayPath = context.getPath();
+                if( displayPath.equals("") )
+                    displayPath = "/";
                 if (context.getAvailable()) {
                     writer.println(sm.getString("managerServlet.listitem",
                                                 displayPath,



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message