This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new eb58c5c Upgrading Commons JEXL, CodeMirror and AspectJ
eb58c5c is described below
commit eb58c5c68724c295b012e36768bb84bd69f3c4b0
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Fri Jun 25 15:38:48 2021 +0200
Upgrading Commons JEXL, CodeMirror and AspectJ
---
.../persistence/jpa/dao/AbstractJPAJSONAnyDAO.java | 3 +--
.../core/persistence/jpa/dao/AbstractAnyDAO.java | 3 +--
.../core/provisioning/api/jexl/SandboxUberspect.java | 20 +++++++-------------
pom.xml | 7 ++++---
4 files changed, 13 insertions(+), 20 deletions(-)
diff --git
a/core/persistence-jpa-json/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractJPAJSONAnyDAO.java
b/core/persistence-jpa-json/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractJPAJSONAnyDAO.java
index 4881a10..bb44c19 100644
---
a/core/persistence-jpa-json/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractJPAJSONAnyDAO.java
+++
b/core/persistence-jpa-json/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractJPAJSONAnyDAO.java
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.core.persistence.jpa.dao;
-import java.io.StringReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
@@ -219,7 +218,7 @@ abstract class AbstractJPAJSONAnyDAO extends
AbstractDAO<AbstractEntity> impleme
return List.of();
}
- Parser parser = new Parser(new
StringReader(derSchema.getExpression()));
+ Parser parser = new Parser(derSchema.getExpression());
// Schema keys
List<String> identifiers = new ArrayList<>();
diff --git
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractAnyDAO.java
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractAnyDAO.java
index 35e2a0c..bc529dd 100644
---
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractAnyDAO.java
+++
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractAnyDAO.java
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.core.persistence.jpa.dao;
-import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@@ -284,7 +283,7 @@ public abstract class AbstractAnyDAO<A extends Any<?>>
extends AbstractDAO<A> im
}
private Set<String> getWhereClause(final String expression, final String
value, final boolean ignoreCaseMatch) {
- Parser parser = new Parser(new StringReader(expression));
+ Parser parser = new Parser(expression);
// Schema keys
List<String> identifiers = new ArrayList<>();
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/SandboxUberspect.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/SandboxUberspect.java
index 985b32f..3675fc8 100644
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/SandboxUberspect.java
+++
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/SandboxUberspect.java
@@ -19,17 +19,13 @@
package org.apache.syncope.core.provisioning.api.jexl;
import java.time.Instant;
-import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.Date;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.apache.commons.jexl3.JexlEngine;
-import org.apache.commons.jexl3.internal.TemplateInterpreter;
import org.apache.commons.jexl3.internal.introspection.Uberspect;
import org.apache.commons.jexl3.introspection.JexlMethod;
import org.apache.commons.jexl3.introspection.JexlPropertySet;
@@ -46,14 +42,14 @@ import org.apache.syncope.core.persistence.api.entity.Realm;
class SandboxUberspect extends Uberspect {
- private static final Set<String> COLLECTION_METHODS =
Collections.unmodifiableSet(new HashSet<>(
- Arrays.asList("contains", "containsAll", "isEmpty", "size",
"iterator", "toString")));
+ private static final Set<String> COLLECTION_METHODS =
+ Set.of("contains", "containsAll", "isEmpty", "size", "iterator",
"toString");
- private static final Set<String> LIST_METHODS =
Collections.unmodifiableSet(new HashSet<>(
- Arrays.asList("get", "indexOf", "lastIndexOf", "toString")));
+ private static final Set<String> LIST_METHODS =
+ Set.of("get", "indexOf", "lastIndexOf", "toString");
- private static final Set<String> MAP_METHODS =
Collections.unmodifiableSet(new HashSet<>(
- Arrays.asList("get", "getOrDefault", "containsKey",
"containsValue", "toString")));
+ private static final Set<String> MAP_METHODS =
+ Set.of("get", "getOrDefault", "containsKey", "containsValue",
"toString");
SandboxUberspect() {
super(LogFactory.getLog(JexlEngine.class),
JexlUberspect.JEXL_STRATEGY);
@@ -66,9 +62,7 @@ class SandboxUberspect extends Uberspect {
@Override
public JexlMethod getMethod(final Object obj, final String method, final
Object... args) {
- if (obj instanceof TemplateInterpreter) { //
https://issues.apache.org/jira/browse/JEXL-351
- return super.getMethod(obj, method, args);
- } else if (obj instanceof AnyTO || obj instanceof Any
+ if (obj instanceof AnyTO || obj instanceof Any
|| obj instanceof PlainAttr || obj instanceof Attr
|| obj instanceof MembershipTO || obj instanceof Membership
|| obj instanceof Realm || obj instanceof RealmTO) {
diff --git a/pom.xml b/pom.xml
index 4cd30de..890ca00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -439,7 +439,7 @@ under the License.
<log4j.version>2.14.1</log4j.version>
<disruptor.version>3.4.4</disruptor.version>
- <commons-jexl.version>3.2</commons-jexl.version>
+ <commons-jexl.version>3.2.1</commons-jexl.version>
<commons-lang.version>3.12.0</commons-lang.version>
<commons-text.version>1.9</commons-text.version>
<commons-codec.version>1.15</commons-codec.version>
@@ -466,7 +466,8 @@ under the License.
<bootbox.version>5.5.2</bootbox.version>
<font-awesome.version>5.15.3</font-awesome.version>
<ionicons.version>2.0.1</ionicons.version>
- <codemirror.version>5.50.0</codemirror.version>
+ <highlightjs.version>10.1.2</highlightjs.version>
+ <codemirror.version>5.62.0</codemirror.version>
<googlediffmatchpath.version>895a9512bb</googlediffmatchpath.version>
<jsplumb.version>2.0.7</jsplumb.version>
<chartjs.version>1.0.2</chartjs.version>
@@ -972,7 +973,7 @@ under the License.
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
- <version>1.9.6</version>
+ <version>1.9.7</version>
</dependency>
<dependency>