cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: svn commit: r106302 - /cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
Date Tue, 23 Nov 2004 16:14:34 GMT
joerg@apache.org wrote:
> Author: joerg
> Date: Tue Nov 23 06:27:10 2004
> New Revision: 106302
> 
> Modified:
>    cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
> Log:
> fixed the way of fixing the handling for null namespace URIs ...
> 
> Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
> Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java?view=diff&rev=106302&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java&r1=106301&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java&r2=106302
> ==============================================================================
> --- cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
(original)
> +++ cocoon/branches/BRANCH_2_1_X/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
Tue Nov 23 06:27:10 2004
> @@ -213,7 +213,7 @@
>       */
>      public void startElement(String uri, String loc, String raw, Attributes a)
>      throws SAXException {

IMHO, adding single line would be simplier:

            if (uri == null) uri = "";

And it can not be null anyway, so logging a warning is an option.

Vadim


> -        if ((uri == null || this.extractURI.equals(uri)) && this.extractElement.equals(loc))
{
> +        if (((uri == null && this.extractURI.equals("")) || this.extractURI.equals(uri))
&& this.extractElement.equals(loc)) {
>              extractLevel++;
>              fragmentID++;
>              if (getLogger().isDebugEnabled()) {

Mime
View raw message