Skip to content

Commit

Permalink
Merge branch 'master' into update-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Dec 28, 2021
2 parents c296313 + bc43e37 commit 4dba9df
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 476 deletions.
22 changes: 1 addition & 21 deletions core/src/main/java/hudson/WebAppMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
Expand Down Expand Up @@ -337,24 +334,7 @@ public FileAndDescription(File file,String description) {
* @return the File alongside with some description to help the user troubleshoot issues
*/
public FileAndDescription getHomeDir(ServletContextEvent event) {
// check JNDI for the home directory first
for (String name : HOME_NAMES) {
try {
InitialContext iniCtxt = new InitialContext();
Context env = (Context) iniCtxt.lookup("java:comp/env");
String value = (String) env.lookup(name);
if(value!=null && value.trim().length()>0)
return new FileAndDescription(new File(value.trim()),"JNDI/java:comp/env/"+name);
// look at one more place. See issue JENKINS-1314
value = (String) iniCtxt.lookup(name);
if(value!=null && value.trim().length()>0)
return new FileAndDescription(new File(value.trim()),"JNDI/"+name);
} catch (NamingException e) {
// ignore
}
}

// next the system property
// check the system property for the home directory first
for (String name : HOME_NAMES) {
String sysProp = SystemProperties.getString(name);
if(sysProp!=null)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.Functions;
import hudson.Util;
import hudson.search.SearchableModelObject;
Expand All @@ -39,7 +40,6 @@
import jenkins.model.Jenkins;
import jenkins.util.SystemProperties;
import jenkins.util.io.OnMaster;
import jline.internal.Nullable;
import org.kohsuke.stapler.StaplerRequest;

/**
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/hudson/model/Run.java
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,7 @@ public Collection<Fingerprint> getBuildFingerprints() {
*
* @since 1.349
*/
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED", justification = "method signature does not permit plumbing through the return value")
public void writeLogTo(long offset, @NonNull XMLOutput out) throws IOException {
long start = offset;
if (offset > 0) {
Expand Down
209 changes: 0 additions & 209 deletions core/src/main/java/hudson/model/queue/BackFiller.java

This file was deleted.

4 changes: 0 additions & 4 deletions core/src/main/java/hudson/tasks/Fingerprinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,6 @@ public List<Record> invoke(File baseDir, VirtualChannel channel) throws IOExcept
private void record(Run<?,?> build, FilePath ws, TaskListener listener, Map<String,String> record, final String targets) throws IOException, InterruptedException {
for (Record r : ws.act(new FindRecords(targets, excludes, defaultExcludes, caseSensitive, build.getTimeInMillis()))) {
Fingerprint fp = r.addRecord(build);
if(fp==null) {
listener.error(Messages.Fingerprinter_FailedFor(r.relativePath));
continue;
}
fp.addFor(build);
record.put(r.relativePath,fp.getHashString());
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/triggers/SCMTrigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ public AnnotatedLargeText getPollingLogText() {
/**
* Used from {@code polling.jelly} to write annotated polling log to the given output.
*/
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED", justification = "method signature does not permit plumbing through the return value")
public void writePollingLogTo(long offset, XMLOutput out) throws IOException {
// TODO: resurrect compressed log file support
getPollingLogText().writeHtmlTo(offset, out.asWriter());
Expand Down Expand Up @@ -537,6 +538,7 @@ public String getLog() throws IOException {
* Writes the annotated log to the given output.
* @since 1.350
*/
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED", justification = "method signature does not permit plumbing through the return value")
public void writeLogTo(XMLOutput out) throws IOException {
new AnnotatedLargeText<>(getLogFile(), Charset.defaultCharset(), true, this).writeHtmlTo(0,out.asWriter());
}
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/hudson/triggers/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ public void run(AbstractProject p) {
*
* @deprecated Use {@link jenkins.util.Timer#get()} instead.
*/
@SuppressFBWarnings(value = "MS_CANNOT_BE_FINAL", justification = "for backward compatibility")
@Deprecated
public static @CheckForNull Timer timer;

Expand Down
91 changes: 0 additions & 91 deletions core/src/main/java/hudson/util/CharSpool.java

This file was deleted.

Loading

0 comments on commit 4dba9df

Please sign in to comment.