You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2006/01/27 20:23:47 UTC

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

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 ccorsi@progress.com  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.

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