Skip to content

Commit

Permalink
LDEV-4356 - reduce unnecessary file interaction in ExtensionResourceF…
Browse files Browse the repository at this point in the history
…ilter
  • Loading branch information
michaeloffner committed Aug 30, 2024
1 parent 07b381d commit 08e1dd9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ public void addExtension(String extension) {
@Override
public boolean accept(Resource res) {
if (res.isDirectory()) return allowDir;
if (!mustExists || res.exists()) {
String name = res.getName();
for (int i = 0; i < extensions.length; i++) {
if (ignoreCase) {
if (StringUtil.endsWithIgnoreCase(name, extensions[i])) return true;
}
else {
if (name.endsWith(extensions[i])) return true;
}

String name = res.getName();
for (String ext: extensions) {
if (ignoreCase) {
if (StringUtil.endsWithIgnoreCase(name, ext)) return !mustExists || res.exists();
}
else {
if (name.endsWith(ext)) return !mustExists || res.exists();
}
}

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ public static void createContextFiles(Resource configDir, boolean doNew) throws
f = contextDir.getRealResource("Component." + COMPONENT_EXTENSION);
if (f.exists()) delete(contextDir, "Component." + COMPONENT_EXTENSION);

// Component.lucee
// FUTURE remove Component.lucee
f = contextDir.getRealResource("Component." + COMPONENT_EXTENSION_LUCEE);
if (f.exists()) delete(contextDir, "Component." + COMPONENT_EXTENSION_LUCEE);

Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.2.0.65-SNAPSHOT"/>
<property name="version" value="6.2.0.66-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.2.0.65-SNAPSHOT</version>
<version>6.2.0.66-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit 08e1dd9

Please sign in to comment.