changeset 1144:e86a02a1a217

2008-10-22 Omair Majid <omajid@redhat.com> * rt/net/sourceforge/nanoxml/XMLElement.java (sanitizeInput): Fix for last character of the jnlp file being ignored.
author Omair Majid <omajid@redhat.com>
date Wed, 22 Oct 2008 12:20:12 -0400
parents 928b757d93db
children d47e55fa18e5
files ChangeLog rt/net/sourceforge/nanoxml/XMLElement.java
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 22 10:26:57 2008 -0400
+++ b/ChangeLog	Wed Oct 22 12:20:12 2008 -0400
@@ -1,3 +1,8 @@
+2008-10-22  Omair Majid  <omajid@redhat.com>
+
+	* rt/net/sourceforge/nanoxml/XMLElement.java 
+	(sanitizeInput): Fix for last character of the jnlp file being ignored.
+
 2008-10-22  Lillian Angel  <langel@redhat.com>
 
 	* Makefile.am: Added quotes around DIST_ID.
--- a/rt/net/sourceforge/nanoxml/XMLElement.java	Wed Oct 22 10:26:57 2008 -0400
+++ b/rt/net/sourceforge/nanoxml/XMLElement.java	Wed Oct 22 12:20:12 2008 -0400
@@ -1266,6 +1266,7 @@
 
                     int i = this.reader.read();
                     if (i == -1) {
+                        // no character in buffer, and nothing read
                         out.flush();
                         break;
                     } else if (i == 10) {
@@ -1278,7 +1279,19 @@
                 char next;
                 int i = this.reader.read();
                 if (i == -1) {
+                    // character in buffer and nothing read. write out
+                    // what's in the buffer
+                    out.print(ch);
                     out.flush();
+                    if (JNLPRuntime.isDebug()) {
+                        if (ch == 10) {
+                            System.out.println();
+                            System.out.print("line: " + newline + " ");
+                            newline++;
+                        } else {
+                            System.out.print(ch);
+                        }
+                    }
                     break;
                 } else if (i == 10) {
                     next = '\n';