diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2010-04-29 17:01:22 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2010-04-29 17:01:22 +0000 |
commit | 5b937bacd38c34718e16989f3752e1f582ae2698 (patch) | |
tree | 6b14bd7647a353d9f39f3973a6e0e3444b738066 /src/fjbg/ch | |
parent | 8eb1d0c6ac940438b5f81d832dd3d0ab26de1ff5 (diff) | |
download | scala-5b937bacd38c34718e16989f3752e1f582ae2698.tar.gz scala-5b937bacd38c34718e16989f3752e1f582ae2698.tar.bz2 scala-5b937bacd38c34718e16989f3752e1f582ae2698.zip |
Closes #3310 (very large Scala class is compile...
Closes #3310 (very large Scala class is compiled to invalid classfile
because Scala signature can't fit into constant pool). Review by dragos.
Diffstat (limited to 'src/fjbg/ch')
-rw-r--r-- | src/fjbg/ch/epfl/lamp/fjbg/JConstantPool.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fjbg/ch/epfl/lamp/fjbg/JConstantPool.java b/src/fjbg/ch/epfl/lamp/fjbg/JConstantPool.java index 4fa048177c..0e6b43f1e2 100644 --- a/src/fjbg/ch/epfl/lamp/fjbg/JConstantPool.java +++ b/src/fjbg/ch/epfl/lamp/fjbg/JConstantPool.java @@ -383,6 +383,9 @@ public class JConstantPool { public int getSize() { return 1; } public void writeContentsTo(DataOutputStream stream) throws IOException { if (bytes != null) { + if (bytes.length > 65535) { + throw new IOException("String literal of length " + bytes.length + " does not fit in Classfile"); + } stream.writeShort(bytes.length); stream.write(bytes); } |