Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions core/src/main/java/hudson/DNSMultiCast.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
package hudson;

import static hudson.init.InitMilestone.COMPLETED;

import hudson.init.Initializer;
import java.util.logging.Logger;
import jenkins.util.SystemProperties;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

/**
* Registers a DNS multi-cast service-discovery support.
*
* @author Kohsuke Kawaguchi
* @deprecated No longer does anything.
* @deprecated No longer does anything. Only here to prevent errors from old versions of tools like {@code JenkinsRule}.
Copy link
Member Author

Choose a reason for hiding this comment

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

FTR tests still run with the older JenkinsRule

diff --git test/pom.xml test/pom.xml
index 1527fbcdcc..38d5934b15 100644
--- test/pom.xml
+++ test/pom.xml
@@ -81,7 +81,7 @@ THE SOFTWARE.
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>jenkins-test-harness</artifactId>
-      <version>1626.v46b0925e70db</version>
+      <version>1589.vc23fca066d5c</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>

*/
@Deprecated
@Restricted(NoExternalUse.class)
public class DNSMultiCast {
private static final Logger LOGGER = Logger.getLogger(DNSMultiCast.class.getName());

public static boolean disabled = SystemProperties.getBoolean(DNSMultiCast.class.getName()+".disabled", true);

@Initializer(before=COMPLETED)
public static void warn() {
if (!disabled) {
LOGGER.warning("DNS multicast capability has been removed from Jenkins. More information: https://www.jenkins.io/redirect/dns-multicast");
}
}
public static boolean disabled = true;

}
60 changes: 0 additions & 60 deletions core/src/main/java/hudson/UDPBroadcastThread.java

This file was deleted.

1 change: 0 additions & 1 deletion core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@ protected Jenkins(File root, ServletContext context) throws IOException, Interru
* If non-null, use existing plugin manager. create a new one.
*/
@SuppressFBWarnings({
"SC_START_IN_CTOR", // bug in FindBugs. It flags UDPBroadcastThread.start() call but that's for another class
"ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", // Trigger.timer
"DM_EXIT" // Exit is wanted here
})
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/jenkins/util/SystemProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
/**
* Centralizes calls to {@link System#getProperty(String)} and related calls.
* This allows us to get values not just from environment variables but also from
* the {@link ServletContext}, so properties like {@code hudson.DNSMultiCast.disabled}
* the {@link ServletContext}, so properties like {@code jenkins.whatever.Clazz.disabled}
* can be set in {@code context.xml} and the app server's boot script does not
* have to be changed.
*
* <p>This should be used to obtain hudson/jenkins "app"-level parameters
* (e.g. {@code hudson.DNSMultiCast.disabled}), but not for system parameters
* (e.g. {@code jenkins.whatever.Clazz.disabled}), but not for system parameters
* (e.g. {@code os.name}).
*
* <p>If you run multiple instances of Jenkins in the same virtual machine and wish
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ THE SOFTWARE.
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1589.vc23fca066d5c</version>
<version>1626.v46b0925e70db</version>
Copy link
Member

Choose a reason for hiding this comment

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

are the test failures related to updating this?

Copy link
Member

Choose a reason for hiding this comment

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

any idea why dependabot isn't updating this?

updater | INFO <job_213087289> Checking if org.jenkins-ci.main:jenkins-test-harness 1589.vc23fca066d5c needs updating
  proxy | 2021/09/26 19:10:19 [146] GET https://repo.jenkins-ci.org:443/public/org/jenkins-ci/jenkins/1.67/jenkins-1.67.pom
  proxy | 2021/09/26 19:10:19 [146] 200 https://repo.jenkins-ci.org:443/public/org/jenkins-ci/jenkins/1.67/jenkins-1.67.pom
  proxy | 2021/09/26 19:10:19 [148] GET https://repo.jenkins-ci.org:443/public/org/jenkins-ci/main/jenkins-test-harness/maven-metadata.xml
  proxy | 2021/09/26 19:10:19 [148] 200 https://repo.jenkins-ci.org:443/public/org/jenkins-ci/main/jenkins-test-harness/maven-metadata.xml
  proxy | 2021/09/26 19:10:19 [150] GET https://repo.maven.apache.org:443/maven2/org/jenkins-ci/main/jenkins-test-harness/maven-metadata.xml
  proxy | 2021/09/26 19:10:19 [150] 404 https://repo.maven.apache.org:443/maven2/org/jenkins-ci/main/jenkins-test-harness/maven-metadata.xml
  proxy | 2021/09/26 19:10:19 [152] HEAD https://repo.jenkins-ci.org:443/public/org/jenkins-ci/main/jenkins-test-harness/1589.vc23fca066d5c/jenkins-test-harness-1589.vc23fca066d5c.jar
  proxy | 2021/09/26 19:10:19 [152] 200 https://repo.jenkins-ci.org:443/public/org/jenkins-ci/main/jenkins-test-harness/1589.vc23fca066d5c/jenkins-test-harness-1589.vc23fca066d5c.jar
updater | INFO <job_213087289> Latest version is 1589.vc23fca066d5c

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea offhand.

<scope>test</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void pathInfo() throws Exception {
assertThat("error message using " + path, x.getResponse().getContentAsString(), containsString("No valid crumb was included in the request"));
break;
case 400: // from Jetty
assertThat("error message using " + path, x.getResponse().getContentAsString(), containsString("Ambiguous path parameter in URI"));
assertThat("error message using " + path, x.getResponse().getContentAsString(), containsString("Ambiguous path parameter"));
break;
default:
fail("unexpected error code");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void denySemicolonInRequestPathByDefault() throws Exception {
assertThat(Foo.getInstance().baz, is(nullValue()));
assertThat(response.getStatusCode(), is(HttpServletResponse.SC_BAD_REQUEST));
// Actually served by Jetty; never even gets as far as SuspiciousRequestFilter.
assertThat(response.getContentAsString(), containsString("Ambiguous path parameter in URI"));
assertThat(response.getContentAsString(), containsString("Ambiguous path parameter"));
}

@Ignore("No longer passes Jetty")
Expand Down