Skip to content

Commit 633b7d6

Browse files
committed
LDEV-6048 fix loader LUCEE_VERSION warning check
1 parent c3be495 commit 633b7d6

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="6.2.5.17-SNAPSHOT"/>
5+
<property name="version" value="6.2.5.18-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>6.2.5.17-SNAPSHOT</version>
6+
<version>6.2.5.18-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
@@ -534,15 +534,22 @@ private void initEngine() throws ServletException {
534534
}
535535
String tmp = Util._getSystemPropOrEnvVar("lucee.version", null);
536536
Version specificVersion = (!Util.isEmpty(tmp, true)) ? toVersion(tmp, null) : null;
537-
// a specific version cannot be older than the core version
537+
// validate the specific version if one was requested
538538
if (specificVersion != null) {
539-
if (Util.isNewerThan(MIN_VERSION, specificVersion)) {
540-
log(org.apache.felix.resolver.Logger.LOG_ERROR, "the version defined [" + specificVersion + "] cannot be used, version cannot be older than [" + MIN_VERSION + "]");
539+
if (specificVersion.equals(coreVersion)) {
540+
// requested version matches the current core version, just use it
541+
log(org.apache.felix.resolver.Logger.LOG_DEBUG, "specific version [" + specificVersion + "] matches core version.");
542+
}
543+
else if (Util.isNewerThan(MIN_VERSION, specificVersion)) {
544+
log(org.apache.felix.resolver.Logger.LOG_ERROR,
545+
"Lucee version requested [" + specificVersion + "] via system property 'lucee.version' or environment variable 'LUCEE_VERSION' cannot be used, this loader requires at least version ["
546+
+ MIN_VERSION + "].");
541547
specificVersion = null;
542548
}
543-
else if (Util.isNewerThan(MAX_VERSION, specificVersion)) {
544-
log(org.apache.felix.resolver.Logger.LOG_ERROR, "the version defined [" + specificVersion + "] cannot be used, version cannot be newver than [" + MAX_VERSION
545-
+ "], update yout lucee.jar to use this version.");
549+
else if (Util.isNewerThan(specificVersion, MAX_VERSION)) {
550+
log(org.apache.felix.resolver.Logger.LOG_ERROR,
551+
"Lucee version requested [" + specificVersion + "] via system property 'lucee.version' or environment variable 'LUCEE_VERSION' cannot be used, this loader only supports versions up to ["
552+
+ MAX_VERSION + "].");
546553
specificVersion = null;
547554
}
548555
else {

0 commit comments

Comments
 (0)