You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/03/15 17:02:27 UTC
[tomcat] branch 10.0.x updated: Avoid possible NPE
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new b0f2793 Avoid possible NPE
b0f2793 is described below
commit b0f279341b08517bee3490f53965a5126d0d97f2
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Mar 15 16:47:05 2022 +0000
Avoid possible NPE
No functional change since NPE would be swallowed but this saves
generating the NPE.
---
java/org/apache/tomcat/util/IntrospectionUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java
index a1f718d..ff13d11 100644
--- a/java/org/apache/tomcat/util/IntrospectionUtils.java
+++ b/java/org/apache/tomcat/util/IntrospectionUtils.java
@@ -303,7 +303,7 @@ public final class IntrospectionUtils {
private static String replaceProperties(String value,
Hashtable<Object,Object> staticProp, PropertySource dynamicProp[],
ClassLoader classLoader, int iterationCount) {
- if (value.indexOf("${") < 0) {
+ if (value == null || value.indexOf("${") < 0) {
return value;
}
if (iterationCount >=20) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org