Skip to content

Commit

Permalink
Merge pull request soot-oss#1014 from soot-oss/1007-bug-super-class-m…
Browse files Browse the repository at this point in the history
…odifier-should-not-be-printed-in-legacymode

remove super keyword in jimple in Legacy Mode
  • Loading branch information
swissiety authored Aug 12, 2024
2 parents 551c172 + d3abac4 commit 929e3f9
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 929e3f9

Please sign in to comment.