[
https://issues.apache.org/jira/browse/XERCESJ-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kurt Riede closed XERCESJ-1078.
-------------------------------
The fix works for me, so I finally close this issue.
> IdentityConstraint.getSelectorStr() might cause MPE
> ---------------------------------------------------
>
> Key: XERCESJ-1078
> URL: https://issues.apache.org/jira/browse/XERCESJ-1078
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema Structures
> Affects Versions: 2.6.2
> Environment: Xerces2-J CVS HEAD (Mai 12, 2005)
> Reporter: Kurt Riede
> Attachments: attP006.xsd, patch.txt
>
>
> in case of an invalid schema file with the error "s4s-elt-must-match.2"
> (The content of 'identity constraint' must match (annotation?, selector,
> field+). Not enough elements were found.) the attribute fSelector might be
> null and thus the method getSelectorStr() causes a NPE.
> In my case, anylsing invalid schema files (as good as possible) it is
> important not to have this exception, so I'm working with my own patched
> version of Xerces2-J. It would be nice if you would fix this somewhen.
> Example from schema test suite to preproduce:
> msxsdtest\identityConstraint\idB059.xsd
> My fix is quite simple: just check on null:
> Old:
> return fSelector.toString();
> New:
> return fSelector == null ? null : fSelector.toString();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]