xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <...@mcc.id.au>
Subject Re: Handling null parameters in ParsedURLProtocolHandler.parseURL(String)
Date Mon, 26 Nov 2007 23:52:57 GMT
Hi Andreas.

Andreas Hartmann:
> in Lenya, we'd like to use a Cocoon component (SVGSerializer) which 
> depends on Batik 1.6. If we enable the SourceProtocolHandler (a 
> Cocoon-specific implementation of ParsedURLProtocolHandler), we're 
> getting an NPE when the urlStr parameter is null:
> 
>   https://issues.apache.org/jira/browse/COCOON-2148
> 
> Should the ParsedURLProtocolHandler be aware of the circumstance that 
> urlStr can be null? Or is this an error case?

As pointed out in the above Cocoon bug, the
ParsedURLDefaultProtocolHandler does explicitly check for a null urlStr.
ParsedURLDataProtocolHandler, on the other hand, doesn’t.

ParsedURLDefaultProtocolHandler just returns an uninitialised
ParsedURLData object when parseURL(null) is called.  I don’t know if
passing null to parseURL makes much sense, though.  What is it used for
in Cocoon?

I slightly prefer to disallow null, but it’s not a strong feeling.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message