[jira] [Created] (GROOVY-7737) Provide static methods in GeneralUtils to create ThrowStatement and CatchStatement

2016-01-29 Thread Anton (JIRA)
Anton created GROOVY-7737:
-

 Summary: Provide static methods in GeneralUtils to create 
ThrowStatement and CatchStatement
 Key: GROOVY-7737
 URL: https://issues.apache.org/jira/browse/GROOVY-7737
 Project: Groovy
  Issue Type: Improvement
Reporter: Anton
Priority: Minor


The class {{GeneralUtils}} provides some helpful static methods to build AST 
nodes.
However some methods are missing - e.g. for creating a {{ThrowStatement}} and a 
{{CatchStatement}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (GROOVY-7738) BUG! exception in phase 'semantic analysis' in source unit

2016-01-29 Thread harrry (JIRA)
harrry created GROOVY-7738:
--

 Summary: BUG! exception in phase 'semantic analysis' in source unit
 Key: GROOVY-7738
 URL: https://issues.apache.org/jira/browse/GROOVY-7738
 Project: Groovy
  Issue Type: Bug
Affects Versions: 2.1.7
Reporter: harrry


we have a project developed in groovy using 1.8.0 using SOAPUI 5.1.2. I 
migrated the project  from SoapUI 5.1.2 to Ready API 1.2.2 which has groovy 
groovy-all 2.1.7.jar. Ready API 1.2.2 is no more compatible with groovy 
1.8.0.So, I was using groovy -all 2.1.7 jar but when I run my script I was 
getting the below  error:-
{noformat}
Fri Jan 29 10:12:28 EST 2016:ERROR:cannot get error line number!
Fri Jan 29 10:12:28 EST 2016:ERROR:java.lang.IllegalStateException: No match 
found
   java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Unknown Source)
at 
com.eviware.soapui.support.GroovyUtils.extractErrorLineNumber(GroovyUtils.java:132)
at 
com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:164)
at 
com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Fri Jan 29 10:12:28 EST 2016:ERROR:BUG! exception in phase 'semantic analysis' 
in source unit 'Script5.groovy' The lookup for dbUtils_TargetApi.TGTQueries 
caused a failed compilaton. There should not have been any compilation from 
this call.
   BUG! exception in phase 'semantic analysis' in source unit 'Script5.groovy' 
The lookup for dbUtils_TargetApi.TGTQueries caused a failed compilaton. There 
should not have been any compilation from this call.
at 
org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:188)
at 
org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:168)
at 
org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:124)
at 
org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:616)
at 
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:268)
at 
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:236)
at 
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:220)
at 
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:232)
at 
org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:969)
at 
org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:646)
at 
org.codehaus.groovy.control.ResolveVisitor.transformDeclarationExpression(ResolveVisitor.java:1010)
at 
org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:638)
at 
org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
at 
org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
at 
org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:163)
at 
org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1240)
at 
org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
at 
org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:50)
at 
org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:166)
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1055)
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
at 
org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1183)
at 
org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:141)
at 
org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:632)
at 
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:912)
at 
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(Compilat

[GitHub] groovy pull request: GROOVY-7737 Provide static methods in General...

2016-01-29 Thread antonsarov
GitHub user antonsarov opened a pull request:

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

GROOVY-7737 Provide static methods in GeneralUtils

Fixes https://issues.apache.org/jira/browse/GROOVY-7737

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

$ git pull https://github.com/antonsarov/groovy groovy-7737

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

https://github.com/apache/groovy/pull/251.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 #251


commit 28b5915f915ae4f013098dd3b031a7275cce3942
Author: asa 
Date:   2016-01-29T15:50:03Z

GROOVY-7737 Provide static methods in GeneralUtils




---
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] [Commented] (GROOVY-7737) Provide static methods in GeneralUtils to create ThrowStatement and CatchStatement

2016-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GROOVY-7737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123623#comment-15123623
 ] 

ASF GitHub Bot commented on GROOVY-7737:


GitHub user antonsarov opened a pull request:

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

GROOVY-7737 Provide static methods in GeneralUtils

Fixes https://issues.apache.org/jira/browse/GROOVY-7737

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

$ git pull https://github.com/antonsarov/groovy groovy-7737

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

https://github.com/apache/groovy/pull/251.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 #251


commit 28b5915f915ae4f013098dd3b031a7275cce3942
Author: asa 
Date:   2016-01-29T15:50:03Z

GROOVY-7737 Provide static methods in GeneralUtils




> Provide static methods in GeneralUtils to create ThrowStatement and 
> CatchStatement
> --
>
> Key: GROOVY-7737
> URL: https://issues.apache.org/jira/browse/GROOVY-7737
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Anton
>Priority: Minor
>
> The class {{GeneralUtils}} provides some helpful static methods to build AST 
> nodes.
> However some methods are missing - e.g. for creating a {{ThrowStatement}} and 
> a {{CatchStatement}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GROOVY-7737) Provide static methods in GeneralUtils to create ThrowStatement and CatchStatement

2016-01-29 Thread Anton (JIRA)

[ 
https://issues.apache.org/jira/browse/GROOVY-7737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123652#comment-15123652
 ] 

Anton commented on GROOVY-7737:
---

A pull request is available here https://github.com/apache/groovy/pull/251 - 
with passing Jenkins build

> Provide static methods in GeneralUtils to create ThrowStatement and 
> CatchStatement
> --
>
> Key: GROOVY-7737
> URL: https://issues.apache.org/jira/browse/GROOVY-7737
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Anton
>Priority: Minor
>
> The class {{GeneralUtils}} provides some helpful static methods to build AST 
> nodes.
> However some methods are missing - e.g. for creating a {{ThrowStatement}} and 
> a {{CatchStatement}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GROOVY-7727) Cannot create unicode sequences using \Uxxxxxx

2016-01-29 Thread Aseem Bansal (JIRA)

[ 
https://issues.apache.org/jira/browse/GROOVY-7727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123730#comment-15123730
 ] 

Aseem Bansal commented on GROOVY-7727:
--

I tried your code in Java.
\Uxxx failed in java also https://ideone.com/W99GOs

And that line says "provides a code point input method which accepts strings". 
So there is a specific method which accepts this format.

So this is not a bug. If you find the method name please do share.

> Cannot create unicode sequences using \Uxx
> --
>
> Key: GROOVY-7727
> URL: https://issues.apache.org/jira/browse/GROOVY-7727
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.4.5
>Reporter: Andres Almiray
>
> According to 
> http://www.oracle.com/technetwork/articles/java/supplementary-142654.html 
> "For text input, the Java 2 SDK provides a code point input method which 
> accepts strings of the form "\Uxx", where the uppercase "U" indicates 
> that the escape sequence contains six hexadecimal digits, thus allowing for 
> supplementary characters. A lowercase "u" indicates the original form of the 
> escape sequences, "\u". You can find this input method and its 
> documentation in the directory demo/jfc/CodePointIM of the J2SDK."
> The following code fails with a syntax exception
> s = "\U01f5d0"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GROOVY-7738) BUG! exception in phase 'semantic analysis' in source unit

2016-01-29 Thread Pascal Schumacher (JIRA)

[ 
https://issues.apache.org/jira/browse/GROOVY-7738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123968#comment-15123968
 ] 

Pascal Schumacher commented on GROOVY-7738:
---

Hi harry,

I'm sorry, but we can not help you with just a stacktrace. Please provide a 
self-contained script. Groovy 2.1 is pretty old and not supported any more. 
Please give Groovy 2.4 a try.

Cheers,
Pascal



> BUG! exception in phase 'semantic analysis' in source unit
> --
>
> Key: GROOVY-7738
> URL: https://issues.apache.org/jira/browse/GROOVY-7738
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.1.7
>Reporter: harrry
>
> we have a project developed in groovy using 1.8.0 using SOAPUI 5.1.2. I 
> migrated the project  from SoapUI 5.1.2 to Ready API 1.2.2 which has groovy 
> groovy-all 2.1.7.jar. Ready API 1.2.2 is no more compatible with groovy 
> 1.8.0.So, I was using groovy -all 2.1.7 jar but when I run my script I was 
> getting the below  error:-
> {noformat}
> Fri Jan 29 10:12:28 EST 2016:ERROR:cannot get error line number!
> Fri Jan 29 10:12:28 EST 2016:ERROR:java.lang.IllegalStateException: No match 
> found
>java.lang.IllegalStateException: No match found
>   at java.util.regex.Matcher.group(Unknown Source)
>   at 
> com.eviware.soapui.support.GroovyUtils.extractErrorLineNumber(GroovyUtils.java:132)
>   at 
> com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:164)
>   at 
> com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263)
>   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>   at java.lang.Thread.run(Unknown Source)
> Fri Jan 29 10:12:28 EST 2016:ERROR:BUG! exception in phase 'semantic 
> analysis' in source unit 'Script5.groovy' The lookup for 
> dbUtils_TargetApi.TGTQueries caused a failed compilaton. There should not 
> have been any compilation from this call.
>BUG! exception in phase 'semantic analysis' in source unit 
> 'Script5.groovy' The lookup for dbUtils_TargetApi.TGTQueries caused a failed 
> compilaton. There should not have been any compilation from this call.
>   at 
> org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:188)
>   at 
> org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:168)
>   at 
> org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:124)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:616)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:268)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:236)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:220)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:232)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:969)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:646)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.transformDeclarationExpression(ResolveVisitor.java:1010)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:638)
>   at 
> org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
>   at 
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
>   at 
> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
>   at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:163)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1240)
>   at 
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
>   at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
>   at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
>   at 
> org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:50)
>   at 
> org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:166)
>   at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
>   at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1055)
>   a

[jira] [Created] (GROOVY-7739) Groovsh code-completion should display groovy jdk enhancements of java.io.file

2016-01-29 Thread Pascal Schumacher (JIRA)
Pascal Schumacher created GROOVY-7739:
-

 Summary: Groovsh code-completion should display groovy jdk 
enhancements of java.io.file
 Key: GROOVY-7739
 URL: https://issues.apache.org/jira/browse/GROOVY-7739
 Project: Groovy
  Issue Type: Improvement
  Components: Groovysh
Affects Versions: 2.4.5
Reporter: Pascal Schumacher
Assignee: Pascal Schumacher
Priority: Minor
 Fix For: 2.4.6


As discussed on the mailing list groovysh code-completion does not show methods 
added to java.io.File (e.g. eachLine()).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (GROOVY-7740) Groovsh code-completion should display groovy jdk enhancements of String

2016-01-29 Thread Pascal Schumacher (JIRA)
Pascal Schumacher created GROOVY-7740:
-

 Summary: Groovsh code-completion should display groovy jdk 
enhancements of String
 Key: GROOVY-7740
 URL: https://issues.apache.org/jira/browse/GROOVY-7740
 Project: Groovy
  Issue Type: Improvement
  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] [Resolved] (GROOVY-7739) Groovsh code-completion should display groovy jdk enhancements of java.io.file

2016-01-29 Thread Pascal Schumacher (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-7739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Schumacher resolved GROOVY-7739.
---
Resolution: Fixed

> Groovsh code-completion should display groovy jdk enhancements of java.io.file
> --
>
> Key: GROOVY-7739
> URL: https://issues.apache.org/jira/browse/GROOVY-7739
> Project: Groovy
>  Issue Type: Improvement
>  Components: Groovysh
>Affects Versions: 2.4.5
>Reporter: Pascal Schumacher
>Assignee: Pascal Schumacher
>Priority: Minor
> Fix For: 2.4.6
>
>
> As discussed on the mailing list groovysh code-completion does not show 
> methods added to java.io.File (e.g. eachLine()).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (GROOVY-7740) Groovsh code-completion should display groovy jdk enhancements of String

2016-01-29 Thread Pascal Schumacher (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-7740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Schumacher resolved GROOVY-7740.
---
Resolution: Fixed

> Groovsh code-completion should display groovy jdk enhancements of String
> 
>
> Key: GROOVY-7740
> URL: https://issues.apache.org/jira/browse/GROOVY-7740
> Project: Groovy
>  Issue Type: Improvement
>  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] [Resolved] (GROOVY-6703) Strange problems with EhCache from Groovy

2016-01-29 Thread Pascal Schumacher (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-6703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Schumacher resolved GROOVY-6703.
---
Resolution: Duplicate

I'm resolving this as a duplicate of [GROOVY-7105], which will be fixed with 
Groovy 2.4.6. Please reopen if this is still an issue with Groovy 2.4.6. Thanks!

> Strange problems with EhCache from Groovy
> -
>
> Key: GROOVY-6703
> URL: https://issues.apache.org/jira/browse/GROOVY-6703
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.2.2
> Environment: Groovy Version: 2.2.2 JVM: 1.7.0_51 Vendor: Oracle 
> Corporation OS: Windows 8, Ehcache 2.8.1
>Reporter: Andrew P Fink
> Attachments: groovy_ehcache_bug2.zip
>
>
> This code works fine in Java ("test" is a simple cache defined in ehcache.xml)
> net.sf.ehcache.CacheManager.getInstance().getCache("test").getSize()
> but in Groovy:
> Caught: java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
> java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
>   at test.run(test.groovy:1)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)