[brailleblaster] push by john.bo...@xxxxxxxxxxxxxxxxx - defensive prograsmming: guarding against null pointer in doNoepage in ... on 2012-05-06 12:24 GMT

  • From: brailleblaster@xxxxxxxxxxxxxx
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Sun, 06 May 2012 12:24:26 +0000

Revision: bf09448b5934
Author:   John Boyer <john.boyer@xxxxxxxxxxxxxxxxx>
Date:     Sun May  6 05:23:28 2012
Log: defensive prograsmming: guarding against null pointer in doNoepage in UTD
http://code.google.com/p/brailleblaster/source/detail?r=bf09448b5934

Modified:
 /src/main/org/brailleblaster/wordprocessor/UTD.java

=======================================
--- /src/main/org/brailleblaster/wordprocessor/UTD.java Sun May 6 04:39:16 2012 +++ /src/main/org/brailleblaster/wordprocessor/UTD.java Sun May 6 05:23:28 2012
@@ -333,7 +333,10 @@
     }

     private void doNewline (Element node) {
-        String[] horVertPos = node.getAttributeValue ("xy").split (",", 2);
+        String positions = node.getAttributeValue ("xy");
+        if (positions != null) {
+            String[] horVertPos = positions.split (",", 2);
+        }
         if (firstLineOnPage) {
             firstLineOnPage = false;
             return;

Other related posts:

  • » [brailleblaster] push by john.bo...@xxxxxxxxxxxxxxxxx - defensive prograsmming: guarding against null pointer in doNoepage in ... on 2012-05-06 12:24 GMT - brailleblaster