You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2021/12/22 11:53:26 UTC
[commons-jexl] branch master updated: JEXL: winter cleaning; - restoring CI build
This is an automated email from the ASF dual-hosted git repository.
henrib pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git
The following commit(s) were added to refs/heads/master by this push:
new eb41da0 JEXL: winter cleaning; - restoring CI build
eb41da0 is described below
commit eb41da00004aec8a621eebf3ff53dff783b80277
Author: henrib <he...@apache.org>
AuthorDate: Wed Dec 22 12:53:21 2021 +0100
JEXL: winter cleaning;
- restoring CI build
---
RELEASE-NOTES.txt | 8 ++++----
pom.xml | 5 ++++-
src/changes/changes.xml | 2 +-
.../jexl3/internal/introspection/SandboxUberspect.java | 15 +++++++++++++--
4 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 62913a3..74b2e63 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -19,16 +19,16 @@ Its goal is to expose scripting features usable by technical operatives or consu
https://commons.apache.org/jexl/
========================================================================================================================
-Release 3.2.2
+Release 3.3
========================================================================================================================
-Version 3.2.2 is a maintenance release.
+Version 3.3 is a minor release.
Compatibility with previous releases
====================================
-Version 3.2.2 is source and binary compatible with 3.2.
+Version 3.3 is source and binary compatible with 3.2.
-Bugs Fixed in 3.2.1:
+Bugs Fixed in 3.3:
==================
* JEXL-354: #pragma does not handle negative integer or real literals
* JEXL-353: Documentation error for not-in/not-match operator
diff --git a/pom.xml b/pom.xml
index 2127401..4861eb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,7 +122,7 @@
</dependencies>
<build>
- <defaultGoal>clean package apache-rat:check spotbugs:check japicmp:check checkstyle:check javadoc:javadoc</defaultGoal>
+ <defaultGoal>clean package apache-rat:check spotbugs:check japicmp:cmp checkstyle:check javadoc:javadoc </defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -243,6 +243,9 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${commons.spotbugs.version}</version>
<configuration>
+ <effort>Max</effort>
+ <threshold>High</threshold>
+ <xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/src/main/config/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9091e00..280cb2a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -25,7 +25,7 @@
<author email="dev@commons.apache.org">Commons Developers</author>
</properties>
<body>
- <release version="3.2.1">
+ <release version="3.2.1" date="2021-06-25">
<action dev="henrib" type="fix" issue="JEXL-352" due-to="Øyvind Horneland">
Possible memory leak regarding parser jjtree nodes in JEXL 3.2
</action>
diff --git a/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java b/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
index fcf73ef..16e80b6 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
@@ -103,6 +103,17 @@ public final class SandboxUberspect implements JexlUberspect {
return getPropertyGet(null, obj, identifier);
}
+ /**
+ * Identity equality.
+ * <p>Spotbugs just <em>hates</em> string identity...</p>
+ * @param lhs left hand side
+ * @param rhs right hand side
+ * @return true if left is identical to right
+ */
+ private static boolean eq(Object lhs, Object rhs) {
+ return lhs == rhs;
+ }
+
@Override
public JexlPropertyGet getPropertyGet(final List<PropertyResolver> resolvers,
final Object obj,
@@ -113,7 +124,7 @@ public final class SandboxUberspect implements JexlUberspect {
final String actual = sandbox.read(obj.getClass(), property);
if (actual != null) {
// no transformation, strict equality: use identifier before string conversion
- final Object pty = actual == property ? identifier : actual;
+ final Object pty = eq(actual, property) ? identifier : actual;
return uberspect.getPropertyGet(resolvers, obj, pty);
}
} else {
@@ -142,7 +153,7 @@ public final class SandboxUberspect implements JexlUberspect {
final String actual = sandbox.write(obj.getClass(), property);
if (actual != null) {
// no transformation, strict equality: use identifier before string conversion
- final Object pty = actual == property ? identifier : actual;
+ final Object pty = eq(actual, property) ? identifier : actual;
return uberspect.getPropertySet(resolvers, obj, pty, arg);
}
} else {