diff --git a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/DfsTask.java b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/DfsTask.java
index 8dc7f3766eb..36119f5aac5 100644
--- a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/DfsTask.java
+++ b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/DfsTask.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.ant;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.LinkedList;
@@ -146,8 +147,12 @@ public class DfsTask extends Task {
protected void pushContext() {
antOut = System.out;
antErr = System.err;
- System.setOut(new PrintStream(out));
- System.setErr(out == err ? System.out : new PrintStream(err));
+ try {
+ System.setOut(new PrintStream(out, false, "UTF-8"));
+ System.setErr(out == err ?
+ System.out : new PrintStream(err, false, "UTF-8"));
+ } catch (UnsupportedEncodingException ignored) {
+ }
}
/**
diff --git a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsExists.java b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsExists.java
index 8fbe872a836..95e38687956 100644
--- a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsExists.java
+++ b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsExists.java
@@ -19,6 +19,6 @@
package org.apache.hadoop.ant.condition;
public class DfsExists extends DfsBaseConditional {
- protected final char flag = 'e';
+ protected static final char flag = 'e';
protected char getFlag() { return flag; }
}
diff --git a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsIsDir.java b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsIsDir.java
index e146d06dcf4..b889615896e 100644
--- a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsIsDir.java
+++ b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsIsDir.java
@@ -19,6 +19,6 @@
package org.apache.hadoop.ant.condition;
public class DfsIsDir extends DfsBaseConditional {
- protected final char flag = 'd';
+ protected static final char flag = 'd';
protected char getFlag() { return flag; }
}
diff --git a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsZeroLen.java b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsZeroLen.java
index caac37847bb..70b4fbf2233 100644
--- a/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsZeroLen.java
+++ b/hadoop-tools/hadoop-ant/src/main/java/org/apache/hadoop/ant/condition/DfsZeroLen.java
@@ -19,6 +19,6 @@
package org.apache.hadoop.ant.condition;
public class DfsZeroLen extends DfsBaseConditional {
- protected final char flag = 'z';
+ protected static final char flag = 'z';
protected char getFlag() { return flag; }
}
diff --git a/hadoop-tools/hadoop-datajoin/dev-support/findbugs-exclude.xml b/hadoop-tools/hadoop-datajoin/dev-support/findbugs-exclude.xml
new file mode 100644
index 00000000000..3544581dba5
--- /dev/null
+++ b/hadoop-tools/hadoop-datajoin/dev-support/findbugs-exclude.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hadoop-tools/hadoop-datajoin/pom.xml b/hadoop-tools/hadoop-datajoin/pom.xml
index 7e558716544..24f8be720af 100644
--- a/hadoop-tools/hadoop-datajoin/pom.xml
+++ b/hadoop-tools/hadoop-datajoin/pom.xml
@@ -108,6 +108,17 @@
+
+ org.codehaus.mojo
+ findbugs-maven-plugin
+
+ true
+ true
+ ${basedir}/dev-support/findbugs-exclude.xml
+
+ Max
+
+
org.apache.maven.plugins
maven-antrun-plugin