Skip to content

Commit

Permalink
Deprecate System2#isJavaAtLeast17()
Browse files Browse the repository at this point in the history
because it always returns true. Java 6 is not supported at runtime.
  • Loading branch information
Simon Brandhof committed Apr 11, 2017
1 parent 8054387 commit a6ca4c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Expand Up @@ -126,9 +126,11 @@ public boolean isOsWindows() {
/**
* True if Java 7 or Java 8 runtime environment
* @since 4.3
* @deprecated in 6.4. Java 8+ is required, so this method always returns {@code true}.
*/
@Deprecated
public boolean isJavaAtLeast17() {
return SystemUtils.isJavaVersionAtLeast(1.7f);
return true;
}

public void println(String obj) {
Expand Down
Expand Up @@ -84,12 +84,8 @@ public void testIsOsWindows() {
}

@Test
public void testIsJavaAtLeast17() {
if (SystemUtils.IS_JAVA_1_6) {
assertThat(System2.INSTANCE.isJavaAtLeast17()).isFalse();
} else {
assertThat(System2.INSTANCE.isJavaAtLeast17()).isTrue();
}
public void isJavaAtLeast17_always_returns_true() {
assertThat(System2.INSTANCE.isJavaAtLeast17()).isTrue();
}

@Test
Expand Down

0 comments on commit a6ca4c7

Please sign in to comment.