Skip to content

Commit

Permalink
Rollback LocalsValidator changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akshitad11 committed Dec 21, 2023
1 parent e2a0747 commit ae8ede5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,30 @@ public class LocalsValidator implements BodyValidator {
*/
@Override
public List<ValidationException> validate(@Nonnull Body body, @Nonnull View<?> view) {

//TODO : Write tests
List<ValidationException> exception = new ArrayList<>();

final Set<Local> locals = body.getLocals();

body.getUses()
.parallelStream()
.filter(value -> value instanceof Local && !locals.contains(value))
.forEach(
value ->
exception.add(
new ValidationException(
value,
"Local not in chain : " + value + " in " + body.getMethodSignature())));

body.getDefs()
.parallelStream()
.filter(value -> value instanceof Local && !locals.contains(value))
.forEach(
value ->
exception.add(
new ValidationException(
value,
"Local not in chain : " + value + " in " + body.getMethodSignature())));
// final Set<Local> locals = body.getLocals();
//
// body.getUses()
// .parallelStream()
// .filter(value -> value instanceof Local && !locals.contains(value))
// .forEach(
// value ->
// exception.add(
// new ValidationException(
// value,
// "Local not in chain : " + value + " in " + body.getMethodSignature())));
//
// body.getDefs()
// .parallelStream()
// .filter(value -> value instanceof Local && !locals.contains(value))
// .forEach(
// value ->
// exception.add(
// new ValidationException(
// value,
// "Local not in chain : " + value + " in " + body.getMethodSignature())));

return exception;
}
Expand Down
6 changes: 0 additions & 6 deletions sootup.java.bytecode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
<artifactId>dex2jar</artifactId>
<version>2.4.6</version>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.jimple.parser</artifactId>
<version>1.1.2-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>

<repositories>
Expand Down

0 comments on commit ae8ede5

Please sign in to comment.