You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package com.democlass;
import java.util.StringJoiner;
/**
* @date 2024/7/8
*/
public class TestA {
public Integer add(int i, int j) {
StringJoiner stringJoiner = new StringJoiner(", ", "{", "}");
return i+j;
}
}
When encountering the StringJoiner class, an error occurs
Version
Latest release (e.g. via Maven)
Relevant log output
Exception in thread "main" java.lang.IllegalStateException: Failed to apply sootup.java.core.interceptors.TypeAssigner@365c30cc to <com.democlass.TestA: java.lang.Integer add(int,int)>
at sootup.java.bytecode.frontend.AsmMethodSource.resolveBody(AsmMethodSource.java:240)
at sootup.core.model.SootMethod.lazyBodyInitializer(SootMethod.java:98)
at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:181)
at sootup.core.model.SootMethod.getBody(SootMethod.java:177)
at com.sootup.TestAAnalysis.analysis(TestAAnalysis.java:79)
at com.sootup.TestAAnalysis.main(TestAAnalysis.java:62)
Caused by: java.lang.ClassCastException: sootup.core.jimple.common.constant.StringConstant cannot be cast to sootup.core.jimple.basic.Local
at sootup.java.core.interceptors.typeresolving.TypePromotionVisitor.visit(TypePromotionVisitor.java:76)
at sootup.java.core.interceptors.typeresolving.TypeChecker.handleInvokeExpr(TypeChecker.java:300)
at sootup.java.core.interceptors.typeresolving.TypeChecker.caseInvokeStmt(TypeChecker.java:77)
at sootup.core.jimple.common.stmt.JInvokeStmt.accept(JInvokeStmt.java:73)
at sootup.core.jimple.common.stmt.JInvokeStmt.accept(JInvokeStmt.java:34)
at sootup.java.core.interceptors.typeresolving.TypePromotionVisitor.getPromotedTyping(TypePromotionVisitor.java:47)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at sootup.java.core.interceptors.typeresolving.TypeResolver.resolve(TypeResolver.java:81)
at sootup.java.core.interceptors.TypeAssigner.interceptBody(TypeAssigner.java:42)
at sootup.java.bytecode.frontend.AsmMethodSource.resolveBody(AsmMethodSource.java:234)
... 5 more
The text was updated successfully, but these errors were encountered:
What happened?
sootup version: 1.3.0
jdk:1.8
method source:
When encountering the StringJoiner class, an error occurs
Version
Latest release (e.g. via Maven)
Relevant log output
The text was updated successfully, but these errors were encountered: