[GitHub] groovy pull request #:

2018-10-28 Thread pditommaso
Github user pditommaso commented on the pull request:


https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075820
  
👍 


---


[GitHub] groovy pull request #:

2018-10-28 Thread pditommaso
Github user pditommaso commented on the pull request:


https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075630
  
Oh, right! I was missing the the groovy shell gives to the same script 
different file names. But in this case would not make more sense to make to 
groovy shell to give script a consistent file name based on the md5 hash, 
instead of creating a new name each time?


---


[GitHub] groovy pull request #:

2018-10-28 Thread pditommaso
Github user pditommaso commented on the pull request:


https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075266
  
Out of curiosity, what's the benefit of caching classes using as key the 
source hash code instead of the class name? 


---


[GitHub] groovy pull request #566: Added IgnoreDefaultEqualsAndToString

2018-02-06 Thread pditommaso
Github user pditommaso commented on a diff in the pull request:

https://github.com/apache/groovy/pull/566#discussion_r166250753
  
--- Diff: src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java ---
@@ -12026,6 +12026,9 @@ public static boolean equals(List left, List right) 
{
 if (left == right) {
 return true;
 }
+if( 
left.getClass().getAnnotation(IgnoreDefaultEqualsAndToString.class)!=null && 
right.getClass().getAnnotation(IgnoreDefaultEqualsAndToString.class)!=null ) {
--- End diff --

Could you suggest a possible metrics/benchmark ?


---


[GitHub] groovy pull request #566: Added IgnoreDefaultEqualsAndToString

2017-06-25 Thread pditommaso
GitHub user pditommaso opened a pull request:

https://github.com/apache/groovy/pull/566

Added IgnoreDefaultEqualsAndToString

This annotation allows custom `Collection` and `Map` objects to bypass the 
default Groovy format and equality methods ie. `toString` and `equals`.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/pditommaso/groovy 
ignore-default-groovy-methods

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/566.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #566


commit 8a9f43b4c937c8bce8674f75d1fe7b9575b7c740
Author: Paolo Di Tommaso <paolo.ditomm...@gmail.com>
Date:   2017-06-25T18:26:18Z

Added @IgnoreDefaultEqualsAndToString annotation that allows by-pass  
Groovy equals and toString methods for Map and Collection objects




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---