* If you access this field from agents, then this is the environment
- * variable of the agent agent.
+ * variable of the agent.
*/
public static final Map
+ * @return by default: {@link #getFullDisplayName()}
+ *
+ * @see hudson.model.LoadBalancer
+ */
+ default String getAffinityKey() { return getFullDisplayName(); }
+
/**
* Checks the permission to see if the current user can abort this executable.
* Returns normally from this method if it's OK.
diff --git a/core/src/main/java/hudson/model/UpdateCenter.java b/core/src/main/java/hudson/model/UpdateCenter.java
index dc43a4ef90..49d2025ea7 100644
--- a/core/src/main/java/hudson/model/UpdateCenter.java
+++ b/core/src/main/java/hudson/model/UpdateCenter.java
@@ -1401,7 +1401,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
status = new Running();
try {
// safeRestart records the current authentication for the log, so set it to the managing user
- try (ACLContext _ = ACL.as(User.get(authentication, false, Collections.emptyMap()))) {
+ try (ACLContext acl = ACL.as(User.get(authentication, false, Collections.emptyMap()))) {
Jenkins.getInstance().safeRestart();
}
} catch (RestartNotSupportedException exception) {
diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java
index 10ccfb1508..c5a2cd260b 100644
--- a/core/src/main/java/hudson/model/UpdateSite.java
+++ b/core/src/main/java/hudson/model/UpdateSite.java
@@ -35,6 +35,7 @@ import hudson.model.UpdateCenter.UpdateCenterJob;
import hudson.util.FormValidation;
import hudson.util.FormValidation.Kind;
import hudson.util.HttpResponses;
+import static jenkins.util.MemoryReductionUtil.*;
import hudson.util.TextFile;
import static java.util.concurrent.TimeUnit.*;
import hudson.util.VersionNumber;
@@ -46,7 +47,6 @@ import java.net.URLEncoder;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -56,6 +56,7 @@ import java.util.TreeMap;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
+import java.util.function.Predicate;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
@@ -485,7 +486,15 @@ public class UpdateSite {
* Is this the legacy default update center site?
*/
public boolean isLegacyDefault() {
- return id.equals(UpdateCenter.PREDEFINED_UPDATE_SITE_ID) && url.startsWith("http://hudson-ci.org/") || url.startsWith("http://updates.hudson-labs.org/");
+ return isHudsonCI() || isUpdatesFromHudsonLabs();
+ }
+
+ private boolean isHudsonCI() {
+ return url != null && UpdateCenter.PREDEFINED_UPDATE_SITE_ID.equals(id) && url.startsWith("http://hudson-ci.org/");
+ }
+
+ private boolean isUpdatesFromHudsonLabs() {
+ return url != null && url.startsWith("http://updates.hudson-labs.org/");
}
/**
@@ -519,7 +528,7 @@ public class UpdateSite {
public final String connectionCheckUrl;
Data(JSONObject o) {
- this.sourceId = (String)o.get("id");
+ this.sourceId = Util.intern((String)o.get("id"));
JSONObject c = o.optJSONObject("core");
if (c!=null) {
core = new Entry(sourceId, c, url);
@@ -549,7 +558,7 @@ public class UpdateSite {
}
}
}
- plugins.put(e.getKey(), p);
+ plugins.put(Util.intern(e.getKey()), p);
}
connectionCheckUrl = (String)o.get("connectionCheckUrl");
@@ -621,8 +630,8 @@ public class UpdateSite {
Entry(String sourceId, JSONObject o, String baseURL) {
this.sourceId = sourceId;
- this.name = o.getString("name");
- this.version = o.getString("version");
+ this.name = Util.intern(o.getString("name"));
+ this.version = Util.intern(o.getString("version"));
// Trim this to prevent issues when the other end used Base64.encodeBase64String that added newlines
// to the end in old commons-codec. Not the case on updates.jenkins-ci.org, but let's be safe.
@@ -730,8 +739,8 @@ public class UpdateSite {
public WarningVersionRange(JSONObject o) {
this.name = Util.fixEmpty(o.optString("name"));
- this.firstVersion = Util.fixEmpty(o.optString("firstVersion"));
- this.lastVersion = Util.fixEmpty(o.optString("lastVersion"));
+ this.firstVersion = Util.intern(Util.fixEmpty(o.optString("firstVersion")));
+ this.lastVersion = Util.intern(Util.fixEmpty(o.optString("lastVersion")));
Pattern p;
try {
p = Pattern.compile(o.getString("pattern"));
@@ -828,13 +837,13 @@ public class UpdateSite {
this.type = Type.UNKNOWN;
}
this.id = o.getString("id");
- this.component = o.getString("name");
+ this.component = Util.intern(o.getString("name"));
this.message = o.getString("message");
this.url = o.getString("url");
if (o.has("versions")) {
- List
- The following trials are currently set up on this instance:
+ The following trials defined on this instance are active now or in the future:
- Start date: ${collector.start}
- End date: ${collector.end}
-
+ Start date: ${collector.start} \
-\u53c2\u8003 \u79bb\u7ebfJenkins\u5b89\u88c5\u6587\u6863\u4e86\u89e3\u672a\u63a5\u5165\u4e92\u8054\u7f51\u65f6\u5b89\u88c5Jenkins\u7684\u66f4\u591a\u4fe1\u606f\u3002
diff --git a/core/src/main/resources/hudson/model/User/builds_zh_CN.properties b/core/src/main/resources/hudson/model/User/builds_zh_CN.properties
deleted file mode 100644
index 88416f2cca..0000000000
--- a/core/src/main/resources/hudson/model/User/builds_zh_CN.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2017, suren
+ End date: ${collector.end}
+ -remoting \u5DE5\u4F5C\u6A21\u5F0F\u662F\u6BD4\u8F83\u5371\u9669\u7684\uFF0C\u901A\u5E38\u6CA1\u6709\u5FC5\u8981\u3002\
- \u5EFA\u8BAE\u7981\u6B62\u8BE5\u6A21\u5F0F\u3002 \
- \u8BF7\u53C2\u8003 cli\u6587\u6863 \u4E86\u89E3\u8BE6\u60C5\u3002
-Disable\ CLI\ over\ Remoting=\u7981\u7528\u8FDC\u7A0B\u547D\u4EE4\u63A5\u53E3
diff --git a/core/src/main/resources/jenkins/CLI/config_zh_CN.properties b/core/src/main/resources/jenkins/CLI/config_zh_CN.properties
deleted file mode 100644
index 3ea951e04c..0000000000
--- a/core/src/main/resources/jenkins/CLI/config_zh_CN.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2018, suren BUILD_URL \u4E00\u6837\u7684\u73AF\u5883\u53D8\u91CF\u3002
-urlIsInvalid=Jenkins \u7684\u6839 URL \u4F3C\u4E4E\u662F\u4E0D\u5408\u6CD5\u7684\u3002\u5B83\u5BF9\u4E8E Jenkins \u7684\u5F88\u591A\u7279\u8272\u662F\u5FC5\u9700\u7684\uFF0C\u4F8B\u5982\uFF1A\u90AE\u4EF6\u901A\u77E5\uFF0C \
- PR \u72B6\u6001\u66F4\u65B0\uFF0C\u4EE5\u53CA\u50CF BUILD_URL \u4E00\u6837\u7684\u73AF\u5883\u53D8\u91CF\u3002
-actionToTake=\u8BF7\u5728 {0} \u63D0\u4F9B\u4E00\u4E2A\u51C6\u786E\u7684\u503C\u3002
-actionUrlContent=Jenkins \u914D\u7F6E
-Dismiss=\u4E0D\u518D\u663E\u793A
diff --git a/core/src/main/resources/jenkins/diagnostics/SecurityIsOffMonitor/message_zh_CN.properties b/core/src/main/resources/jenkins/diagnostics/SecurityIsOffMonitor/message_zh_CN.properties
deleted file mode 100644
index 7ac2a369ab..0000000000
--- a/core/src/main/resources/jenkins/diagnostics/SecurityIsOffMonitor/message_zh_CN.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2018, suren {0}BUILD_URL\u73af\u5883\u53d8\u91cf\u3002
\
- \u63a8\u8350\u7684\u9ed8\u8ba4\u503c\u663e\u793a\u5728\u5c1a\u672a\u4fdd\u5b58\uff0c\u5982\u679c\u53ef\u80fd\u7684\u8bdd\u8fd9\u662f\u6839\u636e\u5f53\u524d\u8bf7\u6c42\u751f\u6210\u7684\u3002 \
- \u6700\u4f73\u5b9e\u8df5\u662f\u8981\u8bbe\u7f6e\u8fd9\u4e2a\u503c\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u9700\u8981\u7528\u5230\u3002\u8fd9\u5c06\u4f1a\u907f\u514d\u5728\u5206\u4eab\u6216\u8005\u67e5\u770b\u94fe\u63a5\u65f6\u7684\u56f0\u60d1\u3002 \
diff --git a/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser_zh_CN.properties b/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser_zh_CN.properties
deleted file mode 100644
index 3fc0ba88b1..0000000000
--- a/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser_zh_CN.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2017-, vivo.com
-# Chinese (Simplified) translated by Gentle Yang
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-Create\ First\ Admin\ User=\u521b\u5efa\u7b2c\u4e00\u4e2a\u7ba1\u7406\u5458\u7528\u6237
diff --git a/core/src/main/resources/jenkins/install/UpgradeWizard/client-scripts_zh_CN.properties b/core/src/main/resources/jenkins/install/UpgradeWizard/client-scripts_zh_CN.properties
deleted file mode 100644
index f5bd72ea5e..0000000000
--- a/core/src/main/resources/jenkins/install/UpgradeWizard/client-scripts_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2017-, vivo.com
-# Chinese (Simplified) translated by Gentle Yang
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-msg.before=\u6b22\u8fce\u4f7f\u7528jenkins {0}%21\u0020
-msg.link=\u73b0\u5728\u66f4\u65b0
-msg.after=\u0020\u4ee5\u83b7\u5f97\u65b0\u7279\u6027
diff --git a/core/src/main/resources/jenkins/install/pluginSetupWizard_zh_CN.properties b/core/src/main/resources/jenkins/install/pluginSetupWizard_zh_CN.properties
deleted file mode 100644
index fdad93d297..0000000000
--- a/core/src/main/resources/jenkins/install/pluginSetupWizard_zh_CN.properties
+++ /dev/null
@@ -1,108 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2017-, vivo.com
-# Chinese (Simplified) translated by Gentle Yang
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-installWizard_welcomePanel_title=\u65b0\u624b\u5165\u95e8
-installWizard_welcomePanel_banner=\u81ea\u5b9a\u4e49Jenkins
-installWizard_welcomePanel_message=\u63d2\u4ef6\u901a\u8fc7\u9644\u52a0\u7279\u6027\u6765\u6269\u5c55Jenkins\u4ee5\u6ee1\u8db3\u4e0d\u540c\u7684\u9700\u6c42\u3002
-installWizard_welcomePanel_recommendedActionTitle=\u5b89\u88c5\u63a8\u8350\u7684\u63d2\u4ef6
-installWizard_welcomePanel_recommendedActionDetails=\u5b89\u88c5Jenkins\u793e\u533a\u63a8\u8350\u7684\u63d2\u4ef6\u3002
-installWizard_welcomePanel_customizeActionTitle=\u9009\u62e9\u63d2\u4ef6\u6765\u5b89\u88c5
-installWizard_welcomePanel_customizeActionDetails=\u9009\u62e9\u5e76\u5b89\u88c5\u6700\u9002\u5408\u7684\u63d2\u4ef6\u3002
-installWizard_jenkinsVersionTitle=Jenkins
-installWizard_offline_title=\u79bb\u7ebf
-installWizard_offline_message=\u8be5Jenkins\u5b9e\u4f8b\u4f3c\u4e4e\u5df2\u79bb\u7ebf\u3002\
-
\
-\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u4e00\u4e2a\u4ee3\u7406\u6216\u8df3\u8fc7\u63d2\u4ef6\u5b89\u88c5\u6765\u9009\u62e9\u7ee7\u7eed\u3002\
-
\
-\u8981\u914d\u7f6e Jenkins URL\u7684\u8bdd\uff0c\u5230\u201cJenkins\u7ba1\u7406\u201d\u9875\u9762\u3002\
-
\u8bbf\u95eeJenkins\u7f51\u7ad9\u4e86\u89e3\u66f4\u591a\u65b0\u7279\u6027\u7684\u4fe1\u606f\u3002 -installWizard_upgradeSkipped_title=\u66f4\u65b0 -installWizard_upgradeSkipped_banner=\u7279\u6027\u672a\u5b89\u88c5 -installWizard_upgradeSkipped_message=
\u5982\u679c\u4f60\u6539\u53d8\u4e3b\u610f\u4e86\uff0c\u8fd8\u53ef\u4ee5\u4ece\u63d2\u4ef6\u7ba1\u7406\u5668\u5b89\u88c5\u65b0\u7279\u6027\u3002
\ -\u8bbf\u95eeJenkins\u5b98\u7f51\uff0c\u4e86\u89e3\u8fd9\u4e9b\u65b0\u7279\u6027\u5982\u4f55\u63d0\u5347Jenkins\u4f53\u9a8c\u3002
-installWizard_upgrading_title=\u6b63\u5728\u5b89\u88c5\u63d2\u4ef6 -installWizard_upgradeComplete_finishButtonLabel=\u5b8c\u6210 diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config_zh_CN.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config_zh_CN.properties deleted file mode 100644 index 0b9eae01ae..0000000000 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config_zh_CN.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2018, suren{0} \u6307\u5B9A\u7684\u3002\u5B83\u7684\u503C\u4F1A\u5728\u91CD\u542F\u65F6\u88AB\u91CD\u7F6E\u4E3A {1,number,#} \u3002
-reset=\u91CD\u7F6E\u4E3A {0,number,#}
diff --git a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/_api_zh_CN.properties b/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/_api_zh_CN.properties
deleted file mode 100644
index fe83665bdf..0000000000
--- a/core/src/main/resources/jenkins/model/Jenkins/MasterComputer/_api_zh_CN.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2018, suren