Skip to content

Commit e71d54d

Browse files
committed
LDEV-6048 fix loader LUCEE_VERSION warning check
1 parent a97459b commit e71d54d

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

loader/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project default="core" basedir="." name="Lucee"
33
xmlns:resolver="antlib:org.apache.maven.resolver.ant">
44

5-
<property name="version" value="7.0.2.34-SNAPSHOT"/>
5+
<property name="version" value="7.0.2.35-SNAPSHOT"/>
66

77
<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
88
<classpath>

loader/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>org.lucee</groupId>
55
<artifactId>lucee</artifactId>
6-
<version>7.0.2.34-SNAPSHOT</version>
6+
<version>7.0.2.35-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>Lucee Loader Build</name>

loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,15 +539,22 @@ private void initEngine() throws ServletException {
539539
}
540540
String tmp = getSystemPropOrEnvVar("lucee.version", null);
541541
Version specificVersion = (!Util.isEmpty(tmp, true)) ? toVersion(tmp, null) : null;
542-
// a specific version cannot be older than the core version
542+
// validate the specific version if one was requested
543543
if (specificVersion != null) {
544-
if (Util.isNewerThan(MIN_VERSION, specificVersion)) {
545-
log(org.apache.felix.resolver.Logger.LOG_ERROR, "the version defined [" + specificVersion + "] cannot be used, version cannot be older than [" + MIN_VERSION + "]");
544+
if (specificVersion.equals(coreVersion)) {
545+
// requested version matches the current core version, just use it
546+
log(org.apache.felix.resolver.Logger.LOG_DEBUG, "specific version [" + specificVersion + "] matches core version.");
547+
}
548+
else if (Util.isNewerThan(MIN_VERSION, specificVersion)) {
549+
log(org.apache.felix.resolver.Logger.LOG_ERROR,
550+
"Lucee version requested [" + specificVersion + "] via system property 'lucee.version' or environment variable 'LUCEE_VERSION' cannot be used, this loader requires at least version ["
551+
+ MIN_VERSION + "].");
546552
specificVersion = null;
547553
}
548-
else if (MAX_VERSION != null && Util.isNewerThan(MAX_VERSION, specificVersion)) {
549-
log(org.apache.felix.resolver.Logger.LOG_ERROR, "the version defined [" + specificVersion + "] cannot be used, version cannot be newver than [" + MAX_VERSION
550-
+ "], update yout lucee.jar to use this version.");
554+
else if (MAX_VERSION != null && Util.isNewerThan(specificVersion, MAX_VERSION)) {
555+
log(org.apache.felix.resolver.Logger.LOG_ERROR,
556+
"Lucee version requested [" + specificVersion + "] via system property 'lucee.version' or environment variable 'LUCEE_VERSION' cannot be used, this loader only supports versions up to ["
557+
+ MAX_VERSION + "].");
551558
specificVersion = null;
552559
}
553560
else {

0 commit comments

Comments
 (0)