You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Daniel Pitts (JIRA)" <ji...@apache.org> on 2011/09/13 19:45:09 UTC
[jira] [Created] (OGNL-21) Remove dead and broken code from
OgnlRuntime/Simple
Remove dead and broken code from OgnlRuntime/Simple
---------------------------------------------------
Key: OGNL-21
URL: https://issues.apache.org/jira/browse/OGNL-21
Project: OGNL
Issue Type: Task
Reporter: Daniel Pitts
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114906#comment-13114906 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
Indeed. As far as the CompoundRootAccessor usage, I had found that and commented on it. There is a very quick fix for the struts source (which could be made immediately AFAICT):
-OgnlRuntime.callMethod((OgnlContext) context, o, name, name, objects);
+OgnlRuntime.callMethod((OgnlContext) context, o, name, objects);
The callMethod(OgnleContext, Object, String, String, Object[]) method is deprecated anyway. I'm fine leaving that one in if you feel the need to, however I was considering since this is for a release with a new major version number, it could be a good time to remove deprecated methods and the like.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103913#comment-13103913 ]
Simone Tripodi commented on OGNL-21:
------------------------------------
Thanks for contributing Daniel, anyway before applying the patch I would like to make sure that code is unnecessary, your words "there are some *apparently* unnecessary methods" worry me a little.
What is the metric you used to check dead code?
Many thanks in advance!
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107671#comment-13107671 ]
Simone Tripodi commented on OGNL-21:
------------------------------------
Hi Daniel,
sorry for the typo, I meant Struts indeed and not Structs (maybe influenced buy the C {{struct}} keyword :P)
Generally main discussions happen on Commons [mailing lists|http://commons.apache.org/mail-lists.html] (subscribe to all you are interested) and we use JIRA just to keep track of Issues.
I'd suggest to move the discussion on the ML, looking forward for your message!
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127333#comment-13127333 ]
Hudson commented on OGNL-21:
----------------------------
Integrated in ognl #133 (See [https://builds.apache.org/job/ognl/133/])
OGNL-21: removed deprecated method
grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1183226
Files :
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Christian Grobmeier (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Grobmeier resolved OGNL-21.
-------------------------------------
Resolution: Fixed
fixed
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127337#comment-13127337 ]
Christian Grobmeier commented on OGNL-21:
-----------------------------------------
All,
I have removed the deprecated method as suggestd and fixed some imports, dead code, unused vars. Please have a review on it, if you have some time.
I finally did NOT delete all the methods in the patch initially proposed because of the discussion here. Let us check if these methods can be fixed. If they do not make sense I suggest to @deprecate them first before removing. I said different on the ML, but this discussion made me change my mind.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (OGNL-21) Remove dead and broken code
from OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103823#comment-13103823 ]
Daniel Pitts edited comment on OGNL-21 at 9/13/11 5:48 PM:
-----------------------------------------------------------
Attached patch removing dead code.
This is particularly important to do as dead code makes refactoring and clean-up more difficult.
was (Author: danielpitts):
Patch removing dead code.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107013#comment-13107013 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
Going through the diff, I've plugged OgnlRuntime.*(methodName) into google code search. While not exhaustive, it does give a sense for which methods are used.
I see one of use of getPropertyDescriptorsArray, which is a broken method and either shouldn't be used, or should be fixed.
I see a couple use of the deprecated method "callMethod", which is very easily replaced.
I did find legitimate uses for the methods I wanted to remove from SimpleNode.
So Mr. Tripodi, how do you want to handle this? I'll have to regenerate the patch since there have been commits to OgnlRuntime since I created it. Does this sound reasonable, given my research above?
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104015#comment-13104015 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
I'm glad you asked :-)
I use IntelliJ idea which uses static analysis to detect and highlight unused members. After removing those unused members, I ran the unit tests to verify nothing broke.
I did notice a few methods in OgnlOps which are only accessed "reflectively", and I left them alone. Incidentally, those should probably be "unit-tested" and document.
My patch does run the risk of removing methods which might be used by external projects. I can't imagine it would seem like a good idea to call into OgnlRuntime manually though. The nice thing about SVN is we can resurrect any code which shouldn't have been deleted (eg, was intended to be a public utility API method).
My personal philosophy is if it didn't break when I removed something, then the something was unnecessary or needs to be better tested :-)
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115553#comment-13115553 ]
Maurizio Cucchiara commented on OGNL-21:
----------------------------------------
{quote}
The callMethod(OgnleContext, Object, String, String, Object[]) method is deprecated anyway. I'm fine leaving that one in if you feel the need to, however I was considering since this is for a release with a new major version number, it could be a good time to remove deprecated methods and the like.
{quote}
Sorry, I didn't see the deprecated annotation, and I definitely agree with you about the major version matter. Furthermore I have nothing against the patch you proposed.
I also think that we could purge every deprecated method and the unused private ones.
For the public api, IMO we should try to make life as easy as possible to the OGNL users. Maybe provide a migration guide would be enough.
WDYT?
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Pitts updated OGNL-21:
-----------------------------
Labels: cleanup (was: )
Description:
I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
I've created a patch which removes them, and the unit tests still run fine.
One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
Summary: Remove dead and broken code from OgnlRuntime/SimpleNode (was: Remove dead and broken code from OgnlRuntime/Simple)
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114327#comment-13114327 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
I sent the message a while ago and haven't received any comments yet. How long do we wait?
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107548#comment-13107548 ]
Simone Tripodi commented on OGNL-21:
------------------------------------
I already started feeling obsolete and deprecable, if you call me Mr.Tripodi I feel old and want to unsubscribe from all MLs and JIRA :)
Jokes a part, I still haven't had a deep look at your patch, I'd like to ask you the favor of investigating also in Apache Structs source code (it's the OGNL main client AFAIK) and MyBatis (it strongly relies on it).
Moreover we should ask also in the commons users ML to collect more feedbacks, not everybody monitors Jira - the main channel of info are the MLs...
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104642#comment-13104642 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
I don't actually know much about Maven.
However, we can do a grep of "^-.*public" on my diff to get a list of public members being removed.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Pitts updated OGNL-21:
-----------------------------
Attachment: Remove-dead-code.patch
Patch removing dead code.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127351#comment-13127351 ]
Hudson commented on OGNL-21:
----------------------------
Integrated in ognl #134 (See [https://builds.apache.org/job/ognl/134/])
OGNL-21: change added
OGNL-21: fixed unused imports, some dead code, unused variables
OGNL-21: fixed some dead code
OGNL-21: fixed dead code
grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1183236
Files :
* /commons/proper/ognl/trunk/src/changes/changes.xml
grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1183235
Files :
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ArrayElementsTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ContextVariableTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/CorrectedObjectNullHandler.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/IndexAccessTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/InterfaceInheritanceTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/LambdaExpressionTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/MethodWithConversionTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NestedMethodTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NullHandlerTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OperatorTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/Performance.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PrivateAccessorTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyTest.java
* /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/QuotingTest.java
grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1183233
Files :
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1183231
Files :
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114826#comment-13114826 ]
Maurizio Cucchiara commented on OGNL-21:
----------------------------------------
Hi Daniel,
I have just got a quick look at your patch. Unfortunately I have to say that some of the methods you got rid of are still in use on Struts (see the [latest CompoundRootAccessor version|http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/CompoundRootAccessor.java?revision=911280&view=markup] at line 232).
IMO OgnlRuntime is a public api, and it is difficult to detect unused statements.
We should take into consideration every method starting from protected visibility.
My 2 cents.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107563#comment-13107563 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
That's fine by me Simone. I'm assuming you mean Struts, not Structs. FWIW, google code search does include apache commons and googlecode repositories, so my research above included Struts and MyBatis.
Is that communication to the ML something you are willing to take on? I'm new to the open-source contribution scene and I'm not quite sure I'd know the best way to present this.
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Daniel Pitts (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115585#comment-13115585 ]
Daniel Pitts commented on OGNL-21:
----------------------------------
I don't see any problems with that, but I'm used to working on code which has a relatively small customer base, so I might not be the best to ask :-)
Unused private methods definitely should be removed (as long as we don't expect they are called via reflection).
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OGNL-21) Remove dead and broken code from
OgnlRuntime/SimpleNode
Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OGNL-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104277#comment-13104277 ]
Simone Tripodi commented on OGNL-21:
------------------------------------
It would be nice if some maven plugin could generate the same report, so we could publish it in the site and ask the community if they use such methods or not.
The worry is, indeed, removing methods that users rely on, so they maybe just need to be better tested :P
> Remove dead and broken code from OgnlRuntime/SimpleNode
> -------------------------------------------------------
>
> Key: OGNL-21
> URL: https://issues.apache.org/jira/browse/OGNL-21
> Project: OGNL
> Issue Type: Task
> Reporter: Daniel Pitts
> Labels: cleanup
> Attachments: Remove-dead-code.patch
>
>
> I noticed there are some apparently unnecessary methods in both SimpleNode and OgnlRuntime.
> I've created a patch which removes them, and the unit tests still run fine.
> One of the methods was clearly buggy and would cause ClassCastExceptions if used (it put an array into a cache which was used to also store Maps).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira