Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package testSuite;

public class CorrectStringConcat {

void example() {
System.out.println("Hello, " + "World!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public <T> void getBinaryOpRefinements(CtBinaryOperator<T> operator) throws Pars
operator.putMetadata(rtc.REFINE_KEY, Predicate.createEquals(Predicate.createVar(rtc.WILD_VAR), oper));
} else if (types.contains(type)) {
operator.putMetadata(rtc.REFINE_KEY, Predicate.createEquals(Predicate.createVar(rtc.WILD_VAR), oper));
} else if (type.equals("java.lang.String")) {
// skip strings
} else {
throw new NotImplementedException("Literal type not implemented");
}
Expand Down Expand Up @@ -238,6 +240,10 @@ private Predicate getOperationRefinements(CtBinaryOperator<?> operator, CtVariab

} else if (element instanceof CtLiteral<?>) {
CtLiteral<?> l = (CtLiteral<?>) element;
if (l.getType().getQualifiedName().equals("java.lang.String")) {
// skip strings
return new Predicate();
}
return new Predicate(l.getValue().toString(), element, rtc.getErrorEmitter());

} else if (element instanceof CtInvocation<?>) {
Expand Down