Limiting versions that trigger !STABLE warning
+ Only RC# and M# trigger warning now. + Warning includes URL for where to download stable version.
This commit is contained in:
parent
ef84beb7d4
commit
ff1ca8d993
|
@ -344,7 +344,10 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
|
||||
LOG.info("jetty-" + getVersion());
|
||||
if (!Jetty.STABLE)
|
||||
{
|
||||
LOG.warn("THIS IS NOT A STABLE RELEASE! DO NOT USE IN PRODUCTION!");
|
||||
LOG.warn("Download a stable release from http://download.eclipse.org/jetty/");
|
||||
}
|
||||
|
||||
HttpGenerator.setJettyVersion(HttpConfiguration.SERVER_VERSION);
|
||||
MultiException mex=new MultiException();
|
||||
|
|
|
@ -33,16 +33,11 @@ public class Jetty
|
|||
VERSION = pkg.getImplementationVersion();
|
||||
else
|
||||
VERSION = System.getProperty("jetty.version", "9.3.z-SNAPSHOT");
|
||||
|
||||
|
||||
POWERED_BY="<a href=\"http://eclipse.org/jetty\">Powered by Jetty:// "+VERSION+"</a>";
|
||||
|
||||
boolean stable=true;
|
||||
for (char c: VERSION.toCharArray())
|
||||
{
|
||||
if (c!='.' && !Character.isDigit(c))
|
||||
stable=false;
|
||||
}
|
||||
STABLE=stable;
|
||||
|
||||
// Show warning when RC# or M# is in version string
|
||||
STABLE = !VERSION.matches("^.*\\.(RC|M)[0-9]+$");
|
||||
}
|
||||
|
||||
private Jetty()
|
||||
|
|
Loading…
Reference in New Issue