[jira] [Updated] (LANG-965) FieldUtils methods leak accessible flags

2014-10-16 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated LANG-965:
-
Fix Version/s: (was: Review Patch)
   Patch Needed

 FieldUtils methods leak accessible flags
 

 Key: LANG-965
 URL: https://issues.apache.org/jira/browse/LANG-965
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.reflect.*
Affects Versions: 3.1, 3.2.1
 Environment: Apache Maven 3.1.1 
 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
 Maven home: C:\Java\apache-maven-3.1.1\bin\..
 Java version: 1.7.0_51, vendor: Oracle Corporation
 Java home: C:\Program Files\Java\jdk1.7.0_51\jre
 Default locale: en_US, platform encoding: Cp1252
 OS name: windows 7, version: 6.1, arch: amd64, family: windows
Reporter: Gary Gregory
Assignee: Benedikt Ritter
 Fix For: Patch Needed

 Attachments: commons-lang-965.patch, commons-lang-965.patch


 When various FieldUtils methods are called the accessible is set to true but 
 never reset to false. This is side-effect should be cleaned up.
 This makes a mess of the object model which represents the class meta data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LANG-965) FieldUtils methods leak accessible flags

2014-09-06 Thread Andre Diermann (JIRA)

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

Andre Diermann updated LANG-965:

Attachment: commons-lang-965.patch

Ok, after some further analysis my understanding is as follows:

o accessibility is changed explicitly in
   - {{readField(final Field field, final Object target, final boolean 
forceAccess)}} and
   - {{writeField(final Field field, final Object target, final Object value, 
final boolean forceAccess)}}

o furthermore, accessibility may be changed implicitly in every read/write 
method which needs to resolve a field by name first, when calling
   - {{getField(final Class? cls, final String fieldName, final boolean 
forceAccess)}} or
   - {{getDeclaredField(final Class? cls, final String fieldName, final 
boolean forceAccess)}}

So my proposal is to have only one place where accessibility is changed, which 
will simplify restoring of accessibility a lot. Therefore I added two methods 
for the internal resolution of fields, which do not modify accessibility. I 
made those two methods private, so public API is not changed.


 FieldUtils methods leak accessible flags
 

 Key: LANG-965
 URL: https://issues.apache.org/jira/browse/LANG-965
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.reflect.*
Affects Versions: 3.1, 3.2.1
 Environment: Apache Maven 3.1.1 
 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
 Maven home: C:\Java\apache-maven-3.1.1\bin\..
 Java version: 1.7.0_51, vendor: Oracle Corporation
 Java home: C:\Program Files\Java\jdk1.7.0_51\jre
 Default locale: en_US, platform encoding: Cp1252
 OS name: windows 7, version: 6.1, arch: amd64, family: windows
Reporter: Gary Gregory
Assignee: Benedikt Ritter
 Fix For: Review Patch

 Attachments: commons-lang-965.patch, commons-lang-965.patch


 When various FieldUtils methods are called the accessible is set to true but 
 never reset to false. This is side-effect should be cleaned up.
 This makes a mess of the object model which represents the class meta data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LANG-965) FieldUtils methods leak accessible flags

2014-08-21 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter updated LANG-965:
-

Fix Version/s: (was: Patch Needed)
   Review Patch

 FieldUtils methods leak accessible flags
 

 Key: LANG-965
 URL: https://issues.apache.org/jira/browse/LANG-965
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.reflect.*
Affects Versions: 3.1, 3.2.1
 Environment: Apache Maven 3.1.1 
 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
 Maven home: C:\Java\apache-maven-3.1.1\bin\..
 Java version: 1.7.0_51, vendor: Oracle Corporation
 Java home: C:\Program Files\Java\jdk1.7.0_51\jre
 Default locale: en_US, platform encoding: Cp1252
 OS name: windows 7, version: 6.1, arch: amd64, family: windows
Reporter: Gary Gregory
Assignee: Benedikt Ritter
 Fix For: Review Patch

 Attachments: commons-lang-965.patch


 When various FieldUtils methods are called the accessible is set to true but 
 never reset to false. This is side-effect should be cleaned up.
 This makes a mess of the object model which represents the class meta data.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (LANG-965) FieldUtils methods leak accessible flags

2014-08-19 Thread Andre Diermann (JIRA)

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

Andre Diermann updated LANG-965:


Attachment: commons-lang-965.patch

The attached patch tries so solve the mentioned accessibility leak by restoring 
the original accessibility of a particular field in case it has been modified 
by readField/writeField.

 FieldUtils methods leak accessible flags
 

 Key: LANG-965
 URL: https://issues.apache.org/jira/browse/LANG-965
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.reflect.*
Affects Versions: 3.1, 3.2.1
 Environment: Apache Maven 3.1.1 
 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
 Maven home: C:\Java\apache-maven-3.1.1\bin\..
 Java version: 1.7.0_51, vendor: Oracle Corporation
 Java home: C:\Program Files\Java\jdk1.7.0_51\jre
 Default locale: en_US, platform encoding: Cp1252
 OS name: windows 7, version: 6.1, arch: amd64, family: windows
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Patch Needed

 Attachments: commons-lang-965.patch


 When various FieldUtils methods are called the accessible is set to true but 
 never reset to false. This is side-effect should be cleaned up.
 This makes a mess of the object model which represents the class meta data.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (LANG-965) FieldUtils methods leak accessible flags

2014-03-23 Thread Henri Yandell (JIRA)

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

Henri Yandell updated LANG-965:
---

Fix Version/s: Patch Needed

 FieldUtils methods leak accessible flags
 

 Key: LANG-965
 URL: https://issues.apache.org/jira/browse/LANG-965
 Project: Commons Lang
  Issue Type: Bug
  Components: lang.reflect.*
Affects Versions: 3.1, 3.2.1
 Environment: Apache Maven 3.1.1 
 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
 Maven home: C:\Java\apache-maven-3.1.1\bin\..
 Java version: 1.7.0_51, vendor: Oracle Corporation
 Java home: C:\Program Files\Java\jdk1.7.0_51\jre
 Default locale: en_US, platform encoding: Cp1252
 OS name: windows 7, version: 6.1, arch: amd64, family: windows
Reporter: Gary Gregory
Assignee: Gary Gregory
 Fix For: Patch Needed


 When various FieldUtils methods are called the accessible is set to true but 
 never reset to false. This is side-effect should be cleaned up.
 This makes a mess of the object model which represents the class meta data.



--
This message was sent by Atlassian JIRA
(v6.2#6252)