Skip to content

Commit

Permalink
feat(objectionary#344): check INVOKESPECIAL correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Aug 1, 2024
1 parent 1911e72 commit c0346c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/it/streams/src/main/java/org/eolang/streams/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ public static void main(String... args) {
.filter(s -> Boolean.valueOf(s.equals("")).equals(false))
.mapToInt(s -> Integer.parseInt(s))
.sum();
System.out.printf("sum=%d time=%d\n", sum, System.currentTimeMillis() - start);
System.out.printf("sum=%d time=%d%n", sum, System.currentTimeMillis() - start);
// Here I test {@link Playground} class.
if (!new Playground(0).isAvailable()) {
throw new RuntimeException("Playground should be available");
} else {
System.out.println("Playground is available");
}
System.out.printf("Playground is available %b%n", new Playground(0).isAvailable());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public Playground(final int d) {
}

public boolean isAvailable() {
return isZero() || this.d > 10;
return isZero();
}

private boolean isZero() {
return this.d == 0;
return new Integer(0).equals(this.d);
}
}

0 comments on commit c0346c8

Please sign in to comment.