提交 725fb302 编写于 作者: D Daniel Beck

Update Javadocs and comments

上级 d1c972a0
...@@ -1719,6 +1719,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas ...@@ -1719,6 +1719,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if (toInstall.isForNewerHudson()) { if (toInstall.isForNewerHudson()) {
LOGGER.log(WARNING, "{0}@{1} was built for a newer Jenkins", new Object[] {toInstall.name, toInstall.version}); LOGGER.log(WARNING, "{0}@{1} was built for a newer Jenkins", new Object[] {toInstall.name, toInstall.version});
} }
// TODO check Java dependency
jobs.add(toInstall.deploy(true)); jobs.add(toInstall.deploy(true));
} else if (pw.isOlderThan(requestedPlugin.getValue())) { // upgrade } else if (pw.isOlderThan(requestedPlugin.getValue())) { // upgrade
UpdateSite.Plugin toInstall = uc.getPlugin(requestedPlugin.getKey()); UpdateSite.Plugin toInstall = uc.getPlugin(requestedPlugin.getKey());
...@@ -1736,6 +1737,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas ...@@ -1736,6 +1737,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if (toInstall.isForNewerHudson()) { if (toInstall.isForNewerHudson()) {
LOGGER.log(WARNING, "{0}@{1} was built for a newer Jenkins", new Object[] {toInstall.name, toInstall.version}); LOGGER.log(WARNING, "{0}@{1} was built for a newer Jenkins", new Object[] {toInstall.name, toInstall.version});
} }
// TODO check Java dependency
if (!toInstall.isCompatibleWithInstalledVersion()) { if (!toInstall.isCompatibleWithInstalledVersion()) {
LOGGER.log(WARNING, "{0}@{1} is incompatible with the installed @{2}", new Object[] {toInstall.name, toInstall.version, pw.getVersion()}); LOGGER.log(WARNING, "{0}@{1} is incompatible with the installed @{2}", new Object[] {toInstall.name, toInstall.version, pw.getVersion()});
} }
......
...@@ -1108,8 +1108,11 @@ public class UpdateSite { ...@@ -1108,8 +1108,11 @@ public class UpdateSite {
} }
/** /**
* Returns true iff the plugin declares a minimum Java version and it's newer than what the Jenkins master is running on.
*
* @return true iff the plugin declares a minimum Java version and it's newer than what the Jenkins master is running on.
*
* @since TODO * @since TODO
* @return
*/ */
public boolean isForNewerJava() { public boolean isForNewerJava() {
try { try {
...@@ -1135,8 +1138,11 @@ public class UpdateSite { ...@@ -1135,8 +1138,11 @@ public class UpdateSite {
} }
/** /**
* Returns the minimum Java version needed to use the plugin and all its dependencies.
*
* @return the minimum Java version needed to use the plugin and all its dependencies.
*
* @since TODO * @since TODO
* @return
*/ */
public VersionNumber getNeededDependenciesRequiredJava() { public VersionNumber getNeededDependenciesRequiredJava() {
VersionNumber versionNumber = null; VersionNumber versionNumber = null;
...@@ -1173,6 +1179,13 @@ public class UpdateSite { ...@@ -1173,6 +1179,13 @@ public class UpdateSite {
}); });
} }
/**
* Returns true iff this plugin or any of its dependencies require a newer Java than Jenkins is running on.
*
* @return true iff this plugin or any of its dependencies require a newer Java than Jenkins is running on.
*
* @since TODO
*/
public boolean isNeededDependenciesForNewerJava() { public boolean isNeededDependenciesForNewerJava() {
for (Plugin p: getNeededDependencies()) { for (Plugin p: getNeededDependencies()) {
if (p.isForNewerJava() || p.isNeededDependenciesForNewerJava()) { if (p.isForNewerJava() || p.isNeededDependenciesForNewerJava()) {
......
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
} }
.compatWarning, .securityWarning { .compatWarning, .securityWarning {
font-weight: bold; font-weight: bold;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册