tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1509143 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/ha/deploy/FileMessageFactory.java webapps/docs/changelog.xml
Date Thu, 01 Aug 2013 09:25:12 GMT
Author: kfujino
Date: Thu Aug  1 09:25:12 2013
New Revision: 1509143

URL: http://svn.apache.org/r1509143
Log:
Fix NPE in FileMessageFactory.main when specify empty file as arguments.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/deploy/FileMessageFactory.java?rev=1509143&r1=1509142&r2=1509143&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/deploy/FileMessageFactory.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/deploy/FileMessageFactory.java Thu Aug
 1 09:25:12 2013
@@ -376,6 +376,10 @@ public class FileMessageFactory {
         FileMessageFactory write = getInstance(new File(args[1]), true);
         FileMessage msg = new FileMessage(null, args[0], args[0]);
         msg = read.readMessage(msg);
+        if (msg == null) {
+            System.out.println("Empty input file : " + args[0]);
+            return;
+        }
         System.out.println("Expecting to write " + msg.getTotalNrOfMsgs()
                 + " messages.");
         int cnt = 0;

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1509143&r1=1509142&r2=1509143&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Aug  1 09:25:12 2013
@@ -193,6 +193,10 @@
         <bug>55301</bug>: Fix <code>IllegalArgumentException</code>
thrown by
         simple test for McastService. (kfujino)
       </fix>
+      <fix>
+        <bug>55332</bug>: Fix NPE in <code>FileMessageFactory.main</code>
when
+        specify empty file as arguments. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">



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


Mime
View raw message