From 3215661e63d0022c2790c92fa269a2255cefcc33 Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Sun, 8 Dec 2002 03:18:25 +0000 Subject: [PATCH] minor changes found will trying to debug why the tests are failing. --- .../checkstyle/checks/TranslationCheck.java | 18 +++++++++--------- .../tools/checkstyle/BaseCheckTestCase.java | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java index 99071cb44..4285a180a 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java @@ -237,20 +237,20 @@ public class TranslationCheck extends AbstractFileSetCheck */ private void checkPropertyFileSets(Map aPropFiles) { - Set keySet = aPropFiles.keySet(); + final Set keySet = aPropFiles.keySet(); for (Iterator iterator = keySet.iterator(); iterator.hasNext();) { - String baseName = (String) iterator.next(); - Set files = (Set) aPropFiles.get(baseName); + final String baseName = (String) iterator.next(); + final Set files = (Set) aPropFiles.get(baseName); if (files.size() >= 2) { // build a map from files to the keys they contain - Set keys = new HashSet(); - Map fileMap = new HashMap(); + final Set keys = new HashSet(); + final Map fileMap = new HashMap(); for (Iterator iter = files.iterator(); iter.hasNext();) { - File file = (File) iter.next(); - Set fileKeys = loadKeys(file); + final File file = (File) iter.next(); + final Set fileKeys = loadKeys(file); keys.addAll(fileKeys); fileMap.put(file, fileKeys); } @@ -273,8 +273,8 @@ public class TranslationCheck extends AbstractFileSetCheck */ public void process(File[] aFiles) { - Set dirs = getParentDirs(aFiles); - Set propertyFiles = getPropertyFiles(dirs); + final Set dirs = getParentDirs(aFiles); + final Set propertyFiles = getPropertyFiles(dirs); final Map propFilesMap = arrangePropertyFiles(propertyFiles); checkPropertyFileSets(propFilesMap); } diff --git a/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java b/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java index 7fce2c3bd..c9d10062f 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java @@ -80,8 +80,10 @@ public abstract class BaseCheckTestCase verify(aC, aFileName, aFileName, aExpected); } - protected void verify(Checker aC, String aProcessedFilename, - String aMessageFileName, String[] aExpected) + protected void verify(Checker aC, + String aProcessedFilename, + String aMessageFileName, + String[] aExpected) throws Exception { mStream.flush();