Skip to content

Commit

Permalink
resolved suppressed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 22, 2024
1 parent e065f84 commit 971590d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@

import javax.servlet.http.HttpServletRequest;

import lucee.commons.io.res.Resource;
import lucee.commons.lang.ExceptionUtil;
import lucee.commons.lang.StringUtil;
import lucee.commons.math.MathUtil;
import lucee.runtime.PageContext;
import lucee.runtime.PageSource;
import lucee.runtime.config.NullSupportHelper;
import lucee.runtime.dump.DumpData;
import lucee.runtime.dump.DumpProperties;
Expand Down Expand Up @@ -293,7 +295,13 @@ else if (first == 'q') {
private Object getPathTranslated() {
try {
PageContext pc = ThreadLocalPageContext.get();
return pc.getBasePageSource().getResourceTranslated(pc).toString();
PageSource bps = pc.getBasePageSource();
if (bps != null) {
Resource rt = bps.getResourceTranslated(pc);
if (rt != null) {
return rt.toString();
}
}
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
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.247-SNAPSHOT"/>
<property name="version" value="6.2.0.248-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.247-SNAPSHOT</version>
<version>6.2.0.248-SNAPSHOT</version>
<packaging>jar</packaging>

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

0 comments on commit 971590d

Please sign in to comment.