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 206610 - CC shows wrong findAll return type in tests
Summary: CC shows wrong findAll return type in tests
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 09:15 UTC by Martin Janicek
Modified: 2013-03-25 20:48 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 Martin Janicek 2011-12-21 09:15:50 UTC
This issue might be realted to bug 205951. Some tests (for example MethodCCTest.testCompletionInsideFor1_2) randomly fails because in some cases there is a different return type for findAll method and instead of expected Map is returned Collection.

At the moment it seems to me that both issues are caused by some bad classpath loading in Groovy tests, because neither of them ever shows in real CC.
Comment 1 Martin Janicek 2011-12-21 10:54:25 UTC
See revision web-main #1e576bf8babc (which is temporary fix for the failing test problem) for more details.
Comment 2 Martin Janicek 2012-04-26 13:11:14 UTC
Seems to be type interference related. Not sure why but sometimes it looks like the editor thinks that the completion is invoked on the Collection (in that case the findAll() method should return Collection [1]), but sometimes it thinks that the completion is invoked on the Map (in that case the findAll() method should return Map [1]). The map is actually correct since the type code before caret looks like this: [1:"Alice", 2:"Bob"].
Not sure at all (at least for now) how is possible that the results are randomly changed.

[1] Groovy JDK: http://groovy.codehaus.org/groovy-jdk/
Comment 3 Martin Janicek 2012-10-09 13:09:15 UTC
*** Bug 205951 has been marked as a duplicate of this bug. ***
Comment 4 Martin Janicek 2012-10-15 16:28:29 UTC
Decreasing priority to P4. This is actually working in IDE, but failing in tests. Hard to say what's the problem and it's definitely a low priority in comparison with other problems.
Comment 5 Martin Janicek 2013-03-25 10:52:37 UTC
Fixed in: web-main #c3c26a690916
Comment 6 Quality Engineering 2013-03-25 20:48:22 UTC
Integrated into 'main-golden', will be available in build *201303251729* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c3c26a690916
User: Martin Janicek <mjanicek@netbeans.org>
Log: #206610 - CC shows wrong findAll return type in tests