Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b4d4f52

Browse files
slandellelrytz
authored andcommittedSep 14, 2017
[asm-cherry-pick] Fill exception message for max String literal length
Gatling compiles Scala classes on the fly with Zinc. Be it a program bug or a user error, some Strings sometimes end up being longer than the maximum String length. It would be nice if we could get an Exception with the proper message. I guess there's the same issue with maximum file size and maximum method size, will check.
1 parent 2cc4b6d commit b4d4f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/main/java/scala/tools/asm/ByteVector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public ByteVector putLong(final long l) {
210210
public ByteVector putUTF8(final String s) {
211211
int charLength = s.length();
212212
if (charLength > 65535) {
213-
throw new IllegalArgumentException();
213+
throw new IllegalArgumentException("Maximum String literal length exceeded");
214214
}
215215
int len = length;
216216
if (len + 2 + charLength > data.length) {

0 commit comments

Comments
 (0)
Please sign in to comment.