DO NOT REPLY [Bug 38424] - LineNumberTable toString method uses jdk 1.4 StringBuffer append(StringBuffer) method.

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38424>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38424





------- Additional Comments From [email protected]  2006-01-27 20:23 -------
Here is a patch for this issue:

This was generated using the diff command -x and -u options.

Index: bcel/src/java/org/apache/bcel/classfile/LineNumberTable.java
===================================================================
--- bcel/src/java/org/apache/bcel/classfile/LineNumberTable.java       
(revision 372884)
+++ bcel/src/java/org/apache/bcel/classfile/LineNumberTable.java        (working
copy)
@@ -122,6 +122,7 @@
   public final String toString() {
     StringBuffer buf  = new StringBuffer();
     StringBuffer line = new StringBuffer();
+    String newLine = System.getProperty("line.separator", "\n");

     for(int i=0; i < line_number_table_length; i++) {
       line.append(line_number_table[i].toString());
@@ -130,8 +131,8 @@
        line.append(", ");

       if(line.length() > 72) {
-       line.append('\n');
-       buf.append(line);
+       line.append(newLine);
+       buf.append(line.toString());
        line.setLength(0);
       }
     }


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.