AbstractLocalizedTextProvider

clearMap(ResourceBundle.class, null, "cacheList");

private void clearMap(Class cl, Object obj, String name)
            throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {

        Field field = cl.getDeclaredField(name);
        field.setAccessible(true);

        Object cache = field.get(obj);

        synchronized (cache) {
            Class ccl = cache.getClass();
            Method clearMethod = ccl.getMethod("clear");
            clearMethod.invoke(cache);
        }
    }


When it executes the line

field.setAccessible(true);

is when it generates the warning

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.opensymphony.xwork2.util.AbstractLocalizedTextProvider (file:/home/ghuber/git/events/events/src/main/webapp/WEB-INF/classes/) to field java.util.ResourceBundle.cacheList WARNING: Please consider reporting this to the maintainers of com.opensymphony.xwork2.util.AbstractLocalizedTextProvider WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

On 30/11/2020 17:28, Yasser Zamani wrote:
I remember we fixed similar issues but against ognl
(https://issues.apache.org/jira/browse/WW-5031)

I think this is a new one about `clearMap(ResourceBundle.class, null,
"cacheList");` inside "AbstractLocalizedTextProvider" (as error message
also mentions).

Maybe it's a good idea to set `--illegal-access=deny` on our java 11
build to discover similar issues earlier.

Regards.

On 11/30/2020 5:22 PM, Greg Huber wrote:
I had used

<url>https://repository.apache.org/content/groups/snapshots/</url>

<org.apache.struts.version>2.6-SNAPSHOT</org.apache.struts.version>


in my ~.m2/repository/org/apache/struts/struts2-core/2.6-SNAPSHOT there
are two jars both with the same internal date 11 July


struts2-core-2.6-20201128.103017-363.jar

struts2-core-2.6-SNAPSHOT.jar


On 30/11/2020 13:32, Lukasz Lenart wrote:
pon., 30 lis 2020 o 14:30 Greg Huber <gregh3...@gmail.com> napisał(a):
Seems still to be there,

https://repository.apache.org/content/groups/snapshots/

the date of the jar is July 2020.
Hm... November 28
https://repository.apache.org/content/groups/snapshots/org/apache/struts/struts2-core/2.6-SNAPSHOT/



Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to