diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index f3fa40a971..8612d6517e 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -1159,11 +1159,11 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces try { InetAddress ia = InetAddress.getByName(address); if(!(ia instanceof Inet4Address)) { - LOGGER.fine(address+" is not an IPv4 address"); + LOGGER.log(Level.FINE, "{0} is not an IPv4 address", address); continue; } if(!ComputerPinger.checkIsReachable(ia, 3)) { - LOGGER.fine(address+" didn't respond to ping"); + LOGGER.log(Level.FINE, "{0} didn't respond to ping", address); continue; } cachedHostName = ia.getCanonicalHostName(); @@ -1171,7 +1171,10 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces return cachedHostName; } catch (IOException e) { // if a given name fails to parse on this host, we get this error - LOGGER.log(Level.FINE, "Failed to parse "+address,e); + LogRecord lr = new LogRecord(Level.FINE, "Failed to parse {0}"); + lr.setThrown(e); + lr.setParameters(new Object[]{address}); + LOGGER.log(lr); } } @@ -1195,27 +1198,29 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces } private static class ListPossibleNames extends MasterToSlaveCallable,IOException> { + private static final Logger LOGGER = Logger.getLogger(ListPossibleNames.class.getName()); + public List call() throws IOException { List names = new ArrayList(); Enumeration nis = NetworkInterface.getNetworkInterfaces(); while (nis.hasMoreElements()) { NetworkInterface ni = nis.nextElement(); - LOGGER.fine("Listing up IP addresses for "+ni.getDisplayName()); + LOGGER.log(Level.FINE, "Listing up IP addresses for {0}", ni.getDisplayName()); Enumeration e = ni.getInetAddresses(); while (e.hasMoreElements()) { InetAddress ia = e.nextElement(); if(ia.isLoopbackAddress()) { - LOGGER.fine(ia+" is a loopback address"); + LOGGER.log(Level.FINE, "{0} is a loopback address", ia); continue; } if(!(ia instanceof Inet4Address)) { - LOGGER.fine(ia+" is not an IPv4 address"); + LOGGER.log(Level.FINE, "{0} is not an IPv4 address", ia); continue; } - LOGGER.fine(ia+" is a viable candidate"); + LOGGER.log(Level.FINE, "{0} is a viable candidate", ia); names.add(ia.getHostAddress()); } } diff --git a/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java b/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java index 4bd1c939c6..67d33c7227 100644 --- a/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java +++ b/core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java @@ -37,6 +37,8 @@ import java.math.BigDecimal; import java.text.ParseException; import java.util.Locale; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.stapler.export.ExportedBean; import org.kohsuke.stapler.export.Exported; @@ -81,6 +83,14 @@ public abstract class DiskSpaceMonitorDescriptor extends AbstractAsyncNodeMonito return path; } + // Needed for jelly that does not seem to be able to access properties + // named 'size' as it confuses it with built-in size method and fails + // to parse the expression expecting '()'. + @Restricted(DoNotUse.class) + public long getFreeSize() { + return size; + } + /** * Gets GB left. */ diff --git a/core/src/main/resources/hudson/model/AbstractProject/help-assignedLabelString.html b/core/src/main/resources/hudson/model/AbstractProject/help-label.html similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/help-assignedLabelString.html rename to core/src/main/resources/hudson/model/AbstractProject/help-label.html diff --git a/core/src/main/resources/hudson/model/AbstractProject/help-assignedLabelString_zh_TW.html b/core/src/main/resources/hudson/model/AbstractProject/help-label_zh_TW.html similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/help-assignedLabelString_zh_TW.html rename to core/src/main/resources/hudson/model/AbstractProject/help-label_zh_TW.html diff --git a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly index c71982967e..81a19eb0a9 100644 --- a/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly +++ b/core/src/main/resources/hudson/node_monitors/DiskSpaceMonitor/column.jelly @@ -29,7 +29,7 @@ THE SOFTWARE. N/A - + - \ No newline at end of file + diff --git a/core/src/main/resources/hudson/node_monitors/SwapSpaceMonitor/column.jelly b/core/src/main/resources/hudson/node_monitors/SwapSpaceMonitor/column.jelly index 5a817a5305..35fa757e79 100644 --- a/core/src/main/resources/hudson/node_monitors/SwapSpaceMonitor/column.jelly +++ b/core/src/main/resources/hudson/node_monitors/SwapSpaceMonitor/column.jelly @@ -32,4 +32,4 @@ THE SOFTWARE. - \ No newline at end of file + diff --git a/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly b/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly index ac42d83e35..5c1a410d1b 100644 --- a/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly +++ b/core/src/main/resources/hudson/node_monitors/TemporarySpaceMonitor/column.jelly @@ -29,7 +29,7 @@ THE SOFTWARE. N/A - + - \ No newline at end of file + diff --git a/pom.xml b/pom.xml index a87f7ee19d..defd8f484c 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ THE SOFTWARE. org.jenkins-ci.main remoting - 2.50 + 2.52