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 144263 - Trailing dot breaks sanitizer()
Summary: Trailing dot breaks sanitizer()
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: martin_adamek
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2008-08-18 13:43 UTC by schmidtm
Modified: 2008-10-30 14:24 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 schmidtm 2008-08-18 13:43:10 UTC
This code:

package bug

class GroovyClass1 {
    def method1() {}
    def method2() {}
    def method3() {}
    def gonzo1() {}
    def gonzo2() {}
    def gonzo3() {}
}

class GroovyClass2 {
    def m2() {
        GroovyClass1 localClass = new GroovyClass1()
        localClass.
            

        new String().subst
    }
}

class GroovyClass3 {
    def m3() {
        println "Hi"
    }
}

Seems to break the sanatizer. The problem is the trailing dot in this line:

       localClass.

If you keep on adding and removing this dot you'll see. If it doesn't happen instantly add or remove a blank line to trigger a recompile.

A broken compilation unit leads to this:

AstUtilities.getRoot(request.info) == null
Comment 1 martin_adamek 2008-08-28 09:07:32 UTC
I really cannot reproduce this. Failing test would be great to have.
Comment 2 martin_adamek 2008-08-28 10:31:25 UTC
Ok, I just found way to reproduce it. After pasting and saving, navigator is gone. Inserting removing some letters on next line after '.' makes 
navigator/samantic highlight appear.
Comment 3 martin_adamek 2008-08-29 13:36:34 UTC
Fixed.
http://hg.netbeans.org/main/rev/31a6cf6ef5da
Comment 4 Quality Engineering 2008-08-30 05:31:13 UTC
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/31a6cf6ef5da
User: Martin Adamek <martin_adamek@netbeans.org>
Log: #144263: Trailing dot breaks sanitizer()
Comment 5 Lukas Jungmann 2008-10-07 15:21:22 UTC
v.