You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ma...@apache.org on 2008/08/20 15:24:18 UTC

svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Author: maxberger
Date: Wed Aug 20 06:24:18 2008
New Revision: 687323

URL: http://svn.apache.org/viewvc?rev=687323&view=rev
Log:
valueOf is Java 1.5+ only

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=687323&r1=687322&r2=687323&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java Wed Aug 20 06:24:18 2008
@@ -935,7 +935,7 @@
         RendererContext context;
         context = super.createRendererContext(x, y, width, height, foreignAttributes);
         context.setProperty(AFPRendererContextConstants.AFP_GRAYSCALE,
-                Boolean.valueOf(!this.colorImages));
+                new Boolean(!this.colorImages));
         return context;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=687323&r1=687322&r2=687323&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java Wed Aug 20 06:24:18 2008
@@ -1148,7 +1148,7 @@
         RendererContext context = super.createRendererContext(
                 x, y, width, height, foreignAttributes);
         context.setProperty(PCLRendererContextConstants.PCL_COLOR_CANVAS,
-                Boolean.valueOf(this.useColorCanvas));
+                new Boolean(this.useColorCanvas));
         return context;
     }
 



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


Re: svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Posted by Max Berger <ma...@berger.name>.
Dear FopDevs,

I've added the patched version and submitted a feature request for
retroweaver:

https://sourceforge.net/tracker/index.php?func=detail&aid=2063970&group_id=104240&atid=637383

Since the next release date is still a little bit away I hope this can
be fixed properly by then.

Max

Jeremias Maerki schrieb:
> As long as we don't distribute the unreleased package in one of our own
> releases, it's fine. We need to apply the same policy as we do for other
> libraries. If the source distribution doesn't contain those build
> dependencies, it's ok to keep the unreleased package.
> 
> On 20.08.2008 18:31:46 Max Berger wrote:
>> Dear Fop-Devs,
>>
>> further insight on retroweaver:
>>
>> I've downloaded and patched retroweaver not to modify Boolean.valueOf,
>> which is now correctly verified against 1.4. I could add the (patched)
>> artifact to fops lib/build.  I will try and discuss with the retroweaver
>> maintainer about options to include that into the standard retroweaver
>> distribution.
>>
>> What is the opinion about having patched and unreleased dependencies?
>> Even if it is just for build, and purely optional?
>>
>> Max
>>
>> Max Berger schrieb:
>>> Adrian,
>>>
>>> Adrian Cumiskey schrieb:
>>>> I don't think it is Max... looks like @since 1.4.
>>> you're right - looks like the other valueOf methods (for integer, etc.)
>>> where introduced in 1.5, and this one was indeed introduced in 1.4.
>>>
>>> I've reverted that change.
>>>
>>> Apparently retroweaver still modifies calls to Boolean.valueOf,
>>> according to the doc to be compatible with 1.3.
>>>
>>> Unfortunately this requires adding the retroweaver-runtime to the
>>> verification classpath, which then renders the verification process
>>> useless, as it is supposed to detect failures like Integer.valueOf(),
>>> which will now again slip through.
>>>
>>> I'll look deeper into retoweaver to see if I can find a suitable solution.
>>>
>>> Max
>>>
>>
> 
> 
> 
> 
> Jeremias Maerki
> 



Re: svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
As long as we don't distribute the unreleased package in one of our own
releases, it's fine. We need to apply the same policy as we do for other
libraries. If the source distribution doesn't contain those build
dependencies, it's ok to keep the unreleased package.

On 20.08.2008 18:31:46 Max Berger wrote:
> Dear Fop-Devs,
> 
> further insight on retroweaver:
> 
> I've downloaded and patched retroweaver not to modify Boolean.valueOf,
> which is now correctly verified against 1.4. I could add the (patched)
> artifact to fops lib/build.  I will try and discuss with the retroweaver
> maintainer about options to include that into the standard retroweaver
> distribution.
> 
> What is the opinion about having patched and unreleased dependencies?
> Even if it is just for build, and purely optional?
> 
> Max
> 
> Max Berger schrieb:
> > Adrian,
> > 
> > Adrian Cumiskey schrieb:
> >> I don't think it is Max... looks like @since 1.4.
> > 
> > you're right - looks like the other valueOf methods (for integer, etc.)
> > where introduced in 1.5, and this one was indeed introduced in 1.4.
> > 
> > I've reverted that change.
> > 
> > Apparently retroweaver still modifies calls to Boolean.valueOf,
> > according to the doc to be compatible with 1.3.
> > 
> > Unfortunately this requires adding the retroweaver-runtime to the
> > verification classpath, which then renders the verification process
> > useless, as it is supposed to detect failures like Integer.valueOf(),
> > which will now again slip through.
> > 
> > I'll look deeper into retoweaver to see if I can find a suitable solution.
> > 
> > Max
> > 
> 
> 




Jeremias Maerki


Re: svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi Max,

Personally I'm fine with it until we take a future retroweaver release containing your patch. So +1 
from me.

Adrian.

Max Berger wrote:
> Dear Fop-Devs,
> 
> further insight on retroweaver:
> 
> I've downloaded and patched retroweaver not to modify Boolean.valueOf,
> which is now correctly verified against 1.4. I could add the (patched)
> artifact to fops lib/build.  I will try and discuss with the retroweaver
> maintainer about options to include that into the standard retroweaver
> distribution.
> 
> What is the opinion about having patched and unreleased dependencies?
> Even if it is just for build, and purely optional?
> 
> Max
> 
> Max Berger schrieb:
>> Adrian,
>>
>> Adrian Cumiskey schrieb:
>>> I don't think it is Max... looks like @since 1.4.
>> you're right - looks like the other valueOf methods (for integer, etc.)
>> where introduced in 1.5, and this one was indeed introduced in 1.4.
>>
>> I've reverted that change.
>>
>> Apparently retroweaver still modifies calls to Boolean.valueOf,
>> according to the doc to be compatible with 1.3.
>>
>> Unfortunately this requires adding the retroweaver-runtime to the
>> verification classpath, which then renders the verification process
>> useless, as it is supposed to detect failures like Integer.valueOf(),
>> which will now again slip through.
>>
>> I'll look deeper into retoweaver to see if I can find a suitable solution.
>>
>> Max
>>
> 
> 


Re: svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Posted by Max Berger <ma...@berger.name>.
Dear Fop-Devs,

further insight on retroweaver:

I've downloaded and patched retroweaver not to modify Boolean.valueOf,
which is now correctly verified against 1.4. I could add the (patched)
artifact to fops lib/build.  I will try and discuss with the retroweaver
maintainer about options to include that into the standard retroweaver
distribution.

What is the opinion about having patched and unreleased dependencies?
Even if it is just for build, and purely optional?

Max

Max Berger schrieb:
> Adrian,
> 
> Adrian Cumiskey schrieb:
>> I don't think it is Max... looks like @since 1.4.
> 
> you're right - looks like the other valueOf methods (for integer, etc.)
> where introduced in 1.5, and this one was indeed introduced in 1.4.
> 
> I've reverted that change.
> 
> Apparently retroweaver still modifies calls to Boolean.valueOf,
> according to the doc to be compatible with 1.3.
> 
> Unfortunately this requires adding the retroweaver-runtime to the
> verification classpath, which then renders the verification process
> useless, as it is supposed to detect failures like Integer.valueOf(),
> which will now again slip through.
> 
> I'll look deeper into retoweaver to see if I can find a suitable solution.
> 
> Max
> 



Re: svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Posted by Max Berger <ma...@berger.name>.
Adrian,

Adrian Cumiskey schrieb:
> I don't think it is Max... looks like @since 1.4.

you're right - looks like the other valueOf methods (for integer, etc.)
where introduced in 1.5, and this one was indeed introduced in 1.4.

I've reverted that change.

Apparently retroweaver still modifies calls to Boolean.valueOf,
according to the doc to be compatible with 1.3.

Unfortunately this requires adding the retroweaver-runtime to the
verification classpath, which then renders the verification process
useless, as it is supposed to detect failures like Integer.valueOf(),
which will now again slip through.

I'll look deeper into retoweaver to see if I can find a suitable solution.

Max


Re: svn commit: r687323 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/AFPRenderer.java pcl/PCLRenderer.java

Posted by Adrian Cumiskey <ad...@gmail.com>.
I don't think it is Max... looks like @since 1.4.

    /**
      * Returns a <tt>Boolean</tt> instance representing the specified
      * <tt>boolean</tt> value.  If the specified <tt>boolean</tt> value
      * is <tt>true</tt>, this method returns <tt>Boolean.TRUE</tt>;
      * if it is <tt>false</tt>, this method returns <tt>Boolean.FALSE</tt>.
      * If a new <tt>Boolean</tt> instance is not required, this method
      * should generally be used in preference to the constructor
      * {@link #Boolean(boolean)}, as this method is likely to to yield
      * significantly better space and time performance.
      *
      * @param  b a boolean value.
      * @return a <tt>Boolean</tt> instance representing <tt>b</tt>.
      * @since  1.4
      */
     public static Boolean valueOf(boolean b) {
         return (b ? TRUE : FALSE);
     }

Adrian.


maxberger@apache.org wrote:
> Author: maxberger
> Date: Wed Aug 20 06:24:18 2008
> New Revision: 687323
> 
> URL: http://svn.apache.org/viewvc?rev=687323&view=rev
> Log:
> valueOf is Java 1.5+ only
> 
> Modified:
>     xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java
>     xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
> 
> Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java
> URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=687323&r1=687322&r2=687323&view=diff
> ==============================================================================
> --- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
> +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java Wed Aug 20 06:24:18 2008
> @@ -935,7 +935,7 @@
>          RendererContext context;
>          context = super.createRendererContext(x, y, width, height, foreignAttributes);
>          context.setProperty(AFPRendererContextConstants.AFP_GRAYSCALE,
> -                Boolean.valueOf(!this.colorImages));
> +                new Boolean(!this.colorImages));
>          return context;
>      }
>  
> 
> Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
> URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=687323&r1=687322&r2=687323&view=diff
> ==============================================================================
> --- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java (original)
> +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java Wed Aug 20 06:24:18 2008
> @@ -1148,7 +1148,7 @@
>          RendererContext context = super.createRendererContext(
>                  x, y, width, height, foreignAttributes);
>          context.setProperty(PCLRendererContextConstants.PCL_COLOR_CANVAS,
> -                Boolean.valueOf(this.useColorCanvas));
> +                new Boolean(this.useColorCanvas));
>          return context;
>      }
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
> 
>