warning if not stable release
This commit is contained in:
parent
695b63fc78
commit
5f7a32e30e
|
@ -343,6 +343,9 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
ShutdownMonitor.getInstance().start(); // initialize
|
||||
|
||||
LOG.info("jetty-" + getVersion());
|
||||
if (!Jetty.STABLE)
|
||||
LOG.warn("THIS IS NOT A STABLE RELEASE! DO NOT USE IN PRODUCTION!");
|
||||
|
||||
HttpGenerator.setJettyVersion(HttpConfiguration.SERVER_VERSION);
|
||||
MultiException mex=new MultiException();
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ public class Jetty
|
|||
{
|
||||
public static final String VERSION;
|
||||
public static final String POWERED_BY;
|
||||
public static final boolean STABLE;
|
||||
|
||||
static
|
||||
{
|
||||
|
@ -34,6 +35,14 @@ public class Jetty
|
|||
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;
|
||||
}
|
||||
|
||||
private Jetty()
|
||||
|
|
Loading…
Reference in New Issue