Skip to content

Commit

Permalink
remove super keyword in jimple of whole class to avoid error when par…
Browse files Browse the repository at this point in the history
…sing jimple via soot
  • Loading branch information
sahilagichani14 committed Aug 9, 2024
1 parent 551c172 commit d3abac4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ public void printTo(SootClass cl, PrintWriter out, LabeledStmtPrinter printer) {
*/

EnumSet<ClassModifier> modifiers = EnumSet.copyOf(cl.getModifiers());
// Jimple parser in Soot gives error with super keyword in class modifiers
if (options.contains(Option.LegacyMode)) {
modifiers.remove(ClassModifier.SUPER);
}
// remove unwanted modifier combinations
if (cl.isInterface() && ClassModifier.isAbstract(modifiers)) {
modifiers.remove(ClassModifier.ABSTRACT);
Expand Down

0 comments on commit d3abac4

Please sign in to comment.