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.
Summary: | Rename class doesn't find arrays of renamed class | ||
---|---|---|---|
Product: | editor | Reporter: | ehucka <ehucka> |
Component: | Refactoring | Assignee: | Tomas Hurka <thurka> |
Status: | CLOSED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 4.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
CCE's stacktrace.
Sources that can be used to test whether the issue is fixed. |
Description
ehucka
2004-01-14 12:33:38 UTC
It doesn't find some of the class'es occurencies as array, not all. After rename of this class there are thrown ClassCastExceptions. Created attachment 12929 [details]
CCE's stacktrace.
This issue was fixed as a side effect of changes in javacore (introduction of MultipartId) Emane, please verify. Thanks. I've found that in case of source e.g.: return (Bean[])(ret.toArray(new Bean[] {})); parser still doesn't find occurances of class Bean. The problem is, that parser cannot resolve MultipartId "Bean" in this case. MultipartId.getParser().getSemanticInfo(token "Bean") returns null Tomasi, can you take a look at it? Thanks This is still the case. I have investigated it a little bit and found out that the following types of usages of array can be found without problems (I was looking for usages of MethodInfo class): MethodInfo[] methods = generateMethods(); protected abstract MethodInfo[] generateMethods() throws IOException; But the following type of occurence cannot be found: return (MethodInfo[]) methods.toArray(new MethodInfo[methods.size()]); It seems like there is a problem only with expressions in return statement. Or maybe it is a problem with TypeCast and NewArrayExpression. Attached are the sources I've tried it on. I tried to rename org.netbeans.lib.jmi.util.ClassFileGenerator.MethodInfo class. One of the usages that are not found is in AssociationGenerator class line 105. Created attachment 13888 [details]
Sources that can be used to test whether the issue is fixed.
Fixed in meta_2 branch. Tomas already fixed it Verified in alpha build. |