[GitHub] danielsun1106 commented on issue #865: GROOVY-8272: Extending trait can't execute static method
danielsun1106 commented on issue #865: GROOVY-8272: Extending trait can't execute static method URL: https://github.com/apache/groovy/pull/865#issuecomment-458434766 +1 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 With regards, Apache Git Services
[GitHub] danielsun1106 commented on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity
danielsun1106 commented on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity URL: https://github.com/apache/groovy/pull/863#issuecomment-458429946 Understood. Keep it as it is or apply the patch for all branches. 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 With regards, Apache Git Services
[GitHub] paulk-asert commented on issue #861: Trivial refactoring: handle `Sql` with try-with-resources for simplicity
paulk-asert commented on issue #861: Trivial refactoring: handle `Sql` with try-with-resources for simplicity URL: https://github.com/apache/groovy/pull/861#issuecomment-458419366 +1 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 With regards, Apache Git Services
[GitHub] paulk-asert commented on issue #862: Trivial refactoring: remove unnecessary boxing and unboxing for simpl…
paulk-asert commented on issue #862: Trivial refactoring: remove unnecessary boxing and unboxing for simpl… URL: https://github.com/apache/groovy/pull/862#issuecomment-458419314 +1 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 With regards, Apache Git Services
[GitHub] paulk-asert commented on issue #864: GROOVY-8970: Fix typo in MANIFEST.MF: Main-class
paulk-asert commented on issue #864: GROOVY-8970: Fix typo in MANIFEST.MF: Main-class URL: https://github.com/apache/groovy/pull/864#issuecomment-458418672 +1. My understanding is that header names are case insensitive but we should use the typical convention of using uppercase for both parts. 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 With regards, Apache Git Services
[GitHub] paulk-asert opened a new pull request #865: GROOVY-8272: Extending trait can't execute static method
paulk-asert opened a new pull request #865: GROOVY-8272: Extending trait can't execute static method URL: https://github.com/apache/groovy/pull/865 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 With regards, Apache Git Services
[GitHub] paulk-asert edited a comment on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity
paulk-asert edited a comment on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity URL: https://github.com/apache/groovy/pull/863#issuecomment-458416752 +1. As further background, we have delayed doing such changes earlier since having such differences between branches makes applying patches more difficult - often leads to manual merge fixes which although simple, can be a little painful for large patches. Since 2.5 and 3.0 both now have JDK 7 min (8 for 3.0) I think it is safe to do this change. If we ever want to backport some fixes and re-release another 2.4 release, we'll have to be a little careful. I'd recommend applying to both 2_5_X/master branches (where applicable) using two commits if needed (and if it makes it easier). 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 With regards, Apache Git Services
[GitHub] paulk-asert edited a comment on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity
paulk-asert edited a comment on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity URL: https://github.com/apache/groovy/pull/863#issuecomment-458416752 +1. As further background, we have delayed doing such changes earlier since having such differences between branches makes applying patches more difficult - often leads to manual merge fixes which although simple, can be a little painful for large patches. Since 2.5 and 3.0 both now have JDK 7 min (8 for 3.0) I think it is safe to do this change. If we ever want to backport some fixes and re-release another 2.4 release, we'll have to be a little careful. I'd recommend applying to both branches (where applicable) using two commits if needed (and if it makes it easier). 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 With regards, Apache Git Services
[GitHub] paulk-asert commented on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity
paulk-asert commented on issue #863: Trivial refactoring: replace explicit type with `<>` for simplicity URL: https://github.com/apache/groovy/pull/863#issuecomment-458416752 +1. As further background, we have delayed doing such changes earlier since having such differences between branches makes applying patches more difficult - often leads to manual merge fixes which although simple, can be a little painful for large patches. Since 2.5 and 3.0 both now have JDK 7 min (8 for 3.0) I think it is safe to do this change. If we ever want to backport some fixes and re-release another 2.4 release, we'll have to be a little careful. 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 With regards, Apache Git Services
[jira] [Created] (GROOVY-8974) STC ignores declaration type
Daniil Ovchinnikov created GROOVY-8974: -- Summary: STC ignores declaration type Key: GROOVY-8974 URL: https://issues.apache.org/jira/browse/GROOVY-8974 Project: Groovy Issue Type: Bug Components: Static Type Checker Affects Versions: 2.5.5 Reporter: Daniil Ovchinnikov {code:java} static T id(T arg) { arg } @groovy.transform.CompileStatic def ddd() { List ls = id(new ArrayList<>()) ls.get(0).toUpperCase() // Cannot find matching method java.lang.Object#toUpperCase() } println ddd() {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (GROOVY-3358) static imports don't work for statically defined getters (property access)
[ https://issues.apache.org/jira/browse/GROOVY-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-3358. - I'll close this as it seems to have been fixed earlier: {code:java} class Environment { private static INSTANCE static Environment getCurrentEnvironment() { if (INSTANCE == null) { INSTANCE = new Environment() } } } import static Environment.* class Main { def method() { println currentEnvironment } } new Main().method() {code} > static imports don't work for statically defined getters (property access) > -- > > Key: GROOVY-3358 > URL: https://issues.apache.org/jira/browse/GROOVY-3358 > Project: Groovy > Issue Type: Sub-task > Components: Compiler >Reporter: Graeme Rocher >Priority: Major > > So I have a class that defines: > {code} > public static Environment getCurrentEnvironment() > {code} > I use this class like: > {code} > import static grails.util.Environment.* > {code} > However this throws a MPE: > {code} > println currentEnvironment > {code} > whilst this works > {code} > println getCurrentEnvironment() > {code} > Seems wrong that propery notation should work for a static getter when it > works when used directly: > {code} > import grails.util.Environment > println Environment.currentEnvironment > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-3358) static imports don't work for statically defined getters (property access)
[ https://issues.apache.org/jira/browse/GROOVY-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King updated GROOVY-3358: -- Fix Version/s: (was: 4.x) > static imports don't work for statically defined getters (property access) > -- > > Key: GROOVY-3358 > URL: https://issues.apache.org/jira/browse/GROOVY-3358 > Project: Groovy > Issue Type: Sub-task > Components: Compiler >Reporter: Graeme Rocher >Priority: Major > > So I have a class that defines: > {code} > public static Environment getCurrentEnvironment() > {code} > I use this class like: > {code} > import static grails.util.Environment.* > {code} > However this throws a MPE: > {code} > println currentEnvironment > {code} > whilst this works > {code} > println getCurrentEnvironment() > {code} > Seems wrong that propery notation should work for a static getter when it > works when used directly: > {code} > import grails.util.Environment > println Environment.currentEnvironment > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8973) groovy.lang.MissingPropertyException with GORM and Groovy 2.5.5
Iván López created GROOVY-8973: -- Summary: groovy.lang.MissingPropertyException with GORM and Groovy 2.5.5 Key: GROOVY-8973 URL: https://issues.apache.org/jira/browse/GROOVY-8973 Project: Groovy Issue Type: Bug Affects Versions: 2.5.5 Reporter: Iván López Using GORM DataServices in Micronaut with Groovy 2.5.5 throws a {{MissingPropertyException}}. This is probably because GORM is compiled with Groovy 2.4.x. To reproduce the issue: - {{git clone https://github.com/micronaut-projects/micronaut-examples}} - {{cd micronaut-examples/petstore}} - Use the following commit because forcing Groovy 2.5.1 fixes the issue, but no with latest Groovy: - {{git checkout 8752b4ba8d8d9f30b65f12a872a02be130acc184}} - {{./gradlew vendors:test --tests "example.vendors.VendorControllerSpec.test save vendor"}} The exception is: {code} groovy.lang.MissingPropertyException: No such property: $validatedMethod0 for class: example.vendors.$VendorServiceImplementation at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67) at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:87) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309) at example.vendors.VendorService.findOrCreate(VendorService.groovy) at example.vendors.VendorService$findOrCreate.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) at example.vendors.VendorController.save(VendorController.groovy:71) {code} Reported in this issue in Micronaut: https://github.com/micronaut-projects/micronaut-core/issues/1176 -- This message was sent by Atlassian JIRA (v7.6.3#76005)