From b1885e4435e6c00b780f8182b2d03f7978f87940 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Wed, 15 Nov 2006 00:09:00 +0000 Subject: [PATCH] checkstyle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@475075 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/taskdefs/optional/image/Image.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java b/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java index 099d75a28..7779c0c21 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java @@ -51,18 +51,25 @@ import java.util.Vector; * @see org.apache.tools.ant.types.DataType */ public class Image extends MatchingTask { + // CheckStyle:VisibilityModifier OFF - bc protected Vector instructions = new Vector(); protected boolean overwrite = false; protected Vector filesets = new Vector(); protected File srcDir = null; protected File destDir = null; + // CheckStyle:MemberNameCheck OFF - bc + //cannot remove underscores due to protected visibility >:( protected String str_encoding = "JPEG"; protected boolean garbage_collect = false; private boolean failonerror = true; + // CheckStyle:MemberNameCheck ON + + // CheckStyle:VisibilityModifier ON + /** * Add a set of files to be deleted. * @param set the FileSet to add. @@ -198,12 +205,12 @@ public class Image extends MatchingTask { if (destDir == null) { destDir = srcDir; } - File new_file = new File(destDir, file.getName()); + File newFile = new File(destDir, file.getName()); - if ((overwrite && new_file.exists()) && (!new_file.equals(file))) { - new_file.delete(); + if ((overwrite && newFile.exists()) && (!newFile.equals(file))) { + newFile.delete(); } - FileOutputStream stream = new FileOutputStream(new_file); + FileOutputStream stream = new FileOutputStream(newFile); JAI.create("encode", image, stream, str_encoding.toUpperCase(), null); @@ -261,8 +268,8 @@ public class Image extends MatchingTask { ArrayList filesToRemove = new ArrayList(); for (Iterator i = filesList.iterator(); i.hasNext();) { File f = (File) i.next(); - File new_file = new File(destDir, f.getName()); - if (new_file.exists()) { + File newFile = new File(destDir, f.getName()); + if (newFile.exists()) { filesToRemove.add(f); } }