[Nice-commit] Nice/src/gnu/bytecode SourceMap.java,1.5,1.6
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2005-02-16 23:31:48
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19546/src/gnu/bytecode Modified Files: SourceMap.java Log Message: Make sure to produce a valid source map while keeping its size below 65535. Index: SourceMap.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/SourceMap.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SourceMap.java 12 Feb 2005 13:53:37 -0000 1.5 --- SourceMap.java 16 Feb 2005 23:31:39 -0000 1.6 *************** *** 40,45 **** public int getLength() { ! // Truncate the content to keep it under 65535, because of a JVM bug. ! return Math.min(65535, getBytes().length); } --- 40,44 ---- public int getLength() { ! return getBytes().length; } *************** *** 64,69 **** { 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)); } --- 63,67 ---- { byte[] bytes = getBytes(); ! out.write(bytes, 0, bytes.length); } *************** *** 93,96 **** --- 91,98 ---- return -1; + // Truncate the content to keep it under 65535, because of a JVM bug. + if (buffer.length() + lines.length() > 65000) + return -1; + if (! file.equals(currentFile) || line < firstLine) { |