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 83397 - ClassCastException on attempt to show some attributes in Design view
Summary: ClassCastException on attempt to show some attributes in Design view
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Girish Balachandran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-24 15:30 UTC by Andrei Chistiakov
Modified: 2006-08-25 15:50 UTC (History)
4 users (show)

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 Andrei Chistiakov 2006-08-24 15:30:55 UTC
Reproduced in build 060822.

To reproduce the bug:
- open the following schema
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/newXMLSchema"
            xmlns:tns="http://xml.netbeans.org/schema/newXMLSchema"
            elementFormDefault="qualified">
    <xsd:attributeGroup name="newAttributeGroup">
        <xsd:anyAttribute/>
    </xsd:attributeGroup>
    <xsd:complexType name="newComplexType">
        <xsd:attribute ref="tns:newAttribute"/>
        <xsd:attributeGroup ref="tns:newAttributeGroup"/>
    </xsd:complexType>
    <xsd:attribute name="newAttribute" type="xsd:string"/>
</xsd:schema>
- switch to Design;
- show attributes of newComplexType. It results in java.lang.ClassCastException:
org.netbeans.modules.xml.axi.impl.AnyAttributeProxy cannot be cast to
org.netbeans.modules.xml.axi.Attribute
	at
org.netbeans.modules.xml.schema.abe.StartTagPanel.chainIfNeeded(StartTagPanel.java:890)
	at
org.netbeans.modules.xml.schema.abe.StartTagPanel.chainAttributeGroups(StartTagPanel.java:857)
	at
org.netbeans.modules.xml.schema.abe.StartTagPanel.paintComponent(StartTagPanel.java:803)
	at
org.netbeans.modules.xml.schema.abe.ContentModelPanel$1.paintComponent(ContentModelPanel.java:65)
Comment 1 Girish Balachandran 2006-08-24 23:15:36 UTC
Fixed on 8/24
Comment 2 Andrei Chistiakov 2006-08-25 15:50:53 UTC
Verified in build 060824.