From 5dafc5f84447a61df12cb31324150de9f477857b Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 16 Feb 2021 08:48:15 -0800 Subject: [PATCH] Remove support for Swarm clients older than 3.21 --- .../java/hudson/plugins/swarm/PluginImpl.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/plugin/src/main/java/hudson/plugins/swarm/PluginImpl.java b/plugin/src/main/java/hudson/plugins/swarm/PluginImpl.java index 1b483894..9b3b0dba 100644 --- a/plugin/src/main/java/hudson/plugins/swarm/PluginImpl.java +++ b/plugin/src/main/java/hudson/plugins/swarm/PluginImpl.java @@ -286,29 +286,4 @@ private static List parseEnvironmentVari return result; } - - /** - * This merely exists to support older versions of the Swarm client that expect to be able to - * retrieve a UUID-based secret. Security is now handled through CSRF and permission checks - * rather than a UUID-based secret. Newer clients do not call this method or pass in a - * UUID-based secret, and newer versions of the server do not check for a UUID-based secret. - * When support for older clients that call this endpoint is removed, this endpoint can be - * deleted. - */ - @Deprecated - @SuppressFBWarnings( - value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE", - justification = "False positive for try-with-resources in Java 11") - public void doSlaveInfo(StaplerRequest req, StaplerResponse rsp) throws IOException { - Jenkins jenkins = Jenkins.get(); - jenkins.checkPermission(Computer.CREATE); - - rsp.setContentType("text/xml"); - try (Writer writer = rsp.getCompressedWriter(req)) { - writer.write( - "" - + UUID.randomUUID().toString() - + ""); - } - } }