[GitHub] groovy pull request: [build] Remove javax.script pre-JDK6 dependen...
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/234 --- 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. ---
[GitHub] groovy pull request: Jdk5 cleanup
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/235 --- 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. ---
[jira] [Resolved] (GROOVY-7726) Groovysh doc command fails when using Java 9
[ https://issues.apache.org/jira/browse/GROOVY-7726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7726. --- Resolution: Fixed > Groovysh doc command fails when using Java 9 > > > Key: GROOVY-7726 > URL: https://issues.apache.org/jira/browse/GROOVY-7726 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.5 >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.4.6 > > > The command fails because the format of the version string returned by the > "java.version" system property has changed (see > [http://openjdk.java.net/jeps/223] for details). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7726) Groovysh doc command fails when using Java 9
[ https://issues.apache.org/jira/browse/GROOVY-7726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7726: -- Description: The command fails because the format of the version string returned by the "java.version" system property has changed (see [http://openjdk.java.net/jeps/223] for details). > Groovysh doc command fails when using Java 9 > > > Key: GROOVY-7726 > URL: https://issues.apache.org/jira/browse/GROOVY-7726 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.5 >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.4.6 > > > The command fails because the format of the version string returned by the > "java.version" system property has changed (see > [http://openjdk.java.net/jeps/223] for details). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7726) Groovysh doc command fails when using Java 9
[ https://issues.apache.org/jira/browse/GROOVY-7726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7726: -- Summary: Groovysh doc command fails when using Java 9 (was: Groovysh Doc Command fails on Java 9) > Groovysh doc command fails when using Java 9 > > > Key: GROOVY-7726 > URL: https://issues.apache.org/jira/browse/GROOVY-7726 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.5 >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.4.6 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7726) Groovysh Doc Command fails on Java 9
Pascal Schumacher created GROOVY-7726: - Summary: Groovysh Doc Command fails on Java 9 Key: GROOVY-7726 URL: https://issues.apache.org/jira/browse/GROOVY-7726 Project: Groovy Issue Type: Bug Components: Groovysh Affects Versions: 2.4.5 Reporter: Pascal Schumacher Assignee: Pascal Schumacher Priority: Minor Fix For: 2.4.6 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7530) disjoint() does not work correctly if objects don't implement Comparable
[ https://issues.apache.org/jira/browse/GROOVY-7530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085307#comment-15085307 ] Jochen Theodorou commented on GROOVY-7530: -- Ok, thanks for the clarification. We had been very very much irritated by this code causing a vulnerability issue. It is not out of question, since the example exploit for CVE-2015-3253 you mentioned actually does misuse a sorting structure in Java for the exploit. so I could not totally exclude such a possibility. Anyway... back to the problem. {code:Java} def a = [new Foo("foo")] def b = [new Foo("foo")] assert !a.disjoint(b) {code} The basic problem is as follows.. if the objects are somehow comparable, then you can do disjoint in O(nlogn), by first sorting one and then checking against the other. If the objects are not comparable and if I can only check for equality, then I am required to use an O(n*n) approach, by checking each elements of one list, against each of the other.. well it is more like n*n/2, but that does not matter when looking at the complexity. So in older versions we first did check both lists if all elements are Comparable, to then later decide on the strategy and go with the nlogn of the n*n variant. But this approach did also not get the desired results, as can be seen in the test in 286532c But I am wondering now... maybe the better approach is to add one more check like {code:java} if (o1.getClass()==o2.getClass() && (o1.equals(o2)) return 0; {code} But I wonder what we are supposed to return if equals gives false. If we say we return only 0, we could also think about removing the class check. or we keep the class check and return -1 in case of equals returning false. > disjoint() does not work correctly if objects don't implement Comparable > > > Key: GROOVY-7530 > URL: https://issues.apache.org/jira/browse/GROOVY-7530 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.4 >Reporter: Tobias Ahlers > > {code:java} > class Foo { > private String name > Foo(String name) { > this.name = name > } > public boolean equals(Object o) { > if (this == o) return true > if (o == null || getClass() != o.getClass()) return false > Foo that = (Foo) o > return Objects.equals(name, that.name) > } > public int hashCode() { > return Objects.hash(name) > } > } > def a = [new Foo("foo")] > def b = [new Foo("foo")] > assert !a.disjoint(b) > {code} > If disjoint() is used on a list with objects not implementing Comparable the > wrong result is returned. > intersect() shows the same wrong behavior. > It's looks like the NumberAwareComparator not implementing the equals case as > of commit 286532c is the problem. -- This message was sent by Atlassian JIRA (v6.3.4#6332)