[jira] [Resolved] (GROOVY-8505) ArrayIndexOutOfBoundsException with @Nullable change
[ https://issues.apache.org/jira/browse/GROOVY-8505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Wagenleitner resolved GROOVY-8505. --- Resolution: Fixed Assignee: John Wagenleitner Fix Version/s: 2.5.1 2.4.16 Thanks for reporting the issue. > ArrayIndexOutOfBoundsException with @Nullable change > > > Key: GROOVY-8505 > URL: https://issues.apache.org/jira/browse/GROOVY-8505 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.4.12 > Environment: See > https://scans.gradle.com/s/gr3dszv44wkfg/console-log#L476 for execution > details. >Reporter: Lóránt Pintér >Assignee: John Wagenleitner >Priority: Major > Fix For: 2.4.16, 2.5.1 > > > *Steps to reproduce:* > {code} > $ git clone [https://github.com/gradle/gradle > $ cd gradle > $ git checkout c8e7ac4adb2f72390ed681eb8bfdaa4baa8e > $ ./gradlew :core:compileTestGroovy > $ # ^ This version works > $ git revert --no-commit head > $ ./gradlew :core:compileTestGroovy > $ # ^ This will fail > {code} > The reverted commit is this: > https://github.com/gradle/gradle/pull/4682/commits/c8e7ac4adb2f72390ed681eb8bfdaa4baa8e > It removes a {{@Nullable}} annotation from a constructor parameter. If the > annotation is present (i.e. the commit is reverted), {{./gradlew > :core:compileTestGroovy}} will produce the following exception: > {code} > java.lang.ArrayIndexOutOfBoundsException: 1 > at > org.codehaus.groovy.vmplugin.v5.Java5.makeParameters(Java5.java:451) > at > org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:382) > at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:280) > at > org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1009) > at > org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1004) > at org.codehaus.groovy.ast.ClassNode.getSuperClass(ClassNode.java:998) > at org.codehaus.groovy.ast.ClassNode.isDerivedFrom(ClassNode.java:941) > at > org.codehaus.groovy.classgen.asm.InvocationWriter.castToNonPrimitiveIfNecessary(InvocationWriter.java:863) > at > org.codehaus.groovy.classgen.asm.OperandStack.doConvertAndCast(OperandStack.java:345) > at > org.codehaus.groovy.classgen.asm.OperandStack.doGroovyCast(OperandStack.java:282) > at > org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.evaluateEqual(BinaryExpressionHelper.java:344) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitDeclarationExpression(AsmClassGenerator.java:637) > at > org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:89) > at > org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:613) > at > org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:366) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:624) > at > org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42) > at > org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:85) > at > org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:159) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:570) > at > org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:434) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:387) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:511) > at > org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1081) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53) > at > org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:233) > at > org.codehaus.groovy.control.CompilationUnit.call(CompilationUnit.java:825) > at >
[jira] [Resolved] (GROOVY-8008) @CompileStatic causes failure to compile Groovy class that calls overloaded Java method
[ https://issues.apache.org/jira/browse/GROOVY-8008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Wagenleitner resolved GROOVY-8008. --- Resolution: Fixed Assignee: John Wagenleitner Fix Version/s: 2.5.1 2.4.16 Thanks for reporting the issue. > @CompileStatic causes failure to compile Groovy class that calls overloaded > Java method > --- > > Key: GROOVY-8008 > URL: https://issues.apache.org/jira/browse/GROOVY-8008 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.5, 2.4.7, 2.4.8 > Environment: Mac OS / Java 8_u112 >Reporter: Renato Athaydes >Assignee: John Wagenleitner >Priority: Major > Fix For: 2.4.16, 2.5.1 > > > This bug is not making sense to me, but I want to report it because it's > incredibly frustrating to get an error message that won't even tell me which > file the compiler was trying to compile before throwing an Exception. > Here's the stacktrace: > Error:Groovyc: While compiling osgiaas-cli-groovy_main: > java.lang.ArrayIndexOutOfBoundsException: 2 > at org.codehaus.groovy.vmplugin.v5.Java5.makeParameters(Java5.java:443) > at > org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:376) > at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:265) > at org.codehaus.groovy.ast.ClassNode.getAnnotations(ClassNode.java:1431) > at org.codehaus.groovy.ast.ClassNode.getAnnotations(ClassNode.java:1430) > at > org.codehaus.groovy.transform.trait.Traits.isAnnotatedWithTrait(Traits.java:170) > at org.codehaus.groovy.transform.trait.Traits.isTrait(Traits.java:149) > at > org.codehaus.groovy.transform.trait.Traits.collectSelfTypes(Traits.java:309) > at > org.codehaus.groovy.transform.trait.Traits.collectSelfTypes(Traits.java:291) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.addSelfTypes(StaticTypeCheckingVisitor.java:3102) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.makeOwnerList(StaticTypeCheckingVisitor.java:3083) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2852) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitProperty(ClassCodeVisitorSupport.java:144) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitProperty(StaticTypeCheckingVisitor.java:1518) > at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1074) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:249) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:122) > at > org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:63) > at > org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:134) > at > org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:178) > at > org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1055) > at >
[jira] [Resolved] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Wagenleitner resolved GROOVY-8654. --- Resolution: Fixed Assignee: John Wagenleitner Fix Version/s: 2.5.1 Thanks for reporting the issue and for the pull request. > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.x >Reporter: Andrej Balles >Assignee: John Wagenleitner >Priority: Trivial > Fix For: 2.5.1 > > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518922#comment-16518922 ] ASF GitHub Bot commented on GROOVY-8654: Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/761 > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #761: GROOVY-8654: fixed documentation build command
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/761 ---
[jira] [Commented] (GROOVY-8008) @CompileStatic causes failure to compile Groovy class that calls overloaded Java method
[ https://issues.apache.org/jira/browse/GROOVY-8008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518916#comment-16518916 ] ASF GitHub Bot commented on GROOVY-8008: Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/757 > @CompileStatic causes failure to compile Groovy class that calls overloaded > Java method > --- > > Key: GROOVY-8008 > URL: https://issues.apache.org/jira/browse/GROOVY-8008 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.5, 2.4.7, 2.4.8 > Environment: Mac OS / Java 8_u112 >Reporter: Renato Athaydes >Priority: Major > > This bug is not making sense to me, but I want to report it because it's > incredibly frustrating to get an error message that won't even tell me which > file the compiler was trying to compile before throwing an Exception. > Here's the stacktrace: > Error:Groovyc: While compiling osgiaas-cli-groovy_main: > java.lang.ArrayIndexOutOfBoundsException: 2 > at org.codehaus.groovy.vmplugin.v5.Java5.makeParameters(Java5.java:443) > at > org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:376) > at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:265) > at org.codehaus.groovy.ast.ClassNode.getAnnotations(ClassNode.java:1431) > at org.codehaus.groovy.ast.ClassNode.getAnnotations(ClassNode.java:1430) > at > org.codehaus.groovy.transform.trait.Traits.isAnnotatedWithTrait(Traits.java:170) > at org.codehaus.groovy.transform.trait.Traits.isTrait(Traits.java:149) > at > org.codehaus.groovy.transform.trait.Traits.collectSelfTypes(Traits.java:309) > at > org.codehaus.groovy.transform.trait.Traits.collectSelfTypes(Traits.java:291) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.addSelfTypes(StaticTypeCheckingVisitor.java:3102) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.makeOwnerList(StaticTypeCheckingVisitor.java:3083) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2852) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297) > at > org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitProperty(ClassCodeVisitorSupport.java:144) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitProperty(StaticTypeCheckingVisitor.java:1518) > at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1074) > at > org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53) > at > org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:249) > at > org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:122) > at > org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:63) > at > org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:134) > at > org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:178) > at > org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1055) > at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591) > at >
[GitHub] groovy pull request #757: GROOVY-8008: AIOOB inner class ctor params with ru...
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/757 ---
[jira] [Created] (GROOVY-8656) GroovyScriptEngine doesn't always reload classes
Gary Clayburg created GROOVY-8656: - Summary: GroovyScriptEngine doesn't always reload classes Key: GROOVY-8656 URL: https://issues.apache.org/jira/browse/GROOVY-8656 Project: Groovy Issue Type: Bug Components: Compiler, groovy-runtime, GroovyScriptEngine Affects Versions: 2.5.0 Reporter: Gary Clayburg I am seeing some non-deterministic behavior when reloading classes with GroovyScriptEngine. Sometimes the dependent classes will compile and reload as expected and sometimes they won't. Consider these 4 classes adapted slightly from the [documentation|http://docs.groovy-lang.org/next/html/documentation/guide-integrating.html#_groovyscriptengine] : RunScript.groovy {code:java} def binding = new Binding() def engine = new GroovyScriptEngine(["/home/gclaybur/dev/gvsync/groovystatic"] as String[]) while (true) { def greeter = engine.run('ReloadingTest.groovy', binding) println greeter.sayHello() Thread.sleep(1000) }{code} ReloadingTest.groovy {code:java} class Greeter { static String sayHello() { String greet = "Hello there, " + StaticFun.world greet } } new Greeter() {code} StaticFun.groovy {code:java} class StaticFun { static String world="world! " + StaticMess.mess } {code} StaticMess.groovy {code} class StaticMess { public static String mess = "Have a great day!" } {code} When you execute RunScript.groovy the first time, you see the intended output: {noformat} Hello there, world! Have a great day!{noformat} However, if you alternate between editing StaticFun.groovy and StaticMess.groovy you will see that the classes are not always recompiled by the script engine and you see stale output. Is extra configuration needed to force recompilation for static fields? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8655) Grapes fails to download artifact if POM exists in m2 local, but jar does not
[ https://issues.apache.org/jira/browse/GROOVY-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518696#comment-16518696 ] Paul King commented on GROOVY-8655: --- It would be good determine whether this fix should be in groovy or ivy. Have you dived in enough to be able to tell? > Grapes fails to download artifact if POM exists in m2 local, but jar does not > - > > Key: GROOVY-8655 > URL: https://issues.apache.org/jira/browse/GROOVY-8655 > Project: Groovy > Issue Type: Bug > Components: Grape >Affects Versions: 2.5.0 > Environment: Groovy Version: 2.5.0 JVM: 1.8.0_172 Vendor: Azul > Systems, Inc. OS: Mac OS X >Reporter: Mike Robinet >Priority: Minor > Attachments: grapeError.log > > > > *Steps to reproduce:* > * These instructions use slf4j-api as an example, but it is reproducible > with any artifact. > * Remove local Grapes cache: {{rm -rf ~/.groovy/Grapes}} > * Remove org.slf4j:slf4j-api artifacts from Maven local cache: {{rm -rf > ~/.m2/repository/org/slf4j/slf4j-api}} > * Remove any custom Ivy or Grapes config > * Download POM only for slf4j-api: {{mvn dependency:get > -Dartifact=org.slf4j:slf4j-api:1.7.25:pom -Dtransitive=false}} > * Attempt to install slf4j-api using Grapes: {{grape -V install org.slf4j > slf4j-api 1.7.25}} > *Expected behavior:* > * slf4j-api 1.7.25 jar is downloaded from jcenter > *Actual Behavior:* > * Fails to retrieve jar with NOT FOUND error (verbose log attached): > > {noformat} > :: problems summary :: > WARNINGS > [NOT FOUND ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar (0ms) > localm2: tried > > file:/Users/Mike/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar > {noformat} > *Workaround:* > * Delete slf4j-api/1.7.25 folder in Maven local and Grapes cache folder and > reinstall. > *Additional notes:* > It is fairly common to only have the POM file for artifacts in your Maven > local. I use the > [gradle-versions-plugin|https://github.com/ben-manes/gradle-versions-plugin] > frequently which is just one example of a tool that downloads only POM files > for artifacts. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8655) Grapes fails to download artifact if POM exists in m2 local, but jar does not
[ https://issues.apache.org/jira/browse/GROOVY-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518400#comment-16518400 ] Mike Robinet commented on GROOVY-8655: -- Possibly the same issue. > Grapes fails to download artifact if POM exists in m2 local, but jar does not > - > > Key: GROOVY-8655 > URL: https://issues.apache.org/jira/browse/GROOVY-8655 > Project: Groovy > Issue Type: Bug > Components: Grape >Affects Versions: 2.5.0 > Environment: Groovy Version: 2.5.0 JVM: 1.8.0_172 Vendor: Azul > Systems, Inc. OS: Mac OS X >Reporter: Mike Robinet >Priority: Minor > Attachments: grapeError.log > > > > *Steps to reproduce:* > * These instructions use slf4j-api as an example, but it is reproducible > with any artifact. > * Remove local Grapes cache: {{rm -rf ~/.groovy/Grapes}} > * Remove org.slf4j:slf4j-api artifacts from Maven local cache: {{rm -rf > ~/.m2/repository/org/slf4j/slf4j-api}} > * Remove any custom Ivy or Grapes config > * Download POM only for slf4j-api: {{mvn dependency:get > -Dartifact=org.slf4j:slf4j-api:1.7.25:pom -Dtransitive=false}} > * Attempt to install slf4j-api using Grapes: {{grape -V install org.slf4j > slf4j-api 1.7.25}} > *Expected behavior:* > * slf4j-api 1.7.25 jar is downloaded from jcenter > *Actual Behavior:* > * Fails to retrieve jar with NOT FOUND error (verbose log attached): > > {noformat} > :: problems summary :: > WARNINGS > [NOT FOUND ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar (0ms) > localm2: tried > > file:/Users/Mike/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar > {noformat} > *Workaround:* > * Delete slf4j-api/1.7.25 folder in Maven local and Grapes cache folder and > reinstall. > *Additional notes:* > It is fairly common to only have the POM file for artifacts in your Maven > local. I use the > [gradle-versions-plugin|https://github.com/ben-manes/gradle-versions-plugin] > frequently which is just one example of a tool that downloads only POM files > for artifacts. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8655) Grapes fails to download artifact if POM exists in m2 local, but jar does not
[ https://issues.apache.org/jira/browse/GROOVY-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518354#comment-16518354 ] Mike Robinet commented on GROOVY-8655: -- Based on the logs I believe https://issues.apache.org/jira/browse/GROOVY-7776 is probably the same issue, but can't confirm since I don't know what exists for that artifact in Maven local. > Grapes fails to download artifact if POM exists in m2 local, but jar does not > - > > Key: GROOVY-8655 > URL: https://issues.apache.org/jira/browse/GROOVY-8655 > Project: Groovy > Issue Type: Bug > Components: Grape >Affects Versions: 2.5.0 > Environment: Groovy Version: 2.5.0 JVM: 1.8.0_172 Vendor: Azul > Systems, Inc. OS: Mac OS X >Reporter: Mike Robinet >Priority: Minor > Attachments: grapeError.log > > > > *Steps to reproduce:* > * These instructions use slf4j-api as an example, but it is reproducible > with any artifact. > * Remove local Grapes cache: {{rm -rf ~/.groovy/Grapes}} > * Remove org.slf4j:slf4j-api artifacts from Maven local cache: {{rm -rf > ~/.m2/repository/org/slf4j/slf4j-api}} > * Remove any custom Ivy or Grapes config > * Download POM only for slf4j-api: {{mvn dependency:get > -Dartifact=org.slf4j:slf4j-api:1.7.25:pom -Dtransitive=false}} > * Attempt to install slf4j-api using Grapes: {{grape -V install org.slf4j > slf4j-api 1.7.25}} > *Expected behavior:* > * slf4j-api 1.7.25 jar is downloaded from jcenter > *Actual Behavior:* > * Fails to retrieve jar with NOT FOUND error (verbose log attached): > > {noformat} > :: problems summary :: > WARNINGS > [NOT FOUND ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar (0ms) > localm2: tried > > file:/Users/Mike/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar > {noformat} > *Workaround:* > * Delete slf4j-api/1.7.25 folder in Maven local and Grapes cache folder and > reinstall. > *Additional notes:* > It is fairly common to only have the POM file for artifacts in your Maven > local. I use the > [gradle-versions-plugin|https://github.com/ben-manes/gradle-versions-plugin] > frequently which is just one example of a tool that downloads only POM files > for artifacts. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8655) Grapes fails to download artifact if POM exists in m2 local, but jar does not
Mike Robinet created GROOVY-8655: Summary: Grapes fails to download artifact if POM exists in m2 local, but jar does not Key: GROOVY-8655 URL: https://issues.apache.org/jira/browse/GROOVY-8655 Project: Groovy Issue Type: Bug Components: Grape Affects Versions: 2.5.0 Environment: Groovy Version: 2.5.0 JVM: 1.8.0_172 Vendor: Azul Systems, Inc. OS: Mac OS X Reporter: Mike Robinet Attachments: grapeError.log *Steps to reproduce:* * These instructions use slf4j-api as an example, but it is reproducible with any artifact. * Remove local Grapes cache: {{rm -rf ~/.groovy/Grapes}} * Remove org.slf4j:slf4j-api artifacts from Maven local cache: {{rm -rf ~/.m2/repository/org/slf4j/slf4j-api}} * Remove any custom Ivy or Grapes config * Download POM only for slf4j-api: {{mvn dependency:get -Dartifact=org.slf4j:slf4j-api:1.7.25:pom -Dtransitive=false}} * Attempt to install slf4j-api using Grapes: {{grape -V install org.slf4j slf4j-api 1.7.25}} *Expected behavior:* * slf4j-api 1.7.25 jar is downloaded from jcenter *Actual Behavior:* * Fails to retrieve jar with NOT FOUND error (verbose log attached): {noformat} :: problems summary :: WARNINGS [NOT FOUND ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar (0ms) localm2: tried file:/Users/Mike/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar {noformat} *Workaround:* * Delete slf4j-api/1.7.25 folder in Maven local and Grapes cache folder and reinstall. *Additional notes:* It is fairly common to only have the POM file for artifacts in your Maven local. I use the [gradle-versions-plugin|https://github.com/ben-manes/gradle-versions-plugin] frequently which is just one example of a tool that downloads only POM files for artifacts. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Issue Comment Deleted] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrej Balles updated GROOVY-8654: -- Comment: was deleted (was: created a pull request https://github.com/apache/groovy/pull/761) > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518313#comment-16518313 ] Andrej Balles commented on GROOVY-8654: --- created a pull request https://github.com/apache/groovy/pull/761 > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518312#comment-16518312 ] ASF GitHub Bot commented on GROOVY-8654: GitHub user ab2 opened a pull request: https://github.com/apache/groovy/pull/761 GROOVY-8654: fixed documentation build command changed the command to build GroovyDoc as suggested by Paul King in JIRA You can merge this pull request into a Git repository by running: $ git pull https://github.com/ab2/groovy master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/761.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 #761 commit 46316b6797990d61496b8471e01baf3b2da8a620 Author: Andrej Balles Date: 2018-06-20T15:54:19Z GROOVY-8654: fixed documentation build command > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #761: GROOVY-8654: fixed documentation build command
GitHub user ab2 opened a pull request: https://github.com/apache/groovy/pull/761 GROOVY-8654: fixed documentation build command changed the command to build GroovyDoc as suggested by Paul King in JIRA You can merge this pull request into a Git repository by running: $ git pull https://github.com/ab2/groovy master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/761.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 #761 commit 46316b6797990d61496b8471e01baf3b2da8a620 Author: Andrej Balles Date: 2018-06-20T15:54:19Z GROOVY-8654: fixed documentation build command ---
[jira] [Updated] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrej Balles updated GROOVY-8654: -- Affects Version/s: (was: 4.x) 3.x > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518213#comment-16518213 ] Andrej Balles edited comment on GROOVY-8654 at 6/20/18 2:48 PM: Yes {{gradlew asciidoc}} works. So there is simply a mistake in README.adoc in root folder. Version related to gradle version, not groovy, changed it to groovy version. was (Author: dredd): Yes \{{gradlew asciidoc}} works. So there is simply a mistake in README.adoc in root folder. Version related to gradle version, not groovy > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 4.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518213#comment-16518213 ] Andrej Balles commented on GROOVY-8654: --- Yes \{{gradlew asciidoc}} works. So there is simply a mistake in README.adoc in root folder. Version related to gradle version, not groovy > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 4.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16517961#comment-16517961 ] Paul King edited comment on GROOVY-8654 at 6/20/18 9:20 AM: did you try {{gradlew asciidoc}}? Also, when you say version 4.x are you talking about groovy version or gradle version? was (Author: paulk): did you try {{gradlew asciidoc}}? > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 4.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16517961#comment-16517961 ] Paul King commented on GROOVY-8654: --- did you try {{gradlew asciidoc}}? > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 4.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8654) Can't compile documentation, no Gradle task defined for this
[ https://issues.apache.org/jira/browse/GROOVY-8654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrej Balles updated GROOVY-8654: -- Description: Hi! trying to build the documentation fails, because no gradle task defined: {code:java} gradlew assembleAsciidoc ... * What went wrong: Task 'assembleAsciidoc' not found in root project 'groovy'.{code} was: Hi! trying to build the documentation fails, because no gradle task defined: gradlew assembleAsciidoc * What went wrong: Task 'assembleAsciidoc' not found in root project 'groovy'. > Can't compile documentation, no Gradle task defined for this > - > > Key: GROOVY-8654 > URL: https://issues.apache.org/jira/browse/GROOVY-8654 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 4.x >Reporter: Andrej Balles >Priority: Trivial > > Hi! > trying to build the documentation fails, because no gradle task defined: > {code:java} > gradlew assembleAsciidoc > ... > * What went wrong: > Task 'assembleAsciidoc' not found in root project 'groovy'.{code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8653) foreach index value error
[ https://issues.apache.org/jira/browse/GROOVY-8653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] chenxiaojie updated GROOVY-8653: Description: {code:java} import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.ExecutorService import java.util.concurrent.Executors import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() // println 6583 ??? size is 0-1 integer println map2.size() // println 1 println map3.size() {code} was: {code:java} ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() // println 6583 ??? size is 0-1 integer println map2.size() // println 1 println map3.size() {code} > foreach index value error > - > > Key: GROOVY-8653 > URL: https://issues.apache.org/jira/browse/GROOVY-8653 > Project: Groovy > Issue Type: Bug > Components: Groovy Console, groovy-jdk >Affects Versions: 2.3.7, 2.4.15 > Environment: jdk1.7.0_79 >Reporter: chenxiaojie >Priority: Major > Original Estimate: 12h > Remaining Estimate: 12h > > {code:java} > import java.util.concurrent.ConcurrentHashMap > import java.util.concurrent.ExecutorService > import java.util.concurrent.Executors > import java.util.concurrent.TimeUnit > import java.util.concurrent.atomic.AtomicInteger > > ConcurrentHashMap map = new > ConcurrentHashMap(1) > ConcurrentHashMap map2 = new > ConcurrentHashMap(1) > ConcurrentHashMap map3 = new > ConcurrentHashMap(1) > ExecutorService es = Executors.newFixedThreadPool(100) > 1.upto(1) { >
[jira] [Updated] (GROOVY-8653) foreach index value error
[ https://issues.apache.org/jira/browse/GROOVY-8653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] chenxiaojie updated GROOVY-8653: Description: {code:java} ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() {color:red}// println 6583 ??? size is 0-1 integer println map2.size(){color} // println 1 println map3.size() {code} was: ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() {color:red}// println 6583 ??? size is 0-1 integer println map2.size(){color} // println 1 println map3.size() > foreach index value error > - > > Key: GROOVY-8653 > URL: https://issues.apache.org/jira/browse/GROOVY-8653 > Project: Groovy > Issue Type: Bug > Components: Groovy Console, groovy-jdk >Affects Versions: 2.3.7, 2.4.15 > Environment: jdk1.7.0_79 >Reporter: chenxiaojie >Priority: Major > Original Estimate: 12h > Remaining Estimate: 12h > > {code:java} > ConcurrentHashMap map = new > ConcurrentHashMap(1) > ConcurrentHashMap map2 = new > ConcurrentHashMap(1) > ConcurrentHashMap map3 = new > ConcurrentHashMap(1) > ExecutorService es = Executors.newFixedThreadPool(100) >
[jira] [Updated] (GROOVY-8653) foreach index value error
[ https://issues.apache.org/jira/browse/GROOVY-8653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] chenxiaojie updated GROOVY-8653: Description: {code:java} ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() // println 6583 ??? size is 0-1 integer println map2.size() // println 1 println map3.size() {code} was: {code:java} ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() {color:red}// println 6583 ??? size is 0-1 integer println map2.size(){color} // println 1 println map3.size() {code} > foreach index value error > - > > Key: GROOVY-8653 > URL: https://issues.apache.org/jira/browse/GROOVY-8653 > Project: Groovy > Issue Type: Bug > Components: Groovy Console, groovy-jdk >Affects Versions: 2.3.7, 2.4.15 > Environment: jdk1.7.0_79 >Reporter: chenxiaojie >Priority: Major > Original Estimate: 12h > Remaining Estimate: 12h > > {code:java} > ConcurrentHashMap map = new > ConcurrentHashMap(1) > ConcurrentHashMap map2 = new > ConcurrentHashMap(1) > ConcurrentHashMap map3 = new > ConcurrentHashMap(1) > ExecutorService es = Executors.newFixedThreadPool(100) >
[jira] [Created] (GROOVY-8653) foreach index value error
chenxiaojie created GROOVY-8653: --- Summary: foreach index value error Key: GROOVY-8653 URL: https://issues.apache.org/jira/browse/GROOVY-8653 Project: Groovy Issue Type: Bug Components: Groovy Console, groovy-jdk Affects Versions: 2.4.15, 2.3.7 Environment: jdk1.7.0_79 Reporter: chenxiaojie ConcurrentHashMap map = new ConcurrentHashMap(1) ConcurrentHashMap map2 = new ConcurrentHashMap(1) ConcurrentHashMap map3 = new ConcurrentHashMap(1) ExecutorService es = Executors.newFixedThreadPool(100) 1.upto(1) { i -> es.execute { AtomicInteger count = map.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { es.execute { AtomicInteger count = map2.get(i) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map2.putIfAbsent(i, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } for (Integer i = 0; i < 1; i++) { Integer j = i es.execute { AtomicInteger count = map3.get(j) if (count == null) { count = new AtomicInteger(0) AtomicInteger oldCount = map3.putIfAbsent(j, count) if (oldCount != null) { count = oldCount } } count.incrementAndGet() } } es.shutdown() es.awaitTermination(1, TimeUnit.MINUTES) // println 1 println map.size() {color:red}// println 6583 ??? size is 0-1 integer println map2.size(){color} // println 1 println map3.size() -- This message was sent by Atlassian JIRA (v7.6.3#76005)