[ 
https://issues.apache.org/jira/browse/XERCESJ-1554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Glavassevich resolved XERCESJ-1554.
-------------------------------------------

    Resolution: Invalid

You still haven't stated what version of Xerces you're looking at. There have 
been many changes made to the codebase through out the years, in particular 
multiple improvements to error handling of invalid schemas [1]. If an error 
(e.g. a missing selector) occurred while processing an identity constraint it's 
never added to the schema model.

[1] https://issues.apache.org/jira/browse/XERCESJ-1372
                
> An incomplete fix for the NPE bugs in IdentityConstraint.java
> -------------------------------------------------------------
>
>                 Key: XERCESJ-1554
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1554
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: Other
>            Reporter: Guangtai Liang
>            Priority: Critical
>              Labels: incomplete_fix, missing_fixes
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> The fix revision 320527 was aimed to remove an NPE bug on the 
> "this.fSelector" in the method "getSelectorStr" of the file 
> "/xerces/java/trunk/src/org/apache/xerces/impl/xs/identity/IdentityConstraint.java"
>  , but it is incomplete. 
> Since the "this.fSelector" is a class field and also could be null during the 
> run-time execution, it should also be null-checked before being dereferenced 
> in other methods. 
> The buggy code locations the same fix needs to be applied at are as bellows: 
> Line 148  of the method "equals"; 
> public boolean equals(IdentityConstraint id) {
>         boolean areEqual = 
> fIdentityConstraintName.equals(id.fIdentityConstraintName);
>         if(!areEqual) return false;
>         areEqual = fSelector.toString().equals(id.fSelector.toString());
>         if(!areEqual) return false;
>         areEqual = (fFieldCount == id.fFieldCount);
>         if(!areEqual) return false;
>         for(int i=0; i<fFieldCount; i++)
>             if(!fFields[i].toString().equals(id.fFields[i].toString())) 
> return false;
>         return true;
>     } // equals

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to