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 093cfbd9 JEXL-410: reduced unnecessary public exposure; 093cfbd9 is described below commit 093cfbd9c5003db8634b1a06e564f0debab2ccc0 Author: Henri Biestro <hbies...@cloudera.com> AuthorDate: Mon Oct 23 11:05:47 2023 +0200 JEXL-410: reduced unnecessary public exposure; --- src/main/java/org/apache/commons/jexl3/JexlFeatures.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/jexl3/JexlFeatures.java b/src/main/java/org/apache/commons/jexl3/JexlFeatures.java index 71349412..62536618 100644 --- a/src/main/java/org/apache/commons/jexl3/JexlFeatures.java +++ b/src/main/java/org/apache/commons/jexl3/JexlFeatures.java @@ -130,7 +130,7 @@ public final class JexlFeatures { * The default features flag mask. * <p>Meant for compatibility with scripts written before 3.3.1</p> */ - public static final long DEFAULT_FEATURES = + private static final long DEFAULT_FEATURES = 1L << LOCAL_VAR | 1L << SIDE_EFFECT | 1L << SIDE_EFFECT_GLOBAL @@ -153,7 +153,7 @@ public final class JexlFeatures { * The canonical scripting (since 3.3.1) features flag mask based on the original default. * <p>Adds lexical, lexical-shade and const-capture but removes comparator-names and pragma-anywhere</p> */ - public static final long SCRIPT_FEATURES = + private static final long SCRIPT_FEATURES = ( DEFAULT_FEATURES | 1L << LEXICAL | 1L << LEXICAL_SHADE @@ -164,7 +164,7 @@ public final class JexlFeatures { /** * All features. */ - public static final long ALL_FEATURES = (1L << (CONST_CAPTURE + 1)) - 1L; + private static final long ALL_FEATURES = (1L << (CONST_CAPTURE + 1)) - 1L; /** * Creates an all features enabled set. @@ -221,7 +221,7 @@ public final class JexlFeatures { * <p><em>try, catch, throw, finally, switch, case, default, class, instanceof, jexl, $jexl</em></p> * @since 3.3.1 */ - public static final Set<String> RESERVED_WORDS = + private static final Set<String> RESERVED_WORDS = Collections.unmodifiableSet( new HashSet<>((Arrays.asList( "try", "catch", "throw", "finally", "switch", "case", "default", "class", "instanceof", "jexl", "$jexl")))); @@ -362,6 +362,13 @@ public final class JexlFeatures { return nameSpaces; } + /** + * @return these features"s flags + */ + public long getFlags() { + return flags; + } + /** * Sets a feature flag. * @param feature the feature ordinal