[ 
https://issues.apache.org/jira/browse/XERCESJ-1683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16932037#comment-16932037
 ] 

Mukul Gandhi commented on XERCESJ-1683:
---------------------------------------

The SymbolHash.get(...) method is referred at 60-70 places in Xerces codebase. 
I feel that, it won't be good to have an error handling for 
java.lang.ArithmeticException within the SymbolHash.get(...) method (since that 
would be at a very granular level).

Also, as stated in the bug report, that its a NPE (i.e NullPointerException). 
Should'nt that be ArithmeticException?

As of now, it looks difficult to reproduce the bug shared, to attempt a fix. A 
sample by bug reporter, helping us test and attempt a fix would be useful.

> NullPointerException in SymbolHash.get
> --------------------------------------
>
>                 Key: XERCESJ-1683
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1683
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: SAX
>            Reporter: Radu Coravu
>            Priority: Major
>
> We use as XSModelImpl to iterate XML Schema components.
> One of our clients, on a schema that they did not provide obtained this NPE:
> {code}[ AWT-EventQueue-0 ]  -  java.lang.ArithmeticException: / by zero
> java.lang.ArithmeticException: / by zero
>     at org.apache.xerces.util.SymbolHash.get(Unknown Source)
>     at org.apache.xerces.impl.xs.XSModelImpl.getSubstitutionGroup(Unknown 
> Source) {code}
> The NPE seams feasible if a SymbolHash with zero length is constructed and 
> then queried for a value. Maybe this could be taken into account on your side.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-dev-h...@xerces.apache.org

Reply via email to