code
stringlengths
73
34.1k
label
stringclasses
1 value
public int expect(String pattern) throws MalformedPatternException, Exception { logger.trace("Searching for '" + pattern + "' in the reader stream"); return expect(pattern, null); }
java
protected ExpectState prepareClosure(int pairIndex, MatchResult result) { /* TODO: potentially remove this? { System.out.println( "Begin: " + result.beginOffset(0) ); System.out.println( "Length: " + result.length() ); System.out.println( "Current: " + input.getCurren...
java
public void cmdProc(Interp interp, TclObject argv[]) throws TclException { int currentObjIndex, len, i; int objc = argv.length - 1; boolean doBackslashes = true; boolean doCmds = true; boolean doVars = true; StringBuffer result = new StringBuffer(); String s; ...
java
public static void mergeReports(File reportOverall, File... reports) { SessionInfoStore infoStore = new SessionInfoStore(); ExecutionDataStore dataStore = new ExecutionDataStore(); boolean isCurrentVersionFormat = loadSourceFiles(infoStore, dataStore, reports); try (BufferedOutputStream outputStream = ...
java
public JaCoCoReportReader readJacocoReport(IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionInfoStore) { if (jacocoExecutionData == null) { return this; } JaCoCoExtensions.logger().info("Analysing {}", jacocoExecutionData); try (InputStream inputStream = new BufferedInputStr...
java
public ArtifactName build() { String groupId = this.groupId; String artifactId = this.artifactId; String classifier = this.classifier; String packaging = this.packaging; String version = this.version; if (artifact != null && !artifact.isEmpty()) { final String...
java
public static Deployment of(final File content) { final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content).toPath()); return new Deployment(deploymentContent, null); }
java
public static Deployment of(final Path content) { final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content)); return new Deployment(deploymentContent, null); }
java
public static Deployment of(final URL url) { final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("url", url)); return new Deployment(deploymentContent, null); }
java
public Deployment setServerGroups(final Collection<String> serverGroups) { this.serverGroups.clear(); this.serverGroups.addAll(serverGroups); return this; }
java
protected void validate(final boolean isDomain) throws MojoDeploymentException { final boolean hasServerGroups = hasServerGroups(); if (isDomain) { if (!hasServerGroups) { throw new MojoDeploymentException( "Server is running in domain mode, but no ser...
java
private ModelNode buildAddOperation(final ModelNode address, final Map<String, String> properties) { final ModelNode op = ServerOperations.createAddOperation(address); for (Map.Entry<String, String> prop : properties.entrySet()) { final String[] props = prop.getKey().split(","); ...
java
private void handleDmrString(final ModelNode node, final String name, final String value) { final String realValue = value.substring(2); node.get(name).set(ModelNode.fromString(realValue)); }
java
private ModelNode parseAddress(final String profileName, final String inputAddress) { final ModelNode result = new ModelNode(); if (profileName != null) { result.add(ServerOperations.PROFILE, profileName); } String[] parts = inputAddress.split(","); for (String part :...
java
public static ContainerDescription getContainerDescription(final ModelControllerClient client) throws IOException, OperationExecutionException { return DefaultContainerDescription.lookup(Assert.checkNotNullParam("client", client)); }
java
public static void waitForDomain(final ModelControllerClient client, final long startupTimeout) throws InterruptedException, RuntimeException, TimeoutException { waitForDomain(null, client, startupTimeout); }
java
public static void shutdownDomain(final ModelControllerClient client, final int timeout) throws IOException, OperationExecutionException { // Note the following two operations used to shutdown a domain don't seem to work well in a composite operation. // The operation occasionally sees a java.util.concu...
java
public static ModelNode determineHostAddress(final ModelControllerClient client) throws IOException, OperationExecutionException { final ModelNode op = Operations.createReadAttributeOperation(EMPTY_ADDRESS, "local-host-name"); ModelNode response = client.execute(op); if (Operations.isSuccessfulO...
java
public static void waitForStandalone(final ModelControllerClient client, final long startupTimeout) throws InterruptedException, RuntimeException, TimeoutException { waitForStandalone(null, client, startupTimeout); }
java
public static boolean isStandaloneRunning(final ModelControllerClient client) { try { final ModelNode response = client.execute(Operations.createReadAttributeOperation(EMPTY_ADDRESS, "server-state")); if (Operations.isSuccessfulOutcome(response)) { final String state = Op...
java
public static void shutdownStandalone(final ModelControllerClient client, final int timeout) throws IOException { final ModelNode op = Operations.createOperation("shutdown"); op.get("timeout").set(timeout); final ModelNode response = client.execute(op); if (Operations.isSuccessfulOutcome...
java
public static PackageType resolve(final MavenProject project) { final String packaging = project.getPackaging().toLowerCase(Locale.ROOT); if (DEFAULT_TYPES.containsKey(packaging)) { return DEFAULT_TYPES.get(packaging); } return new PackageType(packaging); }
java
public static String getJavaCommand(final Path javaHome) { final Path resolvedJavaHome = javaHome == null ? findJavaHome() : javaHome; final String exe; if (resolvedJavaHome == null) { exe = "java"; } else { exe = resolvedJavaHome.resolve("bin").resolve("java").to...
java
public static UndeployDescription of(final DeploymentDescription deploymentDescription) { Assert.checkNotNullParam("deploymentDescription", deploymentDescription); return of(deploymentDescription.getName()).addServerGroups(deploymentDescription.getServerGroups()); }
java
public static Operation createDeployOperation(final DeploymentDescription deployment) { Assert.checkNotNullParam("deployment", deployment); final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true); addDeployOperationStep(builder, deployment); return builder.build(...
java
public static Operation createDeployOperation(final Set<DeploymentDescription> deployments) { Assertions.requiresNotNullOrNotEmptyParameter("deployments", deployments); final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true); for (DeploymentDescription deployment : deplo...
java
static void addDeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) { final String name = deployment.getName(); final Set<String> serverGroups = deployment.getServerGroups(); // If the server groups are empty this is a standalone deployment ...
java
private static void addRedeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) { final String deploymentName = deployment.getName(); final Set<String> serverGroups = deployment.getServerGroups(); if (serverGroups.isEmpty()) { builder.add...
java
public static String getFailureDescriptionAsString(final ModelNode result) { if (isSuccessfulOutcome(result)) { return ""; } final String msg; if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) { if (result.hasDefined(ClientConstants.OP)) { ...
java
public static ModelNode createListDeploymentsOperation() { final ModelNode op = createOperation(READ_CHILDREN_NAMES); op.get(CHILD_TYPE).set(DEPLOYMENT); return op; }
java
public static ModelNode createRemoveOperation(final ModelNode address, final boolean recursive) { final ModelNode op = createRemoveOperation(address); op.get(RECURSIVE).set(recursive); return op; }
java
public static Property getChildAddress(final ModelNode address) { if (address.getType() != ModelType.LIST) { throw new IllegalArgumentException("The address type must be a list."); } final List<Property> addressParts = address.asPropertyList(); if (addressParts.isEmpty()) { ...
java
public static ModelNode getParentAddress(final ModelNode address) { if (address.getType() != ModelType.LIST) { throw new IllegalArgumentException("The address type must be a list."); } final ModelNode result = new ModelNode(); final List<Property> addressParts = address.asPro...
java
public String getController() { final StringBuilder controller = new StringBuilder(); if (getProtocol() != null) { controller.append(getProtocol()).append("://"); } if (getHost() != null) { controller.append(getHost()); } else { controller.appe...
java
static DefaultContainerDescription lookup(final ModelControllerClient client) throws IOException, OperationExecutionException { final ModelNode op = Operations.createReadResourceOperation(new ModelNode().setEmptyList()); op.get(ClientConstants.INCLUDE_RUNTIME).set(true); final ModelNode result =...
java
public static SimpleDeploymentDescription of(final String name, @SuppressWarnings("TypeMayBeWeakened") final Set<String> serverGroups) { final SimpleDeploymentDescription result = of(name); if (serverGroups != null) { result.addServerGroups(serverGroups); } return result; ...
java
@Override protected void addBuildInfoProperties(BuildInfoBuilder builder) { if (envVars != null) { for (Map.Entry<String, String> entry : envVars.entrySet()) { builder.addProperty(BuildInfoProperties.BUILD_INFO_ENVIRONMENT_PREFIX + entry.getKey(), entry.getValue()); }...
java
@JavaScriptMethod @SuppressWarnings({"UnusedDeclaration"}) public LoadBuildsResponse loadBuild(String buildId) { LoadBuildsResponse response = new LoadBuildsResponse(); // When we load a new build we need also to reset the promotion plugin. // The null plugin is related to 'None' plugin....
java
@SuppressWarnings({"UnusedDeclaration"}) public void doIndex(StaplerRequest req, StaplerResponse resp) throws IOException, ServletException { req.getView(this, chooseAction()).forward(req, resp); }
java
public static org.jfrog.hudson.ArtifactoryServer prepareArtifactoryServer(String artifactoryServerID, ArtifactoryServer pipelineServer) { if (artifactoryServerID == null && pipelineServer == null) { return null; }...
java
public static BuildInfo appendBuildInfo(CpsScript cpsScript, Map<String, Object> stepVariables) { BuildInfo buildInfo = (BuildInfo) stepVariables.get(BUILD_INFO); if (buildInfo == null) { buildInfo = (BuildInfo) cpsScript.invokeMethod("newBuildInfo", Maps.newLinkedHashMap()); ste...
java
public static boolean promoteAndCheckResponse(Promotion promotion, ArtifactoryBuildInfoClient client, TaskListener listener, String buildName, String buildNumber) throws IOException { // If failFast is true, perform dry run first if (promotion.isFailFast...
java
public static FormValidation validateEmails(String emails) { if (!Strings.isNullOrEmpty(emails)) { String[] recipients = StringUtils.split(emails, " "); for (String email : recipients) { FormValidation validation = validateInternetAddress(email); if (valid...
java
public static FormValidation validateArtifactoryCombinationFilter(String value) throws IOException, InterruptedException { String url = Util.fixEmptyAndTrim(value); if (url == null) return FormValidation.error("Mandatory field - You don`t have any deploy matches"); retur...
java
public static boolean distributeAndCheckResponse(DistributionBuilder distributionBuilder, ArtifactoryBuildInfoClient client, TaskListener listener, String buildName, String buildNumber, boolean dryRun) throws IOException { // do a dry run first listen...
java
private T getWrappedPublisher(Publisher flexiblePublisher, Class<T> type) { if (!(flexiblePublisher instanceof FlexiblePublisher)) { throw new IllegalArgumentException(String.format("Publisher should be of type: '%s'. Found type: '%s'", FlexiblePublisher.class, flexiblePublisher.getC...
java
public T find(AbstractProject<?, ?> project, Class<T> type) { // First check that the Flexible Publish plugin is installed: if (Jenkins.getInstance().getPlugin(FLEXIBLE_PUBLISH_PLUGIN) != null) { // Iterate all the project's publishers and find the flexible publisher: for (Publis...
java
public boolean isPublisherWrapped(AbstractProject<?, ?> project, Class<T> type) { return find(project, type) != null; }
java
public void commitWorkingCopy(final String commitMessage) throws IOException, InterruptedException { build.getWorkspace().act(new SVNCommitWorkingCopyCallable(commitMessage, getLocation(), getSvnAuthenticationProvider(build), buildListener)); }
java
public void createTag(final String tagUrl, final String commitMessage) throws IOException, InterruptedException { build.getWorkspace() .act(new SVNCreateTagCallable(tagUrl, commitMessage, getLocation(), getSvnAuthenticationProvider(build), buildListener)); ...
java
public void revertWorkingCopy() throws IOException, InterruptedException { build.getWorkspace() .act(new RevertWorkingCopyCallable(getLocation(), getSvnAuthenticationProvider(build), buildListener)); }
java
public void safeRevertWorkingCopy() { try { revertWorkingCopy(); } catch (Exception e) { debuggingLogger.log(Level.FINE, "Failed to revert working copy", e); log("Failed to revert working copy: " + e.getLocalizedMessage()); Throwable cause = e.getCause(); ...
java
public void setIssueTrackerInfo(BuildInfoBuilder builder) { Issues issues = new Issues(); issues.setAggregateBuildIssues(aggregateBuildIssues); issues.setAggregationBuildStatus(aggregationBuildStatus); issues.setTracker(new IssueTracker("JIRA", issueTrackerVersion)); Set<Issue> a...
java
public static BuildRetention createBuildRetention(Run build, boolean discardOldArtifacts) { BuildRetention buildRetention = new BuildRetention(discardOldArtifacts); LogRotator rotator = null; BuildDiscarder buildDiscarder = build.getParent().getBuildDiscarder(); if (buildDiscarder != nul...
java
public static String getImageIdFromTag(String imageTag, String host) throws IOException { DockerClient dockerClient = null; try { dockerClient = getDockerClient(host); return dockerClient.inspectImageCmd(imageTag).exec().getId(); } finally { closeQuietly(docke...
java
public static void pushImage(String imageTag, String username, String password, String host) throws IOException { final AuthConfig authConfig = new AuthConfig(); authConfig.withUsername(username); authConfig.withPassword(password); DockerClient dockerClient = null; try { ...
java
public static void pullImage(String imageTag, String username, String password, String host) throws IOException { final AuthConfig authConfig = new AuthConfig(); authConfig.withUsername(username); authConfig.withPassword(password); DockerClient dockerClient = null; try { ...
java
public static String getParentId(String digest, String host) throws IOException { DockerClient dockerClient = null; try { dockerClient = getDockerClient(host); return dockerClient.inspectImageCmd(digest).exec().getParent(); } finally { closeQuietly(dockerClien...
java
public static List<String> getLayersDigests(String manifestContent) throws IOException { List<String> dockerLayersDependencies = new ArrayList<String>(); JsonNode manifest = Utils.mapper().readTree(manifestContent); JsonNode schemaVersion = manifest.get("schemaVersion"); if (schemaVersi...
java
public static String digestToFileName(String digest) { if (StringUtils.startsWith(digest, "sha1")) { return "manifest.json"; } return getShaVersion(digest) + "__" + getShaValue(digest); }
java
public static int getNumberOfDependentLayers(String imageContent) throws IOException { JsonNode history = Utils.mapper().readTree(imageContent).get("history"); if (history == null) { throw new IllegalStateException("Could not find 'history' tag"); } int layersNum = history.s...
java
private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException { FilePath pathToModuleRoot = mavenBuild.getModuleRoot(); FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null)); return pathToPom.act(new MavenMod...
java
private String getRelativePomPath(MavenModule mavenModule, MavenModuleSetBuild mavenBuild) { String relativePath = mavenModule.getRelativePath(); if (StringUtils.isBlank(relativePath)) { return POM_NAME; } // If this is the root module, return the root pom path. if (...
java
private String createPomPath(String relativePath, String moduleName) { if (!moduleName.contains(".xml")) { // Inside the parent pom, the reference is to the pom.xml file return relativePath + "/" + POM_NAME; } // There is a reference to another xml file, which is not the ...
java
public List<String> invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { MavenProject mavenProject = getMavenProject(f.getAbsolutePath()); return mavenProject.getModel().getModules(); }
java
public static String getVcsRevision(Map<String, String> env) { String revision = env.get("SVN_REVISION"); if (StringUtils.isBlank(revision)) { revision = env.get(GIT_COMMIT); } if (StringUtils.isBlank(revision)) { revision = env.get("P4_CHANGELIST"); } ...
java
public static String getVcsUrl(Map<String, String> env) { String url = env.get("SVN_URL"); if (StringUtils.isBlank(url)) { url = publicGitUrl(env.get("GIT_URL")); } if (StringUtils.isBlank(url)) { url = env.get("P4PORT"); } return url; }
java
private static long daysBetween(Date date1, Date date2) { long diff; if (date2.after(date1)) { diff = date2.getTime() - date1.getTime(); } else { diff = date1.getTime() - date2.getTime(); } return diff / (24 * 60 * 60 * 1000); }
java
public static List<String> getBuildNumbersNotToBeDeleted(Run build) { List<String> notToDelete = Lists.newArrayList(); List<? extends Run<?, ?>> builds = build.getParent().getBuilds(); for (Run<?, ?> run : builds) { if (run.isKeepLog()) { notToDelete.add(String.valueO...
java
public static String entityToString(HttpEntity entity) throws IOException { if (entity != null) { InputStream is = entity.getContent(); return IOUtils.toString(is, "UTF-8"); } return ""; }
java
public static FilePath createAndGetTempDir(final FilePath ws) throws IOException, InterruptedException { // The token that combines the project name and unique number to create unique workspace directory. String workspaceList = System.getProperty("hudson.slaves.WorkspaceList"); return ws.act(new...
java
@Override public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) { //listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal()); //listener.getLogger().println("[MavenDep...
java
@Override public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener) throws InterruptedException, IOException { build.executeAsync(new BuildCallable<Void, IOException>() { // record is transient, so needs to make a copy first private final S...
java
public static CredentialsConfig getPreferredDeployer(DeployerOverrider deployerOverrider, ArtifactoryServer server) { if (deployerOverrider.isOverridingDefaultDeployer()) { CredentialsConfig deployerCredentialsConfig = deployerOverrider.getDeployerCredentialsConfig(); if (deployerCredent...
java
@Override public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { listener.getLogger().println("Jenkins Artifactory Plugin version: " + ActionableHelper.getArtifactoryPluginVersion()); EnvVars env = build.get...
java
public boolean perform(Run<?, ?> build, Launcher launcher, TaskListener listener, EnvVars env, FilePath workDir, FilePath tempDir) throws InterruptedException, IOException { listener.getLogger().println("Jenkins Artifactory Plugin version: " + ActionableHelper.getArtifactoryPluginVersion()); ...
java
private FilePath copyClassWorldsFile(FilePath ws, URL resource) { try { FilePath remoteClassworlds = ws.createTextTempFile("classworlds", "conf", ""); remoteClassworlds.copyFrom(resource); return remoteClassworlds; } catch (Exception e) { ...
java
public static <T extends Publisher> T getPublisher(AbstractProject<?, ?> project, Class<T> type) { // Search for a publisher of the given type in the project and return it if found: T publisher = new PublisherFindImpl<T>().find(project, type); if (publisher != null) { return publishe...
java
public static String getArtifactoryPluginVersion() { String pluginsSortName = "artifactory"; //Validates Jenkins existence because in some jobs the Jenkins instance is unreachable if (Jenkins.getInstance() != null && Jenkins.getInstance().getPlugin(pluginsSortName) != null ...
java
public static void deleteFilePath(FilePath workspace, String path) throws IOException { if (StringUtils.isNotBlank(path)) { try { FilePath propertiesFile = new FilePath(workspace, path); propertiesFile.delete(); } catch (Exception e) { thro...
java
public String getRemoteUrl(String defaultRemoteUrl) { if (StringUtils.isBlank(defaultRemoteUrl)) { RemoteConfig remoteConfig = getJenkinsScm().getRepositories().get(0); URIish uri = remoteConfig.getURIs().get(0); return uri.toPrivateString(); } return default...
java
public String getRepoKey() { String repoKey; if (isDynamicMode()) { repoKey = keyFromText; } else { repoKey = keyFromSelect; } return repoKey; }
java
public void collectVariables(EnvVars env, Run build, TaskListener listener) { EnvVars buildParameters = Utils.extractBuildParameters(build, listener); if (buildParameters != null) { env.putAll(buildParameters); } addAllWithFilter(envVars, env, filter.getPatternFilter()); ...
java
protected void append(Env env) { addAllWithFilter(this.envVars, env.envVars, filter.getPatternFilter()); addAllWithFilter(this.sysVars, env.sysVars, filter.getPatternFilter()); }
java
private void addAllWithFilter(Map<String, String> toMap, Map<String, String> fromMap, IncludeExcludePatterns pattern) { for (Object o : fromMap.entrySet()) { Map.Entry entry = (Map.Entry) o; String key = (String) entry.getKey(); if (PatternMatcher.pathConflicts(key, pattern))...
java
public void credentialsMigration(T overrider, Class overriderClass) { try { deployerMigration(overrider, overriderClass); resolverMigration(overrider, overriderClass); } catch (NoSuchFieldException | IllegalAccessException | IOException e) { converterErrors.add(getCon...
java
private ServerDetails createInitialResolveDetailsFromDeployDetails(ServerDetails deployerDetails) { RepositoryConf oldResolveRepositoryConfig = deployerDetails.getResolveReleaseRepository(); RepositoryConf oldSnapshotResolveRepositoryConfig = deployerDetails.getResolveSnapshotRepository(); Repos...
java
private ServerDetails createInitialDeployDetailsFromOldDeployDetails(ServerDetails oldDeployerDetails) { RepositoryConf oldDeployRepositoryConfig = oldDeployerDetails.getDeployReleaseRepository(); RepositoryConf oldSnapshotDeployRepositoryConfig = oldDeployerDetails.getDeploySnapshotRepository(); ...
java
private static Properties loadGradleProperties(FilePath gradlePropertiesFilePath) throws IOException, InterruptedException { return gradlePropertiesFilePath.act(new MasterToSlaveFileCallable<Properties>() { public Properties invoke(File gradlePropertiesFile, VirtualChannel channel) throw...
java
public Module generateBuildInfoModule(Run build, TaskListener listener, ArtifactoryConfigurator config, String buildName, String buildNumber, String timestamp) throws IOException { if (artifactsProps == null) { artifactsProps = ArrayListMultimap.create(); } artifactsProps.put("build....
java
private boolean findAndSetManifestFromArtifactory(ArtifactoryServer server, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException { String candidateImagePath = DockerUtils.getImagePath(imageTag); String manifestPath; // Try to get manifest, assuming reverse...
java
private boolean checkAndSetManifestAndImagePathCandidates(String manifestPath, String candidateImagePath, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException { String candidateManifest = getManifestFromArtifactory(dependenciesClient, manifestPath); if (candidateMa...
java
private List<org.jfrog.hudson.pipeline.types.File> getBuildFilesList(Stream<? extends BaseBuildFileBean> buildFilesStream) { return buildFilesStream .filter(buildFile -> StringUtils.isNotBlank(buildFile.getLocalPath())) .filter(buildFile -> StringUtils.isNotBlank(buildFile.getRem...
java
public List<Integer> getConnectionRetries() { List<Integer> items = new ArrayList<Integer>(); for (int i = 0; i < 10; i++) { items.add(i); } return items; }
java
public CredentialsConfig getResolvingCredentialsConfig() { if (resolverCredentialsConfig != null && resolverCredentialsConfig.isCredentialsProvided()) { return getResolverCredentialsConfig(); } if (deployerCredentialsConfig != null) { return getDeployerCredentialsConfig()...
java
public Boolean invoke(File pomFile, VirtualChannel channel) throws IOException, InterruptedException { org.jfrog.build.extractor.maven.reader.ModuleName current = new org.jfrog.build.extractor.maven.reader.ModuleName( currentModule.groupId, currentModule.artifactId); Map<org.jfrog.buil...
java
public void edit(int currentChangeListId, FilePath filePath) throws Exception { establishConnection().editFile(currentChangeListId, new File(filePath.getRemote())); }
java
private void convertJdkPath(Launcher launcher, EnvVars extendedEnv) { String separator = launcher.isUnix() ? "/" : "\\"; String java_home = extendedEnv.get("JAVA_HOME"); if (StringUtils.isNotEmpty(java_home)) { if (!StringUtils.endsWith(java_home, separator)) { java_h...
java
public static AbstractBuild<?, ?> getRootBuild(AbstractBuild<?, ?> currentBuild) { AbstractBuild<?, ?> rootBuild = null; AbstractBuild<?, ?> parentBuild = getUpstreamBuild(currentBuild); while (parentBuild != null) { if (isPassIdentifiedDownstream(parentBuild)) { root...
java
private static AbstractProject<?, ?> getProject(String fullName) { Item item = Hudson.getInstance().getItemByFullName(fullName); if (item != null && item instanceof AbstractProject) { return (AbstractProject<?, ?>) item; } return null; }
java