Skip to content

Commit

Permalink
Merge pull request #1152 from Liyw979/improve/buildClassFrom2
Browse files Browse the repository at this point in the history
remove Optional for JimpleView
  • Loading branch information
swissiety authored Jan 9, 2025
2 parents 7e85b26 + d7e9ede commit 31e67ba
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ Optional<SootClass> getAbstractClass(@Nonnull ClassType type) {
.collect(Collectors.joining(",")),
foundClassSources.get(0).getSourcePath());
}
return buildClassFrom(foundClassSources.get(0));
return Optional.of(buildClassFrom(foundClassSources.get(0)));
}

@Nonnull
private synchronized Optional<SootClass> buildClassFrom(AbstractClassSource classSource) {
private synchronized SootClass buildClassFrom(AbstractClassSource classSource) {

ClassType classType = classSource.getClassType();
SootClass theClass;
Expand All @@ -144,7 +144,7 @@ private synchronized Optional<SootClass> buildClassFrom(AbstractClassSource clas
theClass = cache.getClass(classType);
}

return Optional.of(theClass);
return theClass;
}

private synchronized void resolveAll() {
Expand Down

0 comments on commit 31e67ba

Please sign in to comment.