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:21:22 UTC

DO NOT REPLY [Bug 38424] New: - 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

           Summary: LineNumberTable toString method uses jdk 1.4
                    StringBuffer append(StringBuffer) method.
           Product: BCEL
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: bcel-dev@jakarta.apache.org
        ReportedBy: ccorsi@progress.com


I have noticed that the current BCEL trunk expects to build the BCEL package
against jdk 1.3. The LineNumberTable class toString method uses the StringBuffer
append(StringBuffer) method that been defined since jdk 1.4. Any builds using
jdk 1.4 or greater will use of this method call.

I have also noticed that the toString method adds a new line after printing 72
characters but it append the '\n' character instead of what the "line.separator"
property is defined as.

I have a patch for this issue that I will add to this bug report.

-- 
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


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

Posted by bu...@apache.org.
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


tcurdt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From tcurdt@apache.org  2006-02-02 04:10 -------
applied, thanks!

-- 
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


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

Posted by bu...@apache.org.
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


tcurdt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED




-- 
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


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

Posted by bu...@apache.org.
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


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

Posted by bu...@apache.org.
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:27 -------
Created an attachment (id=17519)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17519&action=view)
This is a good patch diff file.

The priviously pasted diffs format was altered. Added an attachment for
consistency of patch file.

-- 
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