[Nice-commit] Nice/src/gnu/bytecode SourceMap.java,1.4,1.5
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2005-02-12 13:53:46
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/gnu/bytecode Modified Files: SourceMap.java Log Message: Truncate SourceDebugExtension to make sure it does not exceed 65535 bytes, to workaround a Sun JVM bug. Index: SourceMap.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/SourceMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SourceMap.java 10 Feb 2005 17:00:34 -0000 1.4 --- SourceMap.java 12 Feb 2005 13:53:37 -0000 1.5 *************** *** 38,44 **** private static final String trailer = "*E\n"; ! public int getLength() { ! return getBytes().length; } --- 38,45 ---- private static final String trailer = "*E\n"; ! public int getLength() { ! // Truncate the content to keep it under 65535, because of a JVM bug. ! return Math.min(65535, getBytes().length); } *************** *** 59,67 **** } ! public void write(java.io.DataOutputStream out) throws java.io.IOException { byte[] bytes = getBytes(); ! out.write(bytes, 0, bytes.length); } --- 60,69 ---- } ! public void write(java.io.DataOutputStream out) throws java.io.IOException { byte[] bytes = getBytes(); ! // Truncate the content to keep it under 65535, because of a JVM bug. ! out.write(bytes, 0, Math.min(65535, bytes.length)); } |