Skip to content

Commit

Permalink
[JENKINS-15869] reverting the change.
Browse files Browse the repository at this point in the history
"When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A."

This reverts commit 8ad62f7.
  • Loading branch information
kohsuke committed Nov 19, 2012
1 parent 8ad62f7 commit 6465ba0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
3 changes: 0 additions & 3 deletions changelog.html
Expand Up @@ -61,9 +61,6 @@
<li class=bug>
Build records were broken if timezone was changed while running.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15816">issue 15816</a>)
<li class='major bug'>
Linkage errors trying to run Jenkins on Java 5.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15869">issue 15869</a>)
<li class=bug>
Symlink detection refinement on Java 7.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13202">issue 13202</a>)
Expand Down
8 changes: 6 additions & 2 deletions core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java
Expand Up @@ -59,10 +59,9 @@ public String getColumnCaption() {
return Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER) ? super.getColumnCaption() : null;
}

@Extension
public static final DiskSpaceMonitorDescriptor DESCRIPTOR = new DiskSpaceMonitorDescriptor() {
public String getDisplayName() {
return Functions.isMustangOrAbove() ? Messages.DiskSpaceMonitor_DisplayName() : Messages.DiskSpaceMonitor_DisplayName5();
return Messages.DiskSpaceMonitor_DisplayName();
}

protected DiskSpace getFreeSpace(Computer c) throws IOException, InterruptedException {
Expand All @@ -73,4 +72,9 @@ protected DiskSpace getFreeSpace(Computer c) throws IOException, InterruptedExce
}
};

@Extension
public static DiskSpaceMonitorDescriptor install() {
if(Functions.isMustangOrAbove()) return DESCRIPTOR;
return null;
}
}
Expand Up @@ -61,10 +61,9 @@ public String getColumnCaption() {
return Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER) ? super.getColumnCaption() : null;
}

@Extension
public static final DiskSpaceMonitorDescriptor DESCRIPTOR = new DiskSpaceMonitorDescriptor() {
public String getDisplayName() {
return Functions.isMustangOrAbove() ? Messages.TemporarySpaceMonitor_DisplayName() : Messages.TemporarySpaceMonitor_DisplayName5();
return Messages.TemporarySpaceMonitor_DisplayName();
}

protected DiskSpace getFreeSpace(Computer c) throws IOException, InterruptedException {
Expand All @@ -75,6 +74,12 @@ protected DiskSpace getFreeSpace(Computer c) throws IOException, InterruptedExce
}
};

@Extension
public static DiskSpaceMonitorDescriptor install() {
if(Functions.isMustangOrAbove()) return DESCRIPTOR;
return null;
}

protected static final class GetTempSpace implements FileCallable<DiskSpace> {
@IgnoreJRERequirement
public DiskSpace invoke(File f, VirtualChannel channel) throws IOException {
Expand Down
Expand Up @@ -25,10 +25,8 @@ ClockMonitor.DisplayName=Clock Difference
DiskSpaceMonitor.MarkedOffline=Making {0} offline temporarily due to the lack of disk space
DiskSpaceMonitor.MarkedOnline=Putting {0} back online as there is enough disk space again
DiskSpaceMonitor.DisplayName=Free Disk Space
DiskSpaceMonitor.DisplayName5=Free Disk Space (Java 6+)
ResponseTimeMonitor.DisplayName=Response Time
ResponseTimeMonitor.MarkedOffline=Making {0} offline because it''s not responding
ResponseTimeMonitor.TimeOut=Time out for last {0} try
SwapSpaceMonitor.DisplayName=Free Swap Space
TemporarySpaceMonitor.DisplayName=Free Temp Space
TemporarySpaceMonitor.DisplayName5=Free Temp Space (Java 6+)
TemporarySpaceMonitor.DisplayName=Free Temp Space

1 comment on commit 6465ba0

@jglick
Copy link
Member

@jglick jglick commented on 6465ba0 Nov 19, 2012

Choose a reason for hiding this comment

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

This also removed the changelog entry, which I guess you would want to readd for 5eada31.

Please sign in to comment.