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 86222 - ClassCastException when rename portType
Summary: ClassCastException when rename portType
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords: REGRESSION
Depends on:
Blocks: 86223
  Show dependency tree
 
Reported: 2006-09-29 20:30 UTC by Nam Nguyen
Modified: 2006-10-24 21:19 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 Nam Nguyen 2006-09-29 20:30:54 UTC
- Open any wsdl file with portType and partnerLink that reference the portType.
- rename the portType.
Will see this exception:

java.lang.ClassCastException: org.netbeans.modules.xml.wsdl.model.impl.WSDLModelImpl
	at org.netbeans.modules.bpel.refactoring.Renamer.rename(Renamer.java:85)
	at org.netbeans.modules.bpel.refactoring.Engine.refactorUsages(Engine.java:165)
Comment 1 Mikhail Kondratyev 2006-09-30 10:47:38 UTC
This is a regression. Must be fixed
Comment 2 Vladimir Yaroslavskiy 2006-10-02 15:48:24 UTC
Fixed in release55_dev.
Comment 3 Vladimir Yaroslavskiy 2006-10-02 15:50:46 UTC
? 1.diff
Index: Renamer.java
===================================================================
RCS file:
/cvs/enterprise/bpel/refactoring/src/org/netbeans/modules/bpel/refactoring/Attic/Renamer.java,v
retrieving revision 1.1.2.30.2.1
retrieving revision 1.1.2.30
diff -r1.1.2.30.2.1 -r1.1.2.30
26a27
> import org.netbeans.modules.bpel.model.api.BpelModel;
53d53
< import org.netbeans.modules.xml.xam.Model;
85c85
<     Model model = usageGroup.getModel();
---
>     BpelModel model = (BpelModel) usageGroup.getModel();
86a87,88
>     // only start transaction is there isn't one.'
>     boolean startTransaction = ! model.isIntransaction(); 
89d90
<     boolean doTransaction = !model.isIntransaction(); 
92c93
<       if (doTransaction) {
---
>       if (startTransaction) {
98,101c99,101
<     } 
<     finally {
<       if (doTransaction && model.isIntransaction()) {
<         model.endTransaction();
---
>     } finally {
>       if (startTransaction && model.isIntransaction()) {
>           model.endTransaction();
Comment 4 Michael Frisino 2006-10-03 10:24:09 UTC
Reviewed fix. Looks good. Please integrate into release55.
Comment 5 Vladimir Yaroslavskiy 2006-10-03 12:31:29 UTC
Fixed in release55 branch.
Comment 6 Alexander Pepin 2006-10-05 14:53:42 UTC
verified in build 061003.