You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by ga...@apache.org on 2012/06/03 16:50:37 UTC
svn commit: r1345683 [1/2] - in /xmlgraphics/commons/trunk: ./
src/java/org/apache/xmlgraphics/fonts/ src/java/org/apache/xmlgraphics/image/
src/java/org/apache/xmlgraphics/image/codec/png/
src/java/org/apache/xmlgraphics/image/codec/tiff/ src/java/org...
Author: gadams
Date: Sun Jun 3 14:50:33 2012
New Revision: 1345683
URL: http://svn.apache.org/viewvc?rev=1345683&view=rev
Log:
Bugzilla #53352: Upgrade to checkstyle-5.5 and ensure no warnings.
Added:
xmlgraphics/commons/trunk/checkstyle-5.5.xml
xmlgraphics/commons/trunk/checkstyle-noframes.xsl
xmlgraphics/commons/trunk/checkstyle-suppressions.xml
Modified:
xmlgraphics/commons/trunk/build.xml
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/fonts/Glyphs.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageCacheStatistics.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageKey.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/ImageConverterBitmap2G2D.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageProviderPipeline.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageRepresentation.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageConverter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/ImageUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/Penalty.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/SoftReferenceWithKey.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/CachableRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/FormatRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/MultiImageWriter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/AbstractGraphics2D.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/DefaultGraphics2D.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/Dimension2DDouble.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/GraphicContext.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/Graphics2DImagePainter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/TransformType.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/ColorSpaceOrigin.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/DefaultColorConverter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/DeviceCMYKColorSpace.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/GrayScaleColorConverter.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/profile/ColorProfileUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/profile/NamedColorProfile.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphicsConfiguration.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/DSCConstants.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSDictionary.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSFontUtils.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSGenerator.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSImageUtils.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSProcSets.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/DSCCommentFactory.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/DSCHandler.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/DSCParser.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/NestedDocumentHandler.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/AbstractDSCComment.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/tools/DSCTools.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/tools/PageExtractor.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/DoubleFormatUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/ImageIODebugUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/Service.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/UnitConv.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/dijkstra/EdgeDirectory.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/ExtendedLocalizable.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/Localizable.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocalizableSupport.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/ASCII85Constants.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/ASCII85InputStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/ASCII85OutputStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/ASCIIHexOutputStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/RunLengthEncodeOutputStream.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/uri/CommonURIResolver.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/uri/DataURIResolver.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/uri/DataURLUtil.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/PropertyAccess.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/XMPHandler.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/XMPPacketParser.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/XMPParser.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/XMPSchemaRegistry.java
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/XMPSerializer.java
xmlgraphics/commons/trunk/status.xml
Modified: xmlgraphics/commons/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/build.xml?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/build.xml (original)
+++ xmlgraphics/commons/trunk/build.xml Sun Jun 3 14:50:33 2012
@@ -19,9 +19,9 @@
<!-- See build.properties and build-local.properties for overriding build settings. -->
<!-- build-local.properties is not stored in SVN and overrides values from build.properties -->
+ <property environment="env"/>
<property file="${basedir}/build-local.properties"/>
<property file="${basedir}/build.properties"/>
- <property environment="env"/>
<property name="Name" value="Apache XML Graphics Commons"/>
<property name="name" value="xmlgraphics-commons"/>
@@ -56,6 +56,7 @@
<property name="dist.src.dir" value="${basedir}/dist-src"/>
<property name="dist.bin.result.dir" value="${dist.bin.dir}/${name}-${version}"/>
<property name="dist.src.result.dir" value="${dist.src.dir}/${name}-${version}"/>
+ <property name="samedir" value="${basedir}"/>
<!-- .NET support (using IKVM) -->
<property name="ikvm.dir" value="."/>
@@ -69,18 +70,13 @@
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
- </path>
-
- <path id="libs-tools-build-classpath">
<fileset dir="${lib.dir}/build">
<include name="*.jar"/>
</fileset>
</path>
<path id="libs-run-classpath">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
+ <path refid="libs-build-classpath"/>
<fileset dir="${build.dir}">
<include name="${name}.jar"/>
</fileset>
@@ -300,7 +296,6 @@
<patternset refid="compile-pattern"/>
<classpath>
<path refid="libs-build-classpath"/>
- <path refid="libs-tools-build-classpath"/>
<fileset dir="${build.dir}">
<include name="${name}-${version}.jar"/>
</fileset>
@@ -326,7 +321,6 @@
<classpath>
<pathelement location="${build.dir}/test-classes"/>
<path refid="libs-build-classpath"/>
- <path refid="libs-tools-build-classpath"/>
<fileset dir="build">
<include name="${name}-${version}.jar"/>
</fileset>
@@ -445,6 +439,45 @@ NOTE:
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
+ <property name="checkstyle.location" value="${optional.lib.dir}/checkstyle-all-5.1.jar" />
+ <property name="checkstyle.noframes.xslt" value="${basedir}/checkstyle-noframes.xsl" />
+ <property name="checkstyle.config" value="${basedir}/checkstyle-5.1.xml" />
+ <path id="checkstyle-classpath">
+ <path refid="libs-build-classpath"/>
+ <pathelement location="${checkstyle.location}"/>
+ </path>
+ <condition property="checkstyle.avail">
+ <and>
+ <available classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+ <classpath refid="checkstyle-classpath"/>
+ </available>
+ <available file="${checkstyle.noframes.xslt}"/>
+ <available file="${checkstyle.config}"/>
+ </and>
+ </condition>
+ <target name="checkstyle-avail" unless="checkstyle.avail">
+ <echo message="Checkstyle support NOT present. Please download it from http://checkstyle.sf.net/ and"/>
+ <echo message="... please provide ${checkstyle.location}"/>
+ <echo message="... please provide ${checkstyle.noframes.xslt}"/>
+ <echo message="... please provide ${checkstyle.config}"/>
+ </target>
+ <target name="checkstyle" depends="package, checkstyle-avail" if="checkstyle.avail" description="Runs Checkstyle for a code quality report">
+ <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstyle-classpath"/>
+ <mkdir dir="${build.dir}"/>
+ <checkstyle config="${checkstyle.config}" failonviolation="false">
+ <classpath>
+ <path refid="checkstyle-classpath"/>
+ <pathelement location="${build.classes.dir}"/>
+ <pathelement location="${build.sandbox-classes.dir}"/>
+ <pathelement location="${build.codegen-classes.dir}"/>
+ </classpath>
+ <fileset dir="${src.dir}" includes="**/*.java"/>
+ <formatter type="xml" toFile="${build.dir}/report_checkstyle.xml"/>
+ </checkstyle>
+ <xslt in="${build.dir}/report_checkstyle.xml" out="${build.dir}/report_checkstyle.html" style="${checkstyle.noframes.xslt}"/>
+ </target>
+
+ <!--
<property name="checkstyle.home.dir" value="${optional.lib.dir}"/>
<property name="checkstyle.noframes.xslt" value="${checkstyle.home.dir}/contrib/checkstyle-noframes.xsl"/>
@@ -518,6 +551,7 @@ NOTE:
</target>
<target name="checkstyle" depends="checkstyle-avail, checkstyle-check, checkstyle-html" description="Runs Checkstyle for a code quality report"/>
+ -->
<!-- =================================================================== -->
<!-- Creates the documentation -->
Added: xmlgraphics/commons/trunk/checkstyle-5.5.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/checkstyle-5.5.xml?rev=1345683&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/checkstyle-5.5.xml (added)
+++ xmlgraphics/commons/trunk/checkstyle-5.5.xml Sun Jun 3 14:50:33 2012
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+<module name="Checker">
+ <property name="severity" value="warning"/>
+
+ <!-- ===================================================================================================== -->
+ <module name="FileTabCharacter">
+ <property name="severity" value="error"/>
+ <property name="eachLine" value="true"/>
+ </module>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="NewlineAtEndOfFile"/>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="RegexpHeader">
+ <property name="severity" value="error"/>
+ <property name="header" value="\/\*\n \* Licensed to the Apache Software Foundation \(ASF\) under one or more\n \* contributor license agreements. See the NOTICE file distributed with\n \* this work for additional information regarding copyright ownership.\n \* The ASF licenses this file to You under the Apache License, Version 2.0\n \* \(the "License"\); you may not use this file except in compliance with\n \* the License. You may obtain a copy of the License at\n \*\n \* http://www.apache.org/licenses/LICENSE-2.0\n \*\n \* Unless required by applicable law or agreed to in writing, software\n \* distributed under the License is distributed on an "AS IS" BASIS,\n \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n \* See the License for the specific language governing permissions and\n \* limitations under the License.\n \*\/\n\n"/>
+ </module>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="RegexpSingleline">
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="RegexpSingleline">
+ <property name="format" value="@author"/>
+ <property name="message" value="Use of @author javadoc keyword is prohibited."/>
+ </module>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CSOFF\: ([\w\|]+)"/>
+ <property name="onCommentFormat" value="CSON\: ([\w\|]+)"/>
+ <property name="checkFormat" value="$1"/>
+ </module>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="SuppressWithNearbyCommentFilter">
+ <property name="commentFormat" value="CSOK\: ([\w\|]+)"/>
+ <property name="checkFormat" value="$1"/>
+ <property name="influenceFormat" value="0"/>
+ </module>
+ <!-- ===================================================================================================== -->
+
+ <!-- ===================================================================================================== -->
+ <module name="TreeWalker">
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="AnnotationUseStyle"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="ArrayTypeStyle"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="AvoidNestedBlocks"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="AvoidStarImport">
+ <property name="severity" value="error"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="ConstantName">
+ <property name="format" value="^([A-Z](_?[A-Z0-9]+)*)|(log)$"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="DefaultComesLast"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="DoubleCheckedLocking"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="EmptyBlock">
+ <property name="tokens" value="LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
+ <property name="option" value="text"/> <!-- changing block policy to stmt produces 110 new errors -->
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="EmptyStatement"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="EqualsHashCode"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <!-- <module name="ExplicitInitialization"/> produces 795 new errors -->
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="FileContentsHolder"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="FinalClass"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="GenericWhitespace"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="HideUtilityClassConstructor"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="IllegalImport"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="ImportOrder">
+ <property name="groups" value="java,javax,org,org.apache,org.apache.batik,org.apache.xmlgraphics,org.apache.fop,com"/>
+ <property name="separated" value="true"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="InnerAssignment">
+ <property name="tokens" value="ASSIGN,BAND_ASSIGN,BOR_ASSIGN,BSR_ASSIGN,BXOR_ASSIGN,DIV_ASSIGN,MINUS_ASSIGN,MOD_ASSIGN,PLUS_ASSIGN,SL_ASSIGN,SR_ASSIGN,STAR_ASSIGN"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="LeftCurly"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="LocalFinalVariableName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="LocalVariableName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="MemberName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="MethodName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <!-- <module name="MethodParamPad"/> produces 4316 new errors -->
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="MissingSwitchDefault"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="ModifierOrder"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="MultipleVariableDeclarations"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="NeedBraces"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="NoWhitespaceAfter">
+ <property name="allowLineBreaks" value="false"/>
+ <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
+ </module>
+ <module name="NoWhitespaceAfter">
+ <property name="allowLineBreaks" value="true"/>
+ <property name="tokens" value="ARRAY_INIT"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="NoWhitespaceBefore"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="OneStatementPerLine"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="OperatorWrap"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="PackageName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="ParameterName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <!-- <module name="ParenPad"/> produces 16666 new errors -->
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="RedundantImport"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="RedundantModifier"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="RightCurly"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="SimplifyBooleanExpression"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="SimplifyBooleanReturn"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="StaticVariableName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="TypeName"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="TypecastParenPad">
+ <property name="tokens" value="RPAREN,TYPECAST"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="UnusedImports"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="UpperEll"/>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="WhitespaceAfter">
+ <property name="tokens" value="COMMA,SEMI"/> <!-- adding TYPECAST produces 2203 new errors -->
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+ <module name="WhitespaceAround">
+ <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND,WILDCARD_TYPE"/>
+ <property name="ignoreEnhancedForColon" value="false"/>
+ </module>
+ <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
+
+ </module>
+ <!-- ===================================================================================================== -->
+
+</module>
Added: xmlgraphics/commons/trunk/checkstyle-noframes.xsl
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/checkstyle-noframes.xsl?rev=1345683&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/checkstyle-noframes.xsl (added)
+++ xmlgraphics/commons/trunk/checkstyle-noframes.xsl Sun Jun 3 14:50:33 2012
@@ -0,0 +1,179 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sb...@apache.org> -->
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
+<!-- Usage (generates checkstyle_report.html): -->
+<!-- <checkstyle failonviolation="false" config="${check.config}"> -->
+<!-- <fileset dir="${src.dir}" includes="**/*.java"/> -->
+<!-- <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/> -->
+<!-- </checkstyle> -->
+<!-- <style basedir="${doc.dir}" destdir="${doc.dir}" -->
+<!-- includes="checkstyle_report.xml" -->
+<!-- style="${doc.dir}/checkstyle-noframes.xsl"/> -->
+
+<xsl:template match="checkstyle">
+ <html>
+ <head>
+ <style type="text/css">
+ .bannercell {
+ border: 0px;
+ padding: 0px;
+ }
+ body {
+ margin-left: 10;
+ margin-right: 10;
+ font:normal 80% arial,helvetica,sanserif;
+ background-color:#FFFFFF;
+ color:#000000;
+ }
+ .a td {
+ background: #efefef;
+ }
+ .b td {
+ background: #fff;
+ }
+ th, td {
+ text-align: left;
+ vertical-align: top;
+ }
+ th {
+ font-weight:bold;
+ background: #ccc;
+ color: black;
+ }
+ table, th, td {
+ font-size:100%;
+ border: none
+ }
+ table.log tr td, tr th {
+
+ }
+ h2 {
+ font-weight:bold;
+ font-size:140%;
+ margin-bottom: 5;
+ }
+ h3 {
+ font-size:100%;
+ font-weight:bold;
+ background: #525D76;
+ color: white;
+ text-decoration: none;
+ padding: 5px;
+ margin-right: 2px;
+ margin-left: 2px;
+ margin-bottom: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <a name="top"></a>
+ <!-- jakarta logo -->
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="bannercell" rowspan="2">
+ <!--a href="http://jakarta.apache.org/">
+ <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
+ </a-->
+ </td>
+ <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+ </tr>
+ <tr>
+ <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+ </tr>
+ </table>
+ <hr size="1"/>
+
+ <!-- Summary part -->
+ <xsl:apply-templates select="." mode="summary"/>
+ <hr size="1" width="100%" align="left"/>
+
+ <!-- Package List part -->
+ <xsl:apply-templates select="." mode="filelist"/>
+ <hr size="1" width="100%" align="left"/>
+
+ <!-- For each package create its part -->
+ <xsl:for-each select="file">
+ <xsl:sort select="@name"/>
+ <xsl:apply-templates select="."/>
+ <p/>
+ <p/>
+ </xsl:for-each>
+ <hr size="1" width="100%" align="left"/>
+
+
+ </body>
+ </html>
+</xsl:template>
+
+
+
+ <xsl:template match="checkstyle" mode="filelist">
+ <h3>Files</h3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Name</th>
+ <th>Errors</th>
+ </tr>
+ <xsl:for-each select="file">
+ <xsl:sort select="@name"/>
+ <xsl:variable name="errorCount" select="count(error)"/>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:template>
+
+
+ <xsl:template match="file">
+ <a name="f-{@name}"></a>
+ <h3>File <xsl:value-of select="@name"/></h3>
+
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Error Description</th>
+ <th>Line</th>
+ </tr>
+ <xsl:for-each select="error">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="@message"/></td>
+ <td><xsl:value-of select="@line"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <a href="#top">Back to top</a>
+ </xsl:template>
+
+
+ <xsl:template match="checkstyle" mode="summary">
+ <h3>Summary</h3>
+ <xsl:variable name="fileCount" select="count(file)"/>
+ <xsl:variable name="errorCount" select="count(file/error)"/>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Files</th>
+ <th>Errors</th>
+ </tr>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="$fileCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="alternated-row">
+ <xsl:attribute name="class">
+ <xsl:if test="position() mod 2 = 1">a</xsl:if>
+ <xsl:if test="position() mod 2 = 0">b</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+</xsl:stylesheet>
+
+
Added: xmlgraphics/commons/trunk/checkstyle-suppressions.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/checkstyle-suppressions.xml?rev=1345683&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/checkstyle-suppressions.xml (added)
+++ xmlgraphics/commons/trunk/checkstyle-suppressions.xml Sun Jun 3 14:50:33 2012
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+<suppressions>
+</suppressions>
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/fonts/Glyphs.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/fonts/Glyphs.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/fonts/Glyphs.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/fonts/Glyphs.java Sun Jun 3 14:50:33 2012
@@ -34,7 +34,10 @@ import org.apache.commons.io.IOUtils;
/**
* This class provides a number of constants for glyph management.
*/
-public class Glyphs {
+public final class Glyphs {
+
+ private Glyphs() {
+ }
/**
* Glyph name for the "notdef" glyph
@@ -708,7 +711,7 @@ public class Glyphs {
* @param ch glyph to evaluate
* @return the name of the glyph
*/
- public static final String charToGlyphName(char ch) {
+ public static String charToGlyphName(char ch) {
return stringToGlyph(Character.toString(ch));
}
@@ -717,7 +720,7 @@ public class Glyphs {
* @param glyphName the glyph name
* @return the Unicode sequence of the glyph (or null if the glyph name is unknown)
*/
- public static final String getUnicodeSequenceForGlyphName(String glyphName) {
+ public static String getUnicodeSequenceForGlyphName(String glyphName) {
//Mapping: see http://www.adobe.com/devnet/opentype/archives/glyph.html
//Step 1
int period = glyphName.indexOf('.');
@@ -787,7 +790,7 @@ public class Glyphs {
* @deprecated User getUnicodeCodePointsForGlyphName instead. This method only returns the
* first Unicode code point it finds.
*/
- public static final String glyphToString(String name) {
+ public static String glyphToString(String name) {
for (int i = 0; i < UNICODE_GLYPHS.length; i += 2) {
if (UNICODE_GLYPHS[i + 1].equals(name)) {
return UNICODE_GLYPHS[i];
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java Sun Jun 3 14:50:33 2012
@@ -44,15 +44,30 @@ import org.apache.xmlgraphics.image.rend
import org.apache.xmlgraphics.image.rendered.CachableRed;
import org.apache.xmlgraphics.image.rendered.RenderedImageCachableRed;
+// CSOFF: AvoidNestedBlocks
+// CSOFF: ConstantName
+// CSOFF: MethodName
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NeedBraces
+// CSOFF: OneStatementPerLine
+// CSOFF: OperatorWrap
+// CSOFF: StaticVariableName
+// CSOFF: WhitespaceAfter
+// CSOFF: WhitespaceAround
+
/**
* Set of utility methods for Graphics.
* These generally bypass broken methods in Java2D or provide tweaked
* implementations.
*
- * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @version $Id$
+ *
+ * Originally authored by Thomas DeWeese.
*/
-public class GraphicsUtil {
+public final class GraphicsUtil {
+
+ private GraphicsUtil() {
+ }
public static AffineTransform IDENTITY = new AffineTransform();
@@ -295,7 +310,7 @@ public class GraphicsUtil {
int width = x1-x0+1;
int [] data = null;
- for (int y = y0; y <= y1 ; y++) {
+ for (int y = y0; y <= y1; y++) {
data = src.getPixels(x0,y,width,1,data);
dst.setPixels (x0,y,width,1,data);
}
@@ -405,6 +420,10 @@ public class GraphicsUtil {
retDBT.getData(b), offsets[b], len);
break;
}
+ default:
+ throw new
+ UnsupportedOperationException("unsupported data type: "
+ + srcDB.getDataType());
}
}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java Sun Jun 3 14:50:33 2012
@@ -22,6 +22,8 @@ package org.apache.xmlgraphics.image.cod
import org.apache.xmlgraphics.image.codec.util.ImageDecodeParam;
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+// CSOFF: WhitespaceAround
+
/**
* An instance of <code>ImageDecodeParam</code> for decoding images in
* the PNG format.
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java Sun Jun 3 14:50:33 2012
@@ -19,16 +19,23 @@
package org.apache.xmlgraphics.image.codec.png;
-import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
-import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
-
import java.awt.image.ColorModel;
import java.awt.image.IndexColorModel;
import java.awt.image.RenderedImage;
import java.awt.image.SampleModel;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import java.util.ArrayList;
+
+import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+
+// CSOFF: MemberName
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NeedBraces
+// CSOFF: OperatorWrap
+// CSOFF: ParameterName
+// CSOFF: WhitespaceAround
/**
* An instance of <code>ImageEncodeParam</code> for encoding images in
@@ -1291,7 +1298,7 @@ public abstract class PNGEncodeParam imp
/**
* An abs() function for use by the Paeth predictor.
*/
- private static final int abs(int x) {
+ private static int abs(int x) {
return (x < 0) ? -x : x;
}
@@ -1300,7 +1307,7 @@ public abstract class PNGEncodeParam imp
* is included as a convenience to subclasses that override the
* <code>filterRow</code> method.
*/
- public static final int paethPredictor(int a, int b, int c) {
+ public static int paethPredictor(int a, int b, int c) {
int p = a + b - c;
int pa = abs(p - a);
int pb = abs(p - b);
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java Sun Jun 3 14:50:33 2012
@@ -52,6 +52,15 @@ import org.apache.xmlgraphics.image.code
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
import org.apache.xmlgraphics.image.codec.util.SimpleRenderedImage;
+// CSOFF: ConstantName
+// CSOFF: InnerAssignment
+// CSOFF: MethodName
+// CSOFF: MissingSwitchDefault
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NoWhitespaceAfter
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
/**
* @version $Id$
*/
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java Sun Jun 3 14:50:33 2012
@@ -41,7 +41,17 @@ import java.util.zip.DeflaterOutputStrea
import org.apache.xmlgraphics.image.codec.util.ImageEncoderImpl;
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
-class CRC {
+// CSOFF: ConstantName
+// CSOFF: InnerAssignment
+// CSOFF: LocalVariableName
+// CSOFF: MissingSwitchDefault
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
+final class CRC {
+
+ private CRC() {
+ }
private static int[] crcTable = new int[256];
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java Sun Jun 3 14:50:33 2012
@@ -55,8 +55,16 @@ import org.apache.xmlgraphics.image.code
import org.apache.xmlgraphics.image.rendered.AbstractRed;
import org.apache.xmlgraphics.image.rendered.CachableRed;
+// CSOFF: ConstantName
+// CSOFF: InnerAssignment
+// CSOFF: MethodName
+// CSOFF: MissingSwitchDefault
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NoWhitespaceAfter
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
/**
- *
* @version $Id$
*/
public class PNGRed extends AbstractRed {
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java Sun Jun 3 14:50:33 2012
@@ -30,6 +30,16 @@ import java.util.Map;
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
import org.apache.xmlgraphics.image.codec.util.SeekableStream;
+// CSOFF: ConstantName
+// CSOFF: EmptyStatement
+// CSOFF: InnerAssignment
+// CSOFF: LocalVariableName
+// CSOFF: MemberName
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NeedBraces
+// CSOFF: ParameterName
+// CSOFF: WhitespaceAround
+
/**
* A class representing an Image File Directory (IFD) from a TIFF 6.0
* stream. The TIFF file format is described in more detail in the
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java Sun Jun 3 14:50:33 2012
@@ -21,6 +21,11 @@ package org.apache.xmlgraphics.image.cod
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+// CSOFF: InnerAssignment
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
class TIFFFaxDecoder {
private int bitPointer, bytePointer;
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java Sun Jun 3 14:50:33 2012
@@ -21,6 +21,8 @@ package org.apache.xmlgraphics.image.cod
import java.io.Serializable;
+// CSOFF: WhitespaceAround
+
/**
* A class representing a field in a TIFF 6.0 Image File Directory.
*
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Sun Jun 3 14:50:33 2012
@@ -46,6 +46,12 @@ import org.apache.xmlgraphics.image.code
import org.apache.xmlgraphics.image.rendered.AbstractRed;
import org.apache.xmlgraphics.image.rendered.CachableRed;
+// CSOFF: LocalVariableName
+// CSOFF: MissingSwitchDefault
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
public class TIFFImage extends AbstractRed {
// Compression types
@@ -118,7 +124,7 @@ public class TIFFImage extends AbstractR
* Inflates <code>deflated</code> into <code>inflated</code> using the
* <code>Inflater</code> constructed during class instantiation.
*/
- private final void inflate(byte[] deflated, byte[] inflated) {
+ private void inflate(byte[] deflated, byte[] inflated) {
inflater.setInput(deflated);
try {
inflater.inflate(inflated);
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java Sun Jun 3 14:50:33 2012
@@ -48,6 +48,12 @@ import org.apache.xmlgraphics.image.code
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
import org.apache.xmlgraphics.image.codec.util.SeekableOutputStream;
+// CSOFF: ConstantName
+// CSOFF: MissingSwitchDefault
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
/**
* A baseline TIFF writer. The writer outputs TIFF images in either Bilevel,
* Greyscale, Palette color or Full Color modes.
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java Sun Jun 3 14:50:33 2012
@@ -21,6 +21,12 @@ package org.apache.xmlgraphics.image.cod
import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+// CSOFF: InnerAssignment
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: OneStatementPerLine
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAround
+
/**
* A class for performing LZW decoding.
*/
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java Sun Jun 3 14:50:33 2012
@@ -21,8 +21,8 @@ package org.apache.xmlgraphics.image.cod
import java.io.IOException;
import java.io.InputStream;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* A subclass of <code>SeekableStream</code> that may be used to wrap
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java Sun Jun 3 14:50:33 2012
@@ -23,7 +23,11 @@ import java.util.MissingResourceExceptio
import org.apache.xmlgraphics.util.i18n.LocalizableSupport;
-public class PropertyUtil {
+public final class PropertyUtil {
+
+ private PropertyUtil() {
+ }
+
protected static final String RESOURCES =
"org.apache.xmlgraphics.image.codec.Messages";
@@ -35,7 +39,7 @@ public class PropertyUtil {
public static String getString(String key) {
try {
return localizableSupport.formatMessage(key, null);
- } catch(MissingResourceException e) {
+ } catch (MissingResourceException e) {
return key;
}
}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java Sun Jun 3 14:50:33 2012
@@ -44,7 +44,7 @@ public class SeekableOutputStream extend
* <code>null</code>.
*/
public SeekableOutputStream(RandomAccessFile file) {
- if(file == null) {
+ if (file == null) {
throw new IllegalArgumentException("SeekableOutputStream0");
}
this.file = file;
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java Sun Jun 3 14:50:33 2012
@@ -881,7 +881,8 @@ public abstract class SeekableStream ext
boolean eol = false;
while (!eol) {
- switch (c = read()) {
+ c = read();
+ switch (c) {
case -1:
case '\n':
eol = true;
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java Sun Jun 3 14:50:33 2012
@@ -27,11 +27,13 @@ import java.awt.image.RenderedImage;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
-import java.util.Vector;
-import java.util.List;
import java.util.ArrayList;
-import java.util.Map;
import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+// CSOFF: WhitespaceAround
/**
* A simple class implemented the <code>RenderedImage</code>
@@ -161,7 +163,7 @@ public abstract class SimpleRenderedImag
* and so does not need to be implemented by subclasses.
*/
public int getMinTileX() {
- return XToTileX(getMinX());
+ return convertXToTileX(getMinX());
}
/**
@@ -170,7 +172,7 @@ public abstract class SimpleRenderedImag
* and so does not need to be implemented by subclasses.
*/
public int getMaxTileX() {
- return XToTileX(getMaxX() - 1);
+ return convertXToTileX(getMaxX() - 1);
}
/**
@@ -189,7 +191,7 @@ public abstract class SimpleRenderedImag
* implemented by subclasses.
*/
public int getMinTileY() {
- return YToTileY(getMinY());
+ return convertYToTileY(getMinY());
}
/**
@@ -198,7 +200,7 @@ public abstract class SimpleRenderedImag
* be implemented by subclasses.
*/
public int getMaxTileY() {
- return YToTileY(getMaxY() - 1);
+ return convertYToTileY(getMaxY() - 1);
}
/**
@@ -293,7 +295,7 @@ public abstract class SimpleRenderedImag
* relative to a given tile grid layout specified by its X offset
* and tile width.
*/
- public static int XToTileX(int x, int tileGridXOffset, int tileWidth) {
+ public static int convertXToTileX(int x, int tileGridXOffset, int tileWidth) {
x -= tileGridXOffset;
if (x < 0) {
x += 1 - tileWidth; // Force round to -infinity
@@ -306,7 +308,7 @@ public abstract class SimpleRenderedImag
* relative to a given tile grid layout specified by its Y offset
* and tile height.
*/
- public static int YToTileY(int y, int tileGridYOffset, int tileHeight) {
+ public static int convertYToTileY(int y, int tileGridYOffset, int tileHeight) {
y -= tileGridYOffset;
if (y < 0) {
y += 1 - tileHeight; // Force round to -infinity
@@ -322,8 +324,8 @@ public abstract class SimpleRenderedImag
* @param x the X coordinate of a pixel.
* @return the X index of the tile containing the pixel.
*/
- public int XToTileX(int x) {
- return XToTileX(x, getTileGridXOffset(), getTileWidth());
+ public int convertXToTileX(int x) {
+ return convertXToTileX(x, getTileGridXOffset(), getTileWidth());
}
/**
@@ -334,8 +336,8 @@ public abstract class SimpleRenderedImag
* @param y the Y coordinate of a pixel.
* @return the Y index of the tile containing the pixel.
*/
- public int YToTileY(int y) {
- return YToTileY(y, getTileGridYOffset(), getTileHeight());
+ public int convertYToTileY(int y) {
+ return convertYToTileY(y, getTileGridYOffset(), getTileHeight());
}
/**
@@ -424,10 +426,10 @@ public abstract class SimpleRenderedImag
* @param bounds the region of the RenderedImage to be returned.
*/
public Raster getData(Rectangle bounds) {
- int startX = XToTileX(bounds.x);
- int startY = YToTileY(bounds.y);
- int endX = XToTileX(bounds.x + bounds.width - 1);
- int endY = YToTileY(bounds.y + bounds.height - 1);
+ int startX = convertXToTileX(bounds.x);
+ int startY = convertYToTileY(bounds.y);
+ int endX = convertXToTileX(bounds.x + bounds.width - 1);
+ int endY = convertYToTileY(bounds.y + bounds.height - 1);
Raster tile;
if ((startX == endX) && (startY == endY)) {
@@ -496,10 +498,10 @@ public abstract class SimpleRenderedImag
bounds = dest.getBounds();
}
- int startX = XToTileX(bounds.x);
- int startY = YToTileY(bounds.y);
- int endX = XToTileX(bounds.x + bounds.width - 1);
- int endY = YToTileY(bounds.y + bounds.height - 1);
+ int startX = convertXToTileX(bounds.x);
+ int startY = convertYToTileY(bounds.y);
+ int endX = convertXToTileX(bounds.x + bounds.width - 1);
+ int endY = convertYToTileY(bounds.y + bounds.height - 1);
for (int j = startY; j <= endY; j++) {
for (int i = startX; i <= endX; i++) {
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java Sun Jun 3 14:50:33 2012
@@ -22,6 +22,8 @@ package org.apache.xmlgraphics.image.cod
import java.awt.image.ColorModel;
import java.awt.image.Raster;
+// CSOFF: InnerAssignment
+
/**
* A simple class that provides RenderedImage functionality
* given a Raster and a ColorModel.
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageCacheStatistics.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageCacheStatistics.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageCacheStatistics.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageCacheStatistics.java Sun Jun 3 14:50:33 2012
@@ -152,4 +152,4 @@ public class ImageCacheStatistics implem
return Collections.unmodifiableMap(imageCacheMissMap);
}
-}
\ No newline at end of file
+}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageKey.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageKey.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageKey.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/cache/ImageKey.java Sun Jun 3 14:50:33 2012
@@ -80,4 +80,4 @@ public class ImageKey {
return uri + " (" + flavor + ")";
}
-}
\ No newline at end of file
+}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/ImageConverterBitmap2G2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/ImageConverterBitmap2G2D.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/ImageConverterBitmap2G2D.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/ImageConverterBitmap2G2D.java Sun Jun 3 14:50:33 2012
@@ -54,9 +54,8 @@ public class ImageConverterBitmap2G2D ex
AffineTransform at = new AffineTransform();
at.translate(area.getX(), area.getY());
//Scale image to fit
- double sx, sy;
- sx = w / ri.getWidth();
- sy = h / ri.getHeight();
+ double sx = w / ri.getWidth();
+ double sy = h / ri.getHeight();
if (sx != 1.0 || sy != 1.0) {
at.scale(sx, sy);
}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java Sun Jun 3 14:50:33 2012
@@ -116,7 +116,8 @@ public class PreloaderTIFF extends Abstr
unit = (int)dir.getFieldAsLong(TIFFImageDecoder.TIFF_RESOLUTION_UNIT);
}
if (unit == 2 || unit == 3) {
- float xRes, yRes;
+ float xRes;
+ float yRes;
TIFFField fldx = dir.getField(TIFFImageDecoder.TIFF_X_RESOLUTION);
TIFFField fldy = dir.getField(TIFFImageDecoder.TIFF_Y_RESOLUTION);
if (fldx == null || fldy == null) {
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java Sun Jun 3 14:50:33 2012
@@ -39,7 +39,10 @@ import org.apache.xmlgraphics.util.UnitC
/**
* Helper and convenience methods for ImageIO.
*/
-public class ImageIOUtil {
+public final class ImageIOUtil {
+
+ private ImageIOUtil() {
+ }
/** Key for ImageInfo's custom objects to embed the ImageIO metadata */
public static final Object IMAGEIO_METADATA = IIOMetadata.class;
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java Sun Jun 3 14:50:33 2012
@@ -51,10 +51,10 @@ import javax.imageio.spi.IIOServiceProvi
import javax.imageio.stream.ImageInputStream;
import javax.xml.transform.Source;
+import org.w3c.dom.Element;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil;
-import org.w3c.dom.Element;
import org.apache.xmlgraphics.image.loader.Image;
import org.apache.xmlgraphics.image.loader.ImageException;
@@ -66,6 +66,8 @@ import org.apache.xmlgraphics.image.load
import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
import org.apache.xmlgraphics.image.loader.util.ImageUtil;
+import org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil;
+
/**
* An ImageLoader implementation based on ImageIO for loading bitmap images.
*/
@@ -80,7 +82,7 @@ public class ImageLoaderImageIO extends
private static final String JPEG_METADATA_NODE = "javax_imageio_jpeg_image_1.0";
- private static final Set providersIgnoringICC = new HashSet();
+ private static final Set providersIgnoringICC = new HashSet(); // CSOK: ConstantName
/**
* Main constructor.
@@ -267,7 +269,7 @@ public class ImageLoaderImageIO extends
*/
private ICC_Profile tryToExctractICCProfile(IIOMetadata iiometa) {
ICC_Profile iccProf = null;
- String supportedFormats[] = iiometa.getMetadataFormatNames();
+ String[] supportedFormats = iiometa.getMetadataFormatNames();
for (int i = 0; i < supportedFormats.length; i++) {
String format = supportedFormats[i];
Element root = (Element) iiometa.getAsTree(format);
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageProviderPipeline.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageProviderPipeline.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageProviderPipeline.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageProviderPipeline.java Sun Jun 3 14:50:33 2012
@@ -118,8 +118,7 @@ public class ImageProviderPipeline {
if (hints == null) {
hints = Collections.EMPTY_MAP;
}
- long start, duration;
- start = System.currentTimeMillis();
+ long start = System.currentTimeMillis();
Image img = null;
//Remember the last image in the pipeline that is cacheable and cache that.
@@ -149,6 +148,7 @@ public class ImageProviderPipeline {
}
boolean entirelyInCache = true;
+ long duration;
if (img == null && loader != null) {
//Load image
img = loader.loadImage(info, hints, context);
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageRepresentation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageRepresentation.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageRepresentation.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageRepresentation.java Sun Jun 3 14:50:33 2012
@@ -70,4 +70,4 @@ public class ImageRepresentation impleme
return getFlavor().toString();
}
-}
\ No newline at end of file
+}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageConverter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageConverter.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageConverter.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/spi/ImageConverter.java Sun Jun 3 14:50:33 2012
@@ -25,7 +25,6 @@ import java.util.Map;
import org.apache.xmlgraphics.image.loader.Image;
import org.apache.xmlgraphics.image.loader.ImageException;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
-import org.apache.xmlgraphics.image.loader.ImageInfo;
/**
* Defines an image converter that can convert one image representation into another.
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/ImageUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/ImageUtil.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/ImageUtil.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/ImageUtil.java Sun Jun 3 14:50:33 2012
@@ -47,7 +47,10 @@ import org.apache.xmlgraphics.image.load
/**
* Helper and convenience methods for working with the image package.
*/
-public class ImageUtil {
+public final class ImageUtil {
+
+ private ImageUtil() {
+ }
/**
* Returns the InputStream of a Source object.
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/Penalty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/Penalty.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/Penalty.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/Penalty.java Sun Jun 3 14:50:33 2012
@@ -24,7 +24,7 @@ package org.apache.xmlgraphics.image.loa
* {@link Integer}, but giving {@link Integer#MAX_VALUE} a special meaning: it means infinite
* penalty, i.e. a candidate with this penalty will be excluded from any choice.
*/
-public class Penalty {
+public final class Penalty {
public static final Penalty ZERO_PENALTY = new Penalty(0);
public static final Penalty INFINITE_PENALTY = new Penalty(Integer.MAX_VALUE);
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/SoftReferenceWithKey.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/SoftReferenceWithKey.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/SoftReferenceWithKey.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/util/SoftReferenceWithKey.java Sun Jun 3 14:50:33 2012
@@ -49,4 +49,4 @@ public class SoftReferenceWithKey extend
return this.key;
}
-}
\ No newline at end of file
+}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java Sun Jun 3 14:50:33 2012
@@ -40,14 +40,21 @@ import java.util.Vector;
import org.apache.xmlgraphics.image.GraphicsUtil;
+// CSOFF: LocalVariableName
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NeedBraces
+// CSOFF: NoWhitespaceAfter
+// CSOFF: WhitespaceAround
+
/**
* This is an abstract base class that takes care of most of the
* normal issues surrounding the implementation of the CachableRed
* (RenderedImage) interface. It tries to make no assumptions about
* the subclass implementation.
*
- * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @version $Id$
+ *
+ * Originally authored by Thomas DeWeese.
*/
public abstract class AbstractRed implements CachableRed {
@@ -560,13 +567,13 @@ public abstract class AbstractRed implem
if (tx1 >= minTileX+numXTiles) tx1 = minTileX+numXTiles-1;
if (ty1 >= minTileY+numYTiles) ty1 = minTileY+numYTiles-1;
- final boolean is_INT_PACK =
+ final boolean isIntPack =
GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false);
for (int y=ty0; y<=ty1; y++)
for (int x=tx0; x<=tx1; x++) {
Raster r = getTile(x, y);
- if (is_INT_PACK)
+ if (isIntPack)
GraphicsUtil.copyData_INT_PACK(r, wr);
else
GraphicsUtil.copyData_FALLBACK(r, wr);
@@ -587,11 +594,11 @@ public abstract class AbstractRed implem
* falles outside of the bounds of the tile grid for the image.
*/
public WritableRaster makeTile(int tileX, int tileY) {
- if ((tileX < minTileX) || (tileX >= minTileX+numXTiles) ||
- (tileY < minTileY) || (tileY >= minTileY+numYTiles))
+ if ((tileX < minTileX) || (tileX >= minTileX+numXTiles)
+ || (tileY < minTileY) || (tileY >= minTileY+numYTiles))
throw new IndexOutOfBoundsException
- ("Requested Tile (" + tileX + ',' + tileY +
- ") lies outside the bounds of image");
+ ("Requested Tile (" + tileX + ',' + tileY
+ + ") lies outside the bounds of image");
Point pt = new Point(tileGridXOff+tileX*tileWidth,
tileGridYOff+tileY*tileHeight);
@@ -621,8 +628,8 @@ public abstract class AbstractRed implem
int x1 = x0+wr.getWidth() -1;
int y1 = y0+wr.getHeight()-1;
- if ((x0 < bounds.x) || (x1 >= (bounds.x+bounds.width)) ||
- (y0 < bounds.y) || (y1 >= (bounds.y+bounds.height))) {
+ if ((x0 < bounds.x) || (x1 >= (bounds.x+bounds.width))
+ || (y0 < bounds.y) || (y1 >= (bounds.y+bounds.height))) {
// Part of this raster lies outside our bounds so subset
// it so it only advertises the stuff inside our bounds.
if (x0 < bounds.x) x0 = bounds.x;
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java Sun Jun 3 14:50:33 2012
@@ -33,17 +33,20 @@ import java.awt.image.SinglePixelPackedS
import java.awt.image.WritableRaster;
import org.apache.xmlgraphics.image.GraphicsUtil;
-import org.apache.xmlgraphics.image.rendered.AbstractRed;
-import org.apache.xmlgraphics.image.rendered.Any2sRGBRed;
-import org.apache.xmlgraphics.image.rendered.CachableRed;
+
+// CSOFF: ConstantName
+// CSOFF: NeedBraces
+// CSOFF: WhitespaceAfter
+// CSOFF: WhitespaceAround
/**
* This function will tranform an image from any colorspace into a
* luminance image. The alpha channel if any will be copied to the
* new image.
*
- * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @version $Id$
+ *
+ * Originally authored by Thomas DeWeese.
*/
public class Any2LsRGBRed extends AbstractRed {
@@ -108,8 +111,8 @@ public class Any2LsRGBRed extends Abstra
SampleModel srcSM = src.getSampleModel();
// Fast case, SRGB source, INT Pack writable raster...
- if (srcIssRGB &&
- Any2sRGBRed.is_INT_PACK_COMP(wr.getSampleModel())) {
+ if (srcIssRGB
+ && Any2sRGBRed.is_INT_PACK_COMP(wr.getSampleModel())) {
src.copyData(wr);
if (srcCM.hasAlpha())
GraphicsUtil.coerceData(wr, srcCM, false);
@@ -244,8 +247,7 @@ public class Any2LsRGBRed extends Abstra
return GraphicsUtil.Linear_sRGB_Unpre;
return GraphicsUtil.Linear_sRGB;
- }
- else {
+ } else {
// No ColorModel so try to make some intelligent
// decisions based just on the number of bands...
// 1 bands -> replicated into RGB
@@ -261,8 +263,9 @@ public class Any2LsRGBRed extends Abstra
return GraphicsUtil.Linear_sRGB_Unpre;
case 3:
return GraphicsUtil.Linear_sRGB;
+ default:
+ return GraphicsUtil.Linear_sRGB_Unpre;
}
- return GraphicsUtil.Linear_sRGB_Unpre;
}
}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java Sun Jun 3 14:50:33 2012
@@ -33,13 +33,23 @@ import java.awt.image.WritableRaster;
import org.apache.xmlgraphics.image.GraphicsUtil;
+// CSOFF: ConstantName
+// CSOFF: MethodName
+// CSOFF: MultipleVariableDeclarations
+// CSOFF: NeedBraces
+// CSOFF: OperatorWrap
+// CSOFF: WhitespaceAfter
+// CSOFF: WhitespaceAround
+
/**
* This function will tranform an image from any colorspace into a
* luminance image. The alpha channel if any will be copied to the
* new image.
*
- * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id$ */
+ * @version $Id$
+ *
+ * Originally authored by Thomas DeWeese.
+ */
public class Any2sRGBRed extends AbstractRed {
boolean srcIsLsRGB = false;
@@ -301,8 +311,7 @@ public class Any2sRGBRed extends Abstrac
return GraphicsUtil.sRGB_Unpre;
return GraphicsUtil.sRGB;
- }
- else {
+ } else {
// No ColorModel so try to make some intelligent
// decisions based just on the number of bands...
// 1 bands -> replicated into RGB
@@ -318,8 +327,9 @@ public class Any2sRGBRed extends Abstrac
return GraphicsUtil.sRGB_Unpre;
case 3:
return GraphicsUtil.sRGB;
+ default:
+ return GraphicsUtil.sRGB_Unpre;
}
- return GraphicsUtil.sRGB_Unpre;
}
}
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java?rev=1345683&r1=1345682&r2=1345683&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java Sun Jun 3 14:50:33 2012
@@ -26,14 +26,19 @@ import java.awt.image.WritableRaster;
import org.apache.xmlgraphics.image.GraphicsUtil;
+// CSOFF: NeedBraces
+// CSOFF: WhitespaceAfter
+// CSOFF: WhitespaceAround
+
/**
* This implements CachableRed based on a BufferedImage.
* You can use this to wrap a BufferedImage that you want to
* appear as a CachableRed.
* It essentially ignores the dependency and dirty region methods.
*
- * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id$ */
+ * Originally authored by Thomas DeWeese.
+ * @version $Id$
+ */
public class BufferedImageCachableRed extends AbstractRed {
// The bufferedImage that we wrap...
BufferedImage bi;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org