Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-31217 Treat null as a default JDK name.
  • Loading branch information
Wilfred committed Nov 2, 2015
1 parent 3675e50 commit 707d4ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/JDK.java
Expand Up @@ -67,7 +67,7 @@ public static boolean isDefaultName(String name) {
// DEFAULT_NAME took this value prior to 1.598.
return true;
}
return DEFAULT_NAME.equals(name);
return DEFAULT_NAME.equals(name) || name == null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/jenkins/model/JDKNameTest.java
Expand Up @@ -36,8 +36,8 @@
@RunWith(PowerMockRunner.class)
public class JDKNameTest {
@Test
public void nullIsNotDefaultName() {
assertThat(JDK.isDefaultName(null), is(false));
public void nullIsDefaultName() {
assertThat(JDK.isDefaultName(null), is(true));
}

@Test
Expand Down

0 comments on commit 707d4ba

Please sign in to comment.