[
https://issues.apache.org/jira/browse/XERCESJ-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pepijn Van Eeckhoudt updated XERCESJ-1261:
------------------------------------------
Description:
The following code generates a NullPointerException
new org.xml.sax.ext.Attributes2Impl().addAttribute("","","","","");
This is caused by the check of getLength against specified.length. After the
constructor is called the specified and declared arrays are null. Adding a null
check would resolve this problem.
was:
The following code generates a NullPointerException
new org.xml.sax.ext.Attributes2Impl().addAttribute("","","","","");
This is caused by the check of getLength against specified.length. After the
constructor is called the specified and declared arrays are null. Initializing
both
to new boolean[0] would resolve this problem.
> NullPointerException in org.xml.sax.ext.Attributes2Impl#addAttribute
> --------------------------------------------------------------------
>
> Key: XERCESJ-1261
> URL: https://issues.apache.org/jira/browse/XERCESJ-1261
> Project: Xerces2-J
> Issue Type: Bug
> Components: SAX
> Affects Versions: 2.9.0
> Environment: Any
> Reporter: Pepijn Van Eeckhoudt
>
> The following code generates a NullPointerException
> new org.xml.sax.ext.Attributes2Impl().addAttribute("","","","","");
> This is caused by the check of getLength against specified.length. After the
> constructor is called the specified and declared arrays are null. Adding a
> null check would resolve this problem.
--
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]