Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from andresrc/JENKINS-33343
[JENKINS-33343] Update to parent POM 2.3
- Loading branch information
Showing
33 changed files
with
532 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package hudson.tasks.junit; | ||
|
||
import org.kohsuke.accmod.Restricted; | ||
import org.kohsuke.accmod.restrictions.NoExternalUse; | ||
|
||
import jenkins.model.Jenkins; | ||
|
||
/** | ||
* Simple helper so we don't have to check {@code Jenkins.getInstance() != null} everywhere. | ||
* TODO: replace with Jenkins.getActiveInstance() when on core {@literal >=} 1.609 | ||
*/ | ||
@Restricted(NoExternalUse.class) | ||
public final class Helper { | ||
/** Not instantiable. */ | ||
private Helper() { | ||
throw new AssertionError("Not instantiable"); | ||
} | ||
|
||
public static Jenkins getActiveInstance() { | ||
Jenkins instance = Jenkins.getInstance(); | ||
if (instance == null) { | ||
throw new IllegalStateException("Jenkins has not been started, or was already shut down"); | ||
} | ||
return instance; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.