logo       

[jira] Updated: (XERCESJ-1279) ClassCastException in SubstitutionGroupHandl: msg#00010

Subject: [jira] Updated: (XERCESJ-1279) ClassCastException in SubstitutionGroupHandler.addSubstitutionGroup() during Document.normalize()
     [ 
https://issues.apache.org/jira/browse/XERCESJ-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bill Michell updated XERCESJ-1279:
----------------------------------

    Attachment: Crash.java
                test.xml

A simple bit of Xml together with a simple java application that can be used to 
illustrate the problem.

You'll probably need to update the source path in the code to point to the 
appropriate files on your file system.

> ClassCastException in SubstitutionGroupHandler.addSubstitutionGroup() during 
> Document.normalize()
> -------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1279
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1279
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (Level 3 Core)
>    Affects Versions: 2.9.1
>         Environment: Windows, Sun JRE 1.6.00_03
>            Reporter: Bill Michell
>         Attachments: ContentComponents.xsd, Crash.java, iCI.xsd, test.xml, 
> test.xsd
>
>
> Change 319073 introduced the class SubstitutionGroupHandler$OneSubGroup and 
> the Hashtable fSubGroupB
> According to the documentation, the field has the following characteristics:
>     // to store substitution group information
>     // the key to the hashtable is an element decl, and the value is
>     // - a Vector, which contains all elements that has this element as their
>     //   substitution group affilication
>     // - an array of OneSubGroup, which contains its substitution group 
> before block.
> Unfortuntately, addSubstitutionGroup() contains the following line:
>             subGroup = (Vector)fSubGroupsB.get(subHead);
> This fails with a ClassCastException if the value for the key passed turns 
> out to be a OneSubGroup[]
> The following lines of getSubGroupB() appear to ensure that a OneSubGroup[] 
> is in the map:
>         // Convert to an array
>         OneSubGroup[] ret = new OneSubGroup[newGroup.size()];
>         for (int i = newGroup.size()-1; i >= 0; i--) {
>             ret[i] = (OneSubGroup)newGroup.elementAt(i);
>         }
>         // Store the potential sub group
>         fSubGroupsB.put(element, ret);
>         
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe