This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 622a52f388 Avoid possible NPE
622a52f388 is described below
commit 622a52f38809c6daf51e459c74c486e1b455435d
Author: remm <[email protected]>
AuthorDate: Wed Sep 20 14:35:27 2023 +0200
Avoid possible NPE
Found by coverity.
---
java/org/apache/jasper/el/JasperELResolver.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/java/org/apache/jasper/el/JasperELResolver.java
b/java/org/apache/jasper/el/JasperELResolver.java
index 5f462a1125..6b57d9d133 100644
--- a/java/org/apache/jasper/el/JasperELResolver.java
+++ b/java/org/apache/jasper/el/JasperELResolver.java
@@ -196,6 +196,9 @@ public class JasperELResolver extends CompositeELResolver {
@Override
public Object getValue(ELContext context, Object base,
Object property) {
+ if (base == null || property == null) {
+ return null;
+ }
Object value = null;
Method method = getReadMethod(base.getClass(),
property.toString());
if (method != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]