You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/06/01 21:33:12 UTC

DO NOT REPLY [Bug 39701] New: - NPE in PropertyList

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39701>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39701

           Summary: NPE in PropertyList
           Product: Fop
           Version: 0.92
          Platform: Other
        OS/Version: Windows 2000
            Status: NEW
          Severity: critical
          Priority: P2
         Component: general
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: stefan.ziel@claninfo.ch


Depending on the SAX implementation (ex. xalan 2.6) the call to getURI() in
org.apache.fop.fo.PropertyList line

300: attributeNS = attributes.getURI(i); 

may return _null_ which leads to an NPE in line

301: if (attributeNS.length() == 0 || ...

worked arround easily with 

301: if (attributeNS==null || attributeNS.length() == 0 || ...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39701] - NPE in PropertyList

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39701>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39701


jeremias@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
          Component|general                     |fo tree
         Resolution|                            |FIXED




------- Additional Comments From jeremias@apache.org  2006-06-02 07:53 -------
Fixed as per your suggestion in Trunk:
http://svn.apache.org/viewvc?rev=411080&view=rev

Thanks!

(In reply to comment #0)
> Depending on the SAX implementation (ex. xalan 2.6) the call to getURI() in
> org.apache.fop.fo.PropertyList line
> 
> 300: attributeNS = attributes.getURI(i); 
> 
> may return _null_ which leads to an NPE in line

Actually, it may not. If it does, it's a bug in Xalan. It can only return null
if the index is out of range which cannot be the case here. But yes, it's better
to be on the safe side with defensive programming.


> 301: if (attributeNS.length() == 0 || ...
> 
> worked arround easily with 
> 
> 301: if (attributeNS==null || attributeNS.length() == 0 || ...



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.