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

Update Javadocs and comments

上级 d1c972a0
......@@ -1719,6 +1719,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if (toInstall.isForNewerHudson()) {
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));
} else if (pw.isOlderThan(requestedPlugin.getValue())) { // upgrade
UpdateSite.Plugin toInstall = uc.getPlugin(requestedPlugin.getKey());
......@@ -1736,6 +1737,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if (toInstall.isForNewerHudson()) {
LOGGER.log(WARNING, "{0}@{1} was built for a newer Jenkins", new Object[] {toInstall.name, toInstall.version});
}
// TODO check Java dependency
if (!toInstall.isCompatibleWithInstalledVersion()) {
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 {
}
/**
* 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
* @return
*/
public boolean isForNewerJava() {
try {
......@@ -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
* @return
*/
public VersionNumber getNeededDependenciesRequiredJava() {
VersionNumber versionNumber = null;
......@@ -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() {
for (Plugin p: getNeededDependencies()) {
if (p.isForNewerJava() || p.isNeededDependenciesForNewerJava()) {
......
......@@ -10,4 +10,4 @@
}
.compatWarning, .securityWarning {
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.
先完成此消息的编辑!
想要评论请 注册