Return-Path: Delivered-To: apmail-incubator-jspwiki-commits-archive@minotaur.apache.org Received: (qmail 95097 invoked from network); 23 Jul 2009 09:56:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jul 2009 09:56:43 -0000 Received: (qmail 44443 invoked by uid 500); 23 Jul 2009 09:57:48 -0000 Delivered-To: apmail-incubator-jspwiki-commits-archive@incubator.apache.org Received: (qmail 44431 invoked by uid 500); 23 Jul 2009 09:57:48 -0000 Mailing-List: contact jspwiki-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-commits@incubator.apache.org Received: (qmail 44422 invoked by uid 99); 23 Jul 2009 09:57:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jul 2009 09:57:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jul 2009 09:57:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 34E3723888D3; Thu, 23 Jul 2009 09:57:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r796996 - /incubator/jspwiki/trunk/tests/java/TranslationsCheck.java Date: Thu, 23 Jul 2009 09:57:26 -0000 To: jspwiki-commits@incubator.apache.org From: jalkanen@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090723095726.34E3723888D3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jalkanen Date: Thu Jul 23 09:57:25 2009 New Revision: 796996 URL: http://svn.apache.org/viewvc?rev=796996&view=rev Log: Cleaning checkstyle warnings. Modified: incubator/jspwiki/trunk/tests/java/TranslationsCheck.java Modified: incubator/jspwiki/trunk/tests/java/TranslationsCheck.java URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/TranslationsCheck.java?rev=796996&r1=796995&r2=796996&view=diff ============================================================================== --- incubator/jspwiki/trunk/tests/java/TranslationsCheck.java (original) +++ incubator/jspwiki/trunk/tests/java/TranslationsCheck.java Thu Jul 23 09:57:25 2009 @@ -98,7 +98,7 @@ System.out.println("Duplicates overall (two or more occurences):"); System.out.println("--------------------------------------------"); - Iterator iter = duplProps.iterator(); + Iterator iter = duplProps.iterator(); if (duplProps.size() == 0) System.out.println("(none)"); else @@ -134,10 +134,10 @@ System.out.println("Missing:"); System.out.println("--------"); - Iterator iter = sortedNames(p1).iterator(); + Iterator iter = sortedNames(p1).iterator(); while (iter.hasNext()) { - String name = (String) iter.next(); + String name = iter.next(); String value = p1.getProperty(name); if (p2.get(name) == null) @@ -152,7 +152,7 @@ iter = sortedNames(p2).iterator(); while (iter.hasNext()) { - String name = (String) iter.next(); + String name = iter.next(); String value = p2.getProperty(name); if (p1.get(name) == null) @@ -163,29 +163,31 @@ System.out.println(); } - private static List sortedNames(Properties p) + @SuppressWarnings("unchecked") + private static List sortedNames(Properties p) { List list = new ArrayList(); - Enumeration iter = p.propertyNames(); + Enumeration iter = (Enumeration) p.propertyNames(); while (iter.hasMoreElements()) { - list.add( (String)iter.nextElement() ); + list.add( iter.nextElement() ); } Collections.sort(list); return list; } + @SuppressWarnings("unchecked") private static void detectDuplicates(String source) throws IOException { Properties p = new Properties(); p.load(new FileInputStream(new File(base + source))); - Enumeration iter = p.propertyNames(); + Enumeration iter = (Enumeration) p.propertyNames(); String currentStr; while (iter.hasMoreElements()) { - currentStr = (String) iter.nextElement(); + currentStr = iter.nextElement(); if (!allProps.add(currentStr)) duplProps.add(currentStr); }