- Restored ability to access public static fields (true by default).
- Introduced a boolean configuration flag (allowStaticFieldAccess).
- Replaced one remaining Boolean.parseBoolean() conversion in OgnlUtil use BooleanUtils.toBoolean().
- Enhanced unit tests to confirm proper operation of the fix.
- Replicating L. Lenart's change in PR#317:
- Removed injection parameter for setAllowStaticMethodAccess in OgnlValueStackFactory.
- Replaced with lazy retrieval of allowStaticMethodAccess from container.
- Used same pattern for the new allowStaticFieldAccess flag.
- Added retrieval methods for both flags from the container.
- Optimized calling sequence of isAccessible() based on feedback from previous commit.
- Made a couple of getters and the protected checkXXX methods final (avoid descendant interference).
- Restored ability to access public static fields (true by default).
- Introduced a boolean configuration flag (allowStaticFieldAccess).
- Replaced one remaining Boolean.parseBoolean() conversion in OgnlUtil use BooleanUtils.toBoolean().
- Enhanced unit tests to confirm proper operation of the fix.
- Replicating L. Lenart's change in PR#317:
- Removed injection parameter for setAllowStaticMethodAccess in OgnlValueStackFactory.
- Replaced with lazy retrieval of allowStaticMethodAccess from container.
- Used same pattern for the new allowStaticFieldAccess flag.
- Added retrieval methods for both flags from the container.
- Made a private ConcurrentMap reference final, made initial sets immutable (consistency).
- Made sets for Accepted and Excluded patterns checkers immutable in 2 modules (consistency).
- Added @Override annotations missing from a few methods in 2 modules.
- Updated the 3 relevant unit tests to verify immutable states of various sets.
(cherry picked from commit 881e1b2580)
# Conflicts:
# core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
- Removed most of the logging added in PR#292.
- Left the added logging for the setExcludedPatterns and setAcceptedPatterns methods in their respective modules.
L. Lenart's comment indicated their benefit outweighs overhead (not something that changes often).
Made the if-else blocks consistent with preferred styling for the log blocks.
- Removed a dangling "/**" start comment tag with no proper close (and the whitespace between it and the next "/**")
in the OgnlValueStack module.
I insinuate that the non primitive BigInteger and BigDecimal types
should also return default values for null input.
Rename the map to `baseTypeDefaults for better understanding and
remove the check for `isPrimitive` b/c this seemed to be kind of optimization
but breaked the check for included non-primitive types.
B/c the unit tests run successfully, we can use the existing default fields ZERO.
* Updates and cleanup for some configuration-related items.
- Made several attributes final.
- Added limiter logic to the setting of certain configuration elements, and increased logging around them.
- Updated unit tests impacted by the limiter logic, including minor typo fixes and locale consistency.
- Minor cleanup while making the changes.
* Updates and cleanup for some configuration-related items (1st revision).
- Reworked this PR, taking into account feedback and suggestions.
- Removed the if LOG.isxxxEnabled level checks that were added.
- Removed the limiter logic and instead reduced access level of most of the injectable methods to protected.
- Updated the previous unit test changes following removal of limiter logic.
* Minor correction to two debug log statements (as requested by reviewer).
* Update debug messages for pattern checkers, as requested by reviewers.
Avoids confusing users when replacing an empty exclusion set (which improves safety).
Still provides a (slightly milder) message when replacing an empty accepted set (which can reduce safety).
* WW-4938 Uses container to create an instance of the class
* WW-4938 Adds a test to proof that @Inject works on constructor
* WW-4938 Adds missing header
* Update core/src/test/java/com/opensymphony/xwork2/mock/InjectableAction.java
Co-Authored-By: lukaszlenart <lukasz.lenart@gmail.com>
* Update core/src/test/java/com/opensymphony/xwork2/mock/DummyTextProvider.java
Co-Authored-By: lukaszlenart <lukasz.lenart@gmail.com>