Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tentantiva2

  • Loading branch information...
commit a5c943c061bf8e6e3c55f82997e1f155ef1678f7 1 parent 021d135
Rafael Souza authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/transformers/AppletContextsTransformer.java
11 src/transformers/AppletContextsTransformer.java
View
@@ -110,6 +110,16 @@ private void transformContext(Body body, String signature, List<Channel> channel
Unit init = units.getFirst(); //inicio da trap
Unit last = units.getLast(); //fim da trap
+ Unit returnStmt = units.getLast();
+
+ if (!(returnStmt instanceof ReturnStmt)) {
+ returnStmt = Jimple.v().newReturnVoidStmt();
+ units.addLast(returnStmt);
+
+ GotoStmt gotoReturn = Jimple.v().newGotoStmt(returnStmt); //goto return
+ units.insertAfter(gotoReturn, last);
+ last = gotoReturn;
+ }
//construindo a trap
soot.Local catchRefLocal = soot.jimple.Jimple.v().newLocal("$r" + body.getLocalCount(), soot.RefType.v("user.EChannelExceptions")); // local que guarda a exceção capturada => e
@@ -156,6 +166,5 @@ private void transformContext(Body body, String signature, List<Channel> channel
units.insertBefore(jcmlCodeAssignment, finalInvokeThrowItStmt);
units.insertAfter(ifStmt, jcmlCodeAssignment);
}
- units.addLast(Jimple.v().newReturnVoidStmt());
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.