diff --git a/src/main/java/pascal/taie/analysis/pta/plugin/reflection/OthersModel.java b/src/main/java/pascal/taie/analysis/pta/plugin/reflection/OthersModel.java index 49f3fb7b3..8dcaaae4b 100644 --- a/src/main/java/pascal/taie/analysis/pta/plugin/reflection/OthersModel.java +++ b/src/main/java/pascal/taie/analysis/pta/plugin/reflection/OthersModel.java @@ -80,6 +80,11 @@ public OthersModel(Solver solver, MetaObjHelper helper) { // ---------- Model for java.lang.Object starts ---------- @InvokeHandler(signature = "", argIndexes = {BASE}) public void getClass(CSVar csVar, PointsToSet pts, Invoke invoke) { + if (!invoke.getContainer().isApplication()) { + // ignore Object.getClass() in library code, until + // we have better treatment with relevant reflective calls + return; + } Var result = invoke.getResult(); if (result != null) { Context context = csVar.getContext();