提交 19468588 编写于 作者: K Kohsuke Kawaguchi

check for Oracle account and report if not found

上级 15bc48d8
......@@ -49,6 +49,7 @@ import org.apache.commons.io.IOUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.Stapler;
import javax.servlet.ServletException;
import java.io.ByteArrayInputStream;
......@@ -582,12 +583,11 @@ public class JDKInstaller extends ToolInstaller {
}
public FormValidation doCheckId(@QueryParameter String value) {
if (Util.fixEmpty(value) == null) {
if (Util.fixEmpty(value) == null)
return FormValidation.error(Messages.JDKInstaller_DescriptorImpl_doCheckId()); // improve message
} else {
// XXX further checks?
return FormValidation.ok();
}
if (username==null || password==null)
return FormValidation.errorWithMarkup(Messages.JDKInstaller_RequireOracleAccount(Stapler.getCurrentRequest().getContextPath()+getDescriptorUrl()));
return FormValidation.ok();
}
/**
......
......@@ -25,6 +25,7 @@ CommandInstaller.DescriptorImpl.displayName=Run Command
CommandInstaller.no_command=Must provide a command to run.
CommandInstaller.no_toolHome=Must provide a tool home directory.
JDKInstaller.FailedToInstallJDK=Failed to install JDK. Exit code={0}
JDKInstaller.RequireOracleAccount=Installing JDK requires Oracle account. <a href="{0}">Please enter your username/password</a>
JDKInstaller.UnableToInstallUntilLicenseAccepted=Unable to auto-install JDK until the license is accepted.
ZipExtractionInstaller.DescriptorImpl.displayName=Extract *.zip/*.tar.gz
ZipExtractionInstaller.bad_connection=Server rejected connection.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册