File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -606,13 +606,17 @@ private Pair<String, OffsetTranslation> getStringConcatResult(Expression exp) {
606
606
if (be .getOperator ().equals ("+" )) {
607
607
Pair <String , OffsetTranslation > left = getStringConcatResult (be .getLeft ());
608
608
Pair <String , OffsetTranslation > right = getStringConcatResult (be .getRight ());
609
- if (left != null && right ! = null ) {
610
- String str = left . fst () + right . fst () ;
611
-
612
- int delta = be . getRight (). getLoc (). getStart (). getOffset () - be . getLeft (). getLoc (). getStart (). getOffset ();
613
- int offset = left . fst () .length ();
614
- return Pair . make ( str , left . snd (). append ( right . snd (), offset , delta )) ;
609
+ if (left == null || right = = null ) {
610
+ return null ;
611
+ }
612
+ String str = left . fst () + right . fst ();
613
+ if ( str .length () > 1000 ) {
614
+ return null ;
615
615
}
616
+
617
+ int delta = be .getRight ().getLoc ().getStart ().getOffset () - be .getLeft ().getLoc ().getStart ().getOffset ();
618
+ int offset = left .fst ().length ();
619
+ return Pair .make (str , left .snd ().append (right .snd (), offset , delta ));
616
620
}
617
621
} else if (exp instanceof Literal ) {
618
622
Literal lit = (Literal ) exp ;
You can’t perform that action at this time.
0 commit comments