You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2013/05/01 22:18:16 UTC

[jira] [Assigned] (XERCESJ-1611) XIncludeTextReader doesn't handle null Content Types properly

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

Michael Glavassevich reassigned XERCESJ-1611:
---------------------------------------------

    Assignee: Michael Glavassevich
    
> XIncludeTextReader doesn't handle null Content Types properly
> -------------------------------------------------------------
>
>                 Key: XERCESJ-1611
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1611
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.11.0
>            Reporter: Steven Buberl
>            Assignee: Michael Glavassevich
>
> In XIncludeTextReader.getReader(), its gets the rawContentType for the URL connection (line 152) which is returning null in my environment.  I'm running tests in an OSGI environment parsing an XML document that xincludes multiple small plain text files that are stored inside bundles.  I guess this is the reason why the ContentType is coming back as null  (And it works fine when files are on filesystem.)  But URLConnection is allowed to return nulls from getContentType() so XIncludeTextReader should be able to handle it regardless.
> XIncludeTextReader checks if it's null correctly on line 155, but starting at line 184, it assumes rawContentType is not null and line 184 throws a NullPointerException.
> Older versions were affected by this too but still an issue with latest release and looks as in current trunk

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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