Author: hadrian
Date: Thu Jun 9 21:15:35 2011
New Revision: 1134081
URL: http://svn.apache.org/viewvc?rev=1134081&view=rev
Log:
Checkstyle fixes
Modified:
camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
Modified:
camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java?rev=1134081&r1=1134080&r2=1134081&view=diff
==============================================================================
---
camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
(original)
+++
camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
Thu Jun 9 21:15:35 2011
@@ -33,19 +33,19 @@ import org.junit.Test;
* @version
*/
public class BeanValidatorRouteTest extends CamelTestSupport {
- private Locale origLocale;
+ private Locale origLocale;
+
+ @Before
+ public void setLanguage() {
+ origLocale = Locale.getDefault();
+ Locale.setDefault(Locale.US);
+ }
+
+ @After
+ public void restoreLanguage() {
+ Locale.setDefault(origLocale);
+ }
- @Before
- public void setLanguage() {
- origLocale = Locale.getDefault();
- Locale.setDefault(Locale.US);
- }
-
- @After
- public void restoreLanguage() {
- Locale.setDefault(origLocale);
- }
-
@Test
public void validateShouldSuccessWithImpliciteDefaultGroup() throws
Exception {
Exchange exchange = template.request("bean-validator://x", new
Processor() {
Modified:
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java?rev=1134081&r1=1134080&r2=1134081&view=diff
==============================================================================
---
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
(original)
+++
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
Thu Jun 9 21:15:35 2011
@@ -56,20 +56,20 @@ public enum HdfsFileType {
NORMAL_FILE {
@Override
public long append(HdfsOutputStream hdfsostr, Object key, Object
value, TypeConverter typeConverter) {
- InputStream is = null;
+ InputStream is = null;
try {
is = typeConverter.convertTo(InputStream.class, value);
return copyBytes(is, (FSDataOutputStream) hdfsostr.getOut(),
HdfsConstants.DEFAULT_BUFFERSIZE, false);
} catch (IOException ex) {
throw new RuntimeCamelException(ex);
} finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException e) {
- throw new
RuntimeException("Error closing stream", e);
- }
- }
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ throw new RuntimeException("Error closing stream", e);
+ }
+ }
}
}
Modified:
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java?rev=1134081&r1=1134080&r2=1134081&view=diff
==============================================================================
---
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
(original)
+++
camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
Thu Jun 9 21:15:35 2011
@@ -282,7 +282,7 @@ public class HdfsWritableFactories {
@Override
public Writable create(Object value, TypeConverter typeConverter,
Holder<Integer> size) {
- InputStream is = null;
+ InputStream is = null;
try {
is = typeConverter.convertTo(InputStream.class, value);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -294,13 +294,13 @@ public class HdfsWritableFactories {
} catch (IOException ex) {
throw new RuntimeCamelException(ex);
} finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException e) {
- throw new
RuntimeException("Error closing stream", e);
- }
- }
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ throw new RuntimeException("Error closing stream", e);
+ }
+ }
}
}