Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update PowerMockAgent.java #878

Merged
merged 1 commit into from Feb 24, 2018
Merged

Conversation

hsynkrtl
Copy link
Contributor

@hsynkrtl hsynkrtl commented Jan 9, 2018

added java9 to jdk6OrLater

added java9 to jdk6OrLater
@@ -37,7 +37,8 @@
{

static final String javaSpecVersion = System.getProperty("java.specification.version");
static final boolean jdk6OrLater = "1.6".equals(javaSpecVersion) || "1.7".equals(javaSpecVersion) || "1.8".equals(javaSpecVersion);
static final boolean jdk6OrLater = "1.6".equals(javaSpecVersion) || "1.7".equals(javaSpecVersion) || "1.8".equals(javaSpecVersion)
|| "9".equals(javaSpecVersion);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java 9 specification version key added

@thekingn0thing thekingn0thing merged commit d321aaa into powermock:release/1.x Feb 24, 2018
@mkmaier
Copy link

mkmaier commented May 18, 2018

This will fail for java 10 and later. If the check is inverted, though, it should work for any new version, without changes. So I'd suggest something like

static final boolean jdk6OrLater = !("1.4".equals(javaSpecVersion) || "1.5".equals(javaSpecVersion))

@hsynkrtl hsynkrtl deleted the patch-1 branch June 21, 2018 13:28
@rusefi
Copy link

rusefi commented Jul 24, 2018

So what about version "10" or "11-ea" or "11"? :(

@thekingn0thing
Copy link
Member

thekingn0thing commented Jul 24, 2018 via email

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

Successfully merging this pull request may close these issues.

None yet

4 participants