This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216983 - mutliline strings fail to compile
Summary: mutliline strings fail to compile
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: Macintosh (x86) Mac OS X
: P2 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 18:20 UTC by driscoll
Modified: 2012-09-03 08:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description driscoll 2012-08-16 18:20:46 UTC
There's something wrong with your default build process - valid multiline strings fail to compile.

Failing test case:

Main program -

package testgroovybug;
public class TestGroovyBug {
    public static void main(String[] args) {
        System.out.println(Test.TEST);
    }
}

Groovy Class -

package testgroovybug
class Test {
    public static final String TEST = 
""" 
test test 
"""
}

Note that removing the keyword "String" from the Groovy class results in a working program.

Also, note that this code works in the GroovyConsole, as well as IntelliJ.
Comment 1 Martin Janicek 2012-08-20 08:09:50 UTC
Mm, that's weird, this works for me just fine. Could you please try to reproduce the problem with the latest daily build [1]?

[1] http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 2 driscoll 2012-08-26 01:10:25 UTC
Yep, it's fixed in the nightly, though gosh there sure are a lot of other bugs with Groovy in that nightly.

I strongly urge you to turn this into a test though: there's enough other stuff broken in that build that I don't have confidence that this won't regress when those bugs are fixed before ship.
Comment 3 Martin Janicek 2012-08-27 11:28:03 UTC
Could you be a little more specific about those issues you are describing? I'm not aware about some regressions so cannot do much without some descriptions :/
Comment 4 driscoll 2012-08-27 16:49:04 UTC
There were a couple major bugs, which seemed to be related to compiling Groovy.

When I get a chance, I'll file them, sice you don't seem to be aware of them. 

But as I remember them, one was an existing project (mixed Java/Groovy) where e Java couldn't see methods defined in Groovy, the second was a Groovy program which out the previous version's output, when run.

Since both seemed similar to the build problem I reported with 3 quote, I was concerned.
Comment 5 Martin Janicek 2012-08-28 07:13:17 UTC
Thanks, that would be great!
Comment 6 driscoll 2012-09-01 20:37:29 UTC
As a followup, I'm unable to reproduce the problems I was going to look into with the latest nightly (I've also updated the JDK in the meantime as well, so who knows what was going on there).

So, one less thing for you to worry about.
Comment 7 driscoll 2012-09-01 20:38:29 UTC
As a followup, I'm unable to reproduce the problems I was going to look into with the latest nightly (I've also updated the JDK in the meantime as well, so who knows what was going on there).

So, one less thing for you to worry about.
Comment 8 Martin Janicek 2012-09-03 08:31:02 UTC
(In reply to comment #7)
> As a followup, I'm unable to reproduce the problems I was going to look into
> with the latest nightly (I've also updated the JDK in the meantime as well, so
> who knows what was going on there).
> 
> So, one less thing for you to worry about.

Ok, thank you anyway!