You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Sandro Martini <sa...@gmail.com> on 2009/08/03 10:44:08 UTC

little patch on WTKXSerializer

Hi to all,
first patch (many thanks to Fingbugs !!) on a possible Null Pointer
dereference in WTKXSerializer:

### Eclipse Workspace Patch 1.0
#P wtk
Index: src/org/apache/pivot/wtkx/WTKXSerializer.java
===================================================================
--- src/org/apache/pivot/wtkx/WTKXSerializer.java	(revision 800243)
+++ src/org/apache/pivot/wtkx/WTKXSerializer.java	(working copy)
@@ -1082,7 +1082,7 @@
      * if no element is currently being processed.
      */
     public int getLineNumber() {
-        return (element == null ? null : element.lineNumber);
+        return (element == null ? -1 : element.lineNumber);
     }

     /**


This is my first patch (created by eclipse tools), i hope it will be
created right.

Bye,
Sandro