Skip to content

Commit

Permalink
remove getRestMappings from ConfigWeb
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Nov 23, 2024
1 parent ab602c3 commit 2f1b88e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 33 deletions.
36 changes: 5 additions & 31 deletions core/src/main/java/lucee/runtime/config/ConfigWebImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public class ConfigWebImpl extends ConfigBase implements ConfigWebPro {
private SCCWIdentificationWeb id;
private Resource rootDir;
private Mapping[] mappings;
private lucee.runtime.rest.Mapping[] restMappings;

public ConfigWebImpl(CFMLFactoryImpl factory, ConfigServerImpl cs, ServletConfig config) {
setInstance(factory, cs, config, false);
Expand Down Expand Up @@ -376,16 +375,6 @@ public boolean passwordEqual(Password password) {
return cs.passwordEqual(password);
}

@Override
public lucee.runtime.rest.Mapping[] getRestMappings() {
if (restMappings == null) {
synchronized (this) {
if (restMappings == null) createRestMapping();
}
}
return restMappings;
}

@Override
public PageSource getPageSource(Mapping[] mappings, String realPath, boolean onlyTopLevel) {
throw new PageRuntimeException(new DeprecatedException("method not supported"));
Expand Down Expand Up @@ -1799,10 +1788,10 @@ public IdentificationServer getServerIdentification() {
public void reload() {
synchronized (this) {
if (mappings != null) {
// MUST 7 is that needed?
ConfigFactoryImpl.flushPageSourcePool(mappings);
// resetMappings(false);// MUST 7 iss that needed?
// resetMappings(false);// MUST 7 is that needed?
}
createRestMapping();
}
}

Expand Down Expand Up @@ -1852,24 +1841,9 @@ public ConfigWebImpl resetMappings() {
return this;
}

private void createRestMapping() {
Map<String, lucee.runtime.rest.Mapping> mappings = MapFactory.<String, lucee.runtime.rest.Mapping>getConcurrentMap();
lucee.runtime.rest.Mapping[] sm = cs.getRestMappings();
lucee.runtime.rest.Mapping tmp;
if (sm != null) {
for (int i = 0; i < sm.length; i++) {
try {
// if (!sm[i].isHidden()) {
tmp = sm[i].duplicate(this, Boolean.TRUE);
mappings.put(tmp.getVirtual(), tmp);
// }
}
catch (Exception e) {

}
}
}
this.restMappings = mappings.values().toArray(new lucee.runtime.rest.Mapping[mappings.size()]);
@Override
public lucee.runtime.rest.Mapping[] getRestMappings() {
return cs.getRestMappings();
}

@Override
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="7.0.0.62-SNAPSHOT"/>
<property name="version" value="7.0.0.63-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>7.0.0.62-SNAPSHOT</version>
<version>7.0.0.63-SNAPSHOT</version>
<packaging>jar</packaging>

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

0 comments on commit 2f1b88e

Please sign in to comment.