You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2010/06/24 02:52:57 UTC

svn commit: r957396 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/converter/TimePatternConverterTest.java components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java

Author: ningjiang
Date: Thu Jun 24 00:52:56 2010
New Revision: 957396

URL: http://svn.apache.org/viewvc?rev=957396&view=rev
Log:
Fixed the CS error and some IDE warning

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimePatternConverterTest.java
    camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimePatternConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimePatternConverterTest.java?rev=957396&r1=957395&r2=957396&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimePatternConverterTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/converter/TimePatternConverterTest.java Thu Jun 24 00:52:56 2010
@@ -114,7 +114,7 @@ public class TimePatternConverterTest ex
     public void testIllegalHMSTimePattern() {
         String source = new String("36h88m5s");
         try {
-            long milliseconds = TimePatternConverter.toMilliSeconds(source);
+            TimePatternConverter.toMilliSeconds(source);
             fail("Should throw IllegalArgumentException");
         } catch (Exception e) {
             assertIsInstanceOf(IllegalArgumentException.class, e);
@@ -125,7 +125,7 @@ public class TimePatternConverterTest ex
     public void testIllegalMSTimePattern() {
         String source = new String("55m75s");
         try {
-            long milliseconds = TimePatternConverter.toMilliSeconds(source);
+            TimePatternConverter.toMilliSeconds(source);
             fail("Should throw IllegalArgumentException");
         } catch (Exception e) {
             assertIsInstanceOf(IllegalArgumentException.class, e);
@@ -136,7 +136,7 @@ public class TimePatternConverterTest ex
     public void testIllegalHMTimePattern() throws Exception {
         String source = new String("1h89s");
         try {
-            long milliseconds = TimePatternConverter.toMilliSeconds(source);
+            TimePatternConverter.toMilliSeconds(source);
             fail("Should throw IllegalArgumentException");
         } catch (Exception e) {
             assertIsInstanceOf(IllegalArgumentException.class, e);

Modified: camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java?rev=957396&r1=957395&r2=957396&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java (original)
+++ camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java Thu Jun 24 00:52:56 2010
@@ -346,15 +346,15 @@ public class BindyFixedLengthFactory ext
 
                         // Check if we must padd
                         if (result.length() < fieldLength) {
-                        	
-                        	// No padding defined for the field
-                        	if ( paddCharField == 0 ) {
-                        		// We use the padding defined for the Record
-                        		paddChar = paddingChar;
-                        	} else {
-                        		paddChar = paddCharField;
-                        	}
-                        	
+
+                            // No padding defined for the field
+                            if (paddCharField == 0) {
+                                // We use the padding defined for the Record
+                                paddChar = paddingChar;
+                            } else {
+                                paddChar = paddCharField;
+                            }
+
                             if (align.contains("R")) {
                                 temp.append(generatePaddingChars(paddChar, fieldLength, result.length()));
                                 temp.append(result);