[jira] [Updated] (WW-5006) NullPointerException in ProxyUtil class when accessing static member

2019-01-24 Thread JIRA


 [ 
https://issues.apache.org/jira/browse/WW-5006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebastian Götz updated WW-5006:
---
Description: 
In some JSP we access static field (constants) of an interface. The interface 
has scope public and and the fields are public static final.

When accessing the value of such a field the ValueStack throws a 
NullPointerException here (com.opensymphony.xwork2.util.ProxyUtil), because 
there is actually not object (parameter holds null) when accessing a static 
member:
{code:java}
/**
* Check whether the given object is a proxy.
* @param object the object to check
*/
public static boolean isProxy(Object object) {
Class clazz = object.getClass();
Boolean flag = isProxyCache.get(clazz);
if (flag != null) {
return flag;
}

boolean isProxy = isSpringAopProxy(object);

isProxyCache.put(clazz, isProxy);
return isProxy;
}

{code}
 

Support to access static members is switched on via struts constant 

{{}}

  was:
In some JSP we access static field (constants) of an interface. The interface 
has scope public and and the fields are public static final.

When accessing the value of such a field the ValueStack throws a 
NullPointerException here because there is actually not object (parameter holds 
null) when accessing a static member:

{{/**}}
{{ * Check whether the given object is a proxy.}}
{{ * @param object the object to check}}
{{ */}}
{{ public static boolean isProxy(Object object) {}}
{{ Class clazz = object.getClass();}}
{{ Boolean flag = isProxyCache.get(clazz);}}
{{ if (flag != null) {}}
{{ return flag;}}
{{ }}}{{boolean isProxy = isSpringAopProxy(object);}}{{isProxyCache.put(clazz, 
isProxy);}}
{{ return isProxy;}}
{{ }}}

 

Support to access static members is switched on via struts constant 

{{}}


> NullPointerException in ProxyUtil class when accessing static member
> 
>
> Key: WW-5006
> URL: https://issues.apache.org/jira/browse/WW-5006
> Project: Struts 2
>  Issue Type: Bug
>  Components: Value Stack
>Affects Versions: 2.5.20
>Reporter: Sebastian Götz
>Priority: Major
>
> In some JSP we access static field (constants) of an interface. The interface 
> has scope public and and the fields are public static final.
> When accessing the value of such a field the ValueStack throws a 
> NullPointerException here (com.opensymphony.xwork2.util.ProxyUtil), because 
> there is actually not object (parameter holds null) when accessing a static 
> member:
> {code:java}
> /**
> * Check whether the given object is a proxy.
> * @param object the object to check
> */
> public static boolean isProxy(Object object) {
> Class clazz = object.getClass();
> Boolean flag = isProxyCache.get(clazz);
> if (flag != null) {
> return flag;
> }
> boolean isProxy = isSpringAopProxy(object);
> isProxyCache.put(clazz, isProxy);
> return isProxy;
> }
> {code}
>  
> Support to access static members is switched on via struts constant 
> {{}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (WW-5006) NullPointerException in ProxyUtil class when accessing static member

2019-01-24 Thread JIRA
Sebastian Götz created WW-5006:
--

 Summary: NullPointerException in ProxyUtil class when accessing 
static member
 Key: WW-5006
 URL: https://issues.apache.org/jira/browse/WW-5006
 Project: Struts 2
  Issue Type: Bug
  Components: Value Stack
Affects Versions: 2.5.20
Reporter: Sebastian Götz


In some JSP we access static field (constants) of an interface. The interface 
has scope public and and the fields are public static final.

When accessing the value of such a field the ValueStack throws a 
NullPointerException here because there is actually not object (parameter holds 
null) when accessing a static member:

{{/**}}
{{ * Check whether the given object is a proxy.}}
{{ * @param object the object to check}}
{{ */}}
{{ public static boolean isProxy(Object object) {}}
{{ Class clazz = object.getClass();}}
{{ Boolean flag = isProxyCache.get(clazz);}}
{{ if (flag != null) {}}
{{ return flag;}}
{{ }}}{{boolean isProxy = isSpringAopProxy(object);}}{{isProxyCache.put(clazz, 
isProxy);}}
{{ return isProxy;}}
{{ }}}

 

Support to access static members is switched on via struts constant 

{{}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WW-5004) No more calling of a static variable in Struts 2.8.20 available

2019-01-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/WW-5004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751635#comment-16751635
 ] 

ASF GitHub Bot commented on WW-5004:


JCgH4164838Gh792C124B5 commented on pull request #316: Fix for NPE issue 
discovered in WW-5004.
URL: https://github.com/apache/struts/pull/316
 
 
Fix for `NPE` issue discovered in WW-5004.
   - Guard fix for a `NPE` that can arise under certain conditions, identified 
by _A. Mashchenko_.
   - This guard (or something similar) will probably be required for future 
non-public field access logic ... may want to hold-off on this PR and instead 
include the fix in a "fuller solution".
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> No more calling of a static variable in Struts 2.8.20 available
> ---
>
> Key: WW-5004
> URL: https://issues.apache.org/jira/browse/WW-5004
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.20
> Environment: Java 7.1 and JSP Websites
>Reporter: Deniz Renkligül
>Priority: Critical
>  Labels: build, features, patch, usability
> Fix For: 2.5.21, 2.6
>
>
> After the update from Struts 2.5.18 to 2.5.20 it is not more possible to call 
> a java static variable in JSP like
> {code:java}
> 
> {code}
> Please see for more details the release notes of 2.5.20
>  [link 
> https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.20|https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.20]
>  and I tried without success the following description assigned above in the 
> release version notes 2.5.20 with :
> {code:java}
> 
> 
> {code}
>  https://issues.apache.org/jira/browse/WW-4984
>  
> Thanks in advance for your support.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WW-4348) Remove access to static methods

2019-01-24 Thread Markus Wulftange (JIRA)


[ 
https://issues.apache.org/jira/browse/WW-4348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751496#comment-16751496
 ] 

Markus Wulftange commented on WW-4348:
--

What do you mean by it gets blocked from outside? I have used the debugger in 
devMode like last time and it works that way.

> Remove access to static methods
> ---
>
> Key: WW-4348
> URL: https://issues.apache.org/jira/browse/WW-4348
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.16.3
>Reporter: Lukasz Lenart
>Priority: Critical
> Fix For: 2.5.x
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)