Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hudson-core/src/main/java/hudson/FilePath.java2
-rw-r--r--hudson-core/src/main/java/hudson/Util.java4
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java9
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java13
4 files changed, 21 insertions, 7 deletions
diff --git a/hudson-core/src/main/java/hudson/FilePath.java b/hudson-core/src/main/java/hudson/FilePath.java
index 89179f58..3577933d 100644
--- a/hudson-core/src/main/java/hudson/FilePath.java
+++ b/hudson-core/src/main/java/hudson/FilePath.java
@@ -1160,7 +1160,7 @@ public final class FilePath implements Serializable {
try {
mode = NativeUtils.getInstance().mode(f);
} catch (NativeAccessException ex) {
- LOGGER.log(Level.WARNING, "Native function mod failed ({0})", NativeUtils.getInstance().getLastUnixError());
+ LOGGER.log(Level.WARNING, "Native function mod failed.");
}
return mode;
}
diff --git a/hudson-core/src/main/java/hudson/Util.java b/hudson-core/src/main/java/hudson/Util.java
index 0ded91a8..cd94a1c3 100644
--- a/hudson-core/src/main/java/hudson/Util.java
+++ b/hudson-core/src/main/java/hudson/Util.java
@@ -1088,7 +1088,7 @@ public class Util {
try {
NativeUtils.getInstance().chmod(f, mask);
} catch (NativeAccessException exc) {
- LOGGER.log(Level.WARNING, "Native function chmod failed ({0}). Using Ant''s chmod task instead.", NativeUtils.getInstance().getLastUnixError());
+ LOGGER.log(Level.WARNING, "Native function chmod failed. Using Ant''s chmod task instead.");
_chmodAnt(f, mask);
}
} else {
@@ -1124,7 +1124,7 @@ public class Util {
try {
return NativeUtils.getInstance().resolveSymlink(link);
} catch (NativeAccessException exc) {
- listener.getLogger().print("Native function resolveSymlink failed " + NativeUtils.getInstance().getLastUnixError());
+ listener.getLogger().print("Native function resolveSymlink failed ");
}
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java b/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java
index 67509844..614e061e 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java
@@ -109,10 +109,13 @@ final public class PluginCenter {
public List<AvailablePluginInfo> getInstalledPlugins() {
List<AvailablePluginInfo> installedPlugins = new ArrayList<AvailablePluginInfo>();
Set<String> installedPluginNames = installedPluginManager.getInstalledPluginNames();
- Set<String> availablePluginNames = updateSiteManager.getAvailablePluginNames();
- for (String pluginName : availablePluginNames) {
+ for (String pluginName : installedPluginNames) {
AvailablePluginInfo availablePlugin = updateSiteManager.getAvailablePlugin(pluginName);
- if (installedPluginNames.contains(pluginName)) {
+ if (availablePlugin != null) {
+ installedPlugins.add(availablePlugin);
+ } else {
+ InstalledPluginInfo installedPluginInfo = installedPluginManager.getInstalledPlugin(pluginName);
+ availablePlugin = updateSiteManager.createAvailablePluginInfo(installedPluginInfo.getShortName(), installedPluginInfo.getVersion(), installedPluginInfo.getLongName(), installedPluginInfo.getWikiUrl());
installedPlugins.add(availablePlugin);
}
}
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java b/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java
index fdc2951f..b9db1499 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java
@@ -209,6 +209,10 @@ public final class UpdateSiteManager {
return pluginInfos;
}
+
+ AvailablePluginInfo createAvailablePluginInfo(String name, String version, String displayName, String wikiUrl){
+ return new AvailablePluginInfo(name, version, displayName, wikiUrl);
+ }
public final class AvailablePluginInfo implements Comparable<AvailablePluginInfo> {
@@ -217,7 +221,7 @@ public final class UpdateSiteManager {
private String downloadUrl;
private String wikiUrl;
private String displayName;
- private String description;
+ private String description = "";
private String type;
private List<String> categories = new ArrayList<String>();
private String requiredCore;
@@ -227,6 +231,13 @@ public final class UpdateSiteManager {
public AvailablePluginInfo(JSONObject jsonObject) {
parseJsonObject(jsonObject);
}
+
+ public AvailablePluginInfo(String name, String version, String displayName, String wikiUrl){
+ this.name = name;
+ this.version = version;
+ this.displayName = displayName;
+ this.wikiUrl = wikiUrl;
+ }
public String getDisplayName() {
if (displayName != null) {

Back to the top