mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
Consistent indentation with spaces rather than tabs (#6147)
This commit is contained in:
1 parent
0303e31890
commit
02eecd8a49
26 files changed
+420
-417
No files matched your search
@@ -1183,31 +1183,31 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
* Creates a hudson.PluginStrategy, looking at the corresponding system property.
|
||||
*/
|
||||
protected PluginStrategy createPluginStrategy() {
|
||||
String strategyName = SystemProperties.getString(PluginStrategy.class.getName());
|
||||
if (strategyName != null) {
|
||||
try {
|
||||
Class<?> klazz = getClass().getClassLoader().loadClass(strategyName);
|
||||
Object strategy = klazz.getConstructor(PluginManager.class)
|
||||
.newInstance(this);
|
||||
if (strategy instanceof PluginStrategy) {
|
||||
LOGGER.info("Plugin strategy: " + strategyName);
|
||||
return (PluginStrategy) strategy;
|
||||
} else {
|
||||
LOGGER.warning("Plugin strategy (" + strategyName +
|
||||
") is not an instance of hudson.PluginStrategy");
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
LOGGER.warning("Plugin strategy class not found: "
|
||||
+ strategyName);
|
||||
} catch (Exception e) {
|
||||
LOGGER.log(WARNING, "Could not instantiate plugin strategy: "
|
||||
+ strategyName + ". Falling back to ClassicPluginStrategy", e);
|
||||
}
|
||||
LOGGER.info("Falling back to ClassicPluginStrategy");
|
||||
}
|
||||
String strategyName = SystemProperties.getString(PluginStrategy.class.getName());
|
||||
if (strategyName != null) {
|
||||
try {
|
||||
Class<?> klazz = getClass().getClassLoader().loadClass(strategyName);
|
||||
Object strategy = klazz.getConstructor(PluginManager.class)
|
||||
.newInstance(this);
|
||||
if (strategy instanceof PluginStrategy) {
|
||||
LOGGER.info("Plugin strategy: " + strategyName);
|
||||
return (PluginStrategy) strategy;
|
||||
} else {
|
||||
LOGGER.warning("Plugin strategy (" + strategyName +
|
||||
") is not an instance of hudson.PluginStrategy");
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
LOGGER.warning("Plugin strategy class not found: "
|
||||
+ strategyName);
|
||||
} catch (Exception e) {
|
||||
LOGGER.log(WARNING, "Could not instantiate plugin strategy: "
|
||||
+ strategyName + ". Falling back to ClassicPluginStrategy", e);
|
||||
}
|
||||
LOGGER.info("Falling back to ClassicPluginStrategy");
|
||||
}
|
||||
|
||||
// default and fallback
|
||||
return new ClassicPluginStrategy(this);
|
||||
// default and fallback
|
||||
return new ClassicPluginStrategy(this);
|
||||
}
|
||||
|
||||
public PluginStrategy getPluginStrategy() {
|
||||
@@ -1498,8 +1498,8 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
for (UpdateSite.Plugin plugin: site.getAvailables()) {
|
||||
JSONObject pluginInfo = allPlugins.get(plugin.name);
|
||||
if(pluginInfo == null) {
|
||||
pluginInfo = new JSONObject();
|
||||
pluginInfo.put("installed", false);
|
||||
pluginInfo = new JSONObject();
|
||||
pluginInfo.put("installed", false);
|
||||
}
|
||||
pluginInfo.put("name", plugin.name);
|
||||
pluginInfo.put("title", plugin.getDisplayName());
|
||||
|
||||
Reference in new issue
Block a user