commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1495203 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/ test/java/org/apache/commons/csv/
Date Thu, 20 Jun 2013 21:39:53 GMT
Author: ggregory
Date: Thu Jun 20 21:39:53 2013
New Revision: 1495203

URL: http://svn.apache.org/r1495203
Log:
- Add final modifier to method parameters.
- Add final modifier to local variables.

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordTest.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1495203&r1=1495202&r2=1495203&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Thu Jun 20
21:39:53 2013
@@ -107,7 +107,7 @@ public class CSVFormat implements Serial
                 final Quote quotePolicy, final Character commentStart,
                 final Character escape, final boolean ignoreSurroundingSpaces,
                 final boolean ignoreEmptyLines, final String recordSeparator,
-                String nullToString, final String[] header) {
+                final String nullToString, final String[] header) {
             if (isLineBreak(delimiter)) {
                 throw new IllegalArgumentException("The delimiter cannot be a line break");
             }
@@ -599,7 +599,7 @@ public class CSVFormat implements Serial
             final Quote quotePolicy, final Character commentStart,
             final Character escape, final boolean ignoreSurroundingSpaces,
             final boolean ignoreEmptyLines, final String recordSeparator,
-            String nullToString, final String[] header) {
+            final String nullToString, final String[] header) {
         if (isLineBreak(delimiter)) {
             throw new IllegalArgumentException("The delimiter cannot be a line break");
         }

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java?rev=1495203&r1=1495202&r2=1495203&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java Thu Jun 20
21:39:53 2013
@@ -84,7 +84,7 @@ public class CSVRecord implements Serial
         final Integer index = mapping.get(name);
         try {
             return index != null ? values[index.intValue()] : null;
-        } catch (ArrayIndexOutOfBoundsException e) {
+        } catch (final ArrayIndexOutOfBoundsException e) {
             throw new IllegalArgumentException(
                     String.format(
                             "Index for header '%s' is %d but CSVRecord only has %d values!",

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordTest.java?rev=1495203&r1=1495202&r2=1495203&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordTest.java Thu Jun
20 21:39:53 2013
@@ -95,8 +95,8 @@ public class CSVRecordTest {
     @Test
     public void testIterator() {
         int i = 0;
-        for (Iterator<String> itr = record.iterator(); itr.hasNext();) {
-            String value = itr.next();
+        for (final Iterator<String> itr = record.iterator(); itr.hasNext();) {
+            final String value = itr.next();
             assertEquals(values[i], value);
             i++;
         }

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java?rev=1495203&r1=1495202&r2=1495203&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java Thu Jun
20 21:39:53 2013
@@ -29,14 +29,14 @@ final class TokenMatchers {
     public static Matcher<Token> hasType(final Token.Type expectedType) {
         return new TypeSafeDiagnosingMatcher<Token>() {
 
-            public void describeTo(Description description) {
+            public void describeTo(final Description description) {
                 description.appendText("token has type ");
                 description.appendValue(expectedType);
             }
 
             @Override
-            protected boolean matchesSafely(Token item,
-                    Description mismatchDescription) {
+            protected boolean matchesSafely(final Token item,
+                    final Description mismatchDescription) {
                 mismatchDescription.appendText("token type is ");
                 mismatchDescription.appendValue(item.type);
                 if (item.type == expectedType) {
@@ -50,14 +50,14 @@ final class TokenMatchers {
     public static Matcher<Token> hasContent(final String expectedContent) {
         return new TypeSafeDiagnosingMatcher<Token>() {
 
-            public void describeTo(Description description) {
+            public void describeTo(final Description description) {
                 description.appendText("token has content ");
                 description.appendValue(expectedContent);
             }
 
             @Override
-            protected boolean matchesSafely(Token item,
-                    Description mismatchDescription) {
+            protected boolean matchesSafely(final Token item,
+                    final Description mismatchDescription) {
                 mismatchDescription.appendText("token content is ");
                 mismatchDescription.appendValue(item.content.toString());
                 if (expectedContent.equals(item.content.toString())) {
@@ -71,13 +71,13 @@ final class TokenMatchers {
     public static Matcher<Token> isReady() {
         return new TypeSafeDiagnosingMatcher<Token>() {
 
-            public void describeTo(Description description) {
+            public void describeTo(final Description description) {
                 description.appendText("token is ready ");
             }
 
             @Override
-            protected boolean matchesSafely(Token item,
-                    Description mismatchDescription) {
+            protected boolean matchesSafely(final Token item,
+                    final Description mismatchDescription) {
                 mismatchDescription.appendText("token is not ready ");
                 return item.isReady;
             }



Mime
View raw message