Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

handleMaps is ignored #31

Open
martinschaef opened this issue Sep 3, 2021 · 2 comments
Open

handleMaps is ignored #31

martinschaef opened this issue Sep 3, 2021 · 2 comments

Comments

@martinschaef
Copy link

The handleMapsBackward and handleMapsForward methods ignore the handleMaps option. It doesn't look like this option is used anywhere in the code.

@martinschaef
Copy link
Author

martinschaef commented Sep 3, 2021

This would do the trick:

diff --git a/boomerangPDS/src/main/java/boomerang/WeightedBoomerang.java b/boomerangPDS/src/main/java/boomerang/WeightedBoomerang.java
index 13088abc..cb7b7833 100644
--- a/boomerangPDS/src/main/java/boomerang/WeightedBoomerang.java
+++ b/boomerangPDS/src/main/java/boomerang/WeightedBoomerang.java
@@ -178,7 +178,9 @@ public abstract class WeightedBoomerang<W extends Weight> {
                 }
                 addVisitedMethod(node.stmt().getStart().getMethod());
 
-                handleMapsBackward(node);
+                if (options.handleMaps()) {
+                  handleMapsBackward(node);
+                }
 
                 if (options.trackStaticFieldAtEntryPointToClinit()) {
                   handleStaticInitializer(node, backwardSolver);
@@ -528,7 +530,9 @@ public abstract class WeightedBoomerang<W extends Weight> {
           }
 
           addVisitedMethod(node.stmt().getStart().getMethod());
-          handleMapsForward(solver, node);
+          if (options.handleMaps()) {
+            handleMapsForward(solver, node);
+          }
         });
 
     return solver;

@johspaeth
Copy link
Member

Thanks for the suggested fix. I'll include the diff with my next changes.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants