mirror of https://github.com/apache/lucene.git
LUCENE-5207: Limit the maximum class name length
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5207@1522877 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f05d6b11a8
commit
d586a56a3b
|
@ -196,6 +196,9 @@ public class JavascriptCompiler {
|
|||
wasIdentifierPart = false;
|
||||
}
|
||||
}
|
||||
// limit maximum length, theoretically 65536 is allowed in constant pool (in UTF-8 format).
|
||||
if (sb.length() > 1204) sb.setLength(1024);
|
||||
// remove trailing underscores
|
||||
for (int i = sb.length() - 1; i >= 0; i--) {
|
||||
if (sb.charAt(i) == '_') {
|
||||
sb.setLength(i);
|
||||
|
|
Loading…
Reference in New Issue