Author: pmouawad
Date: Mon Sep 3 21:21:00 2012
New Revision: 1380360
URL: http://svn.apache.org/viewvc?rev=1380360&view=rev
Log:
Fix Unused encoding
Modified:
jmeter/trunk/src/jorphan/org/apache/jorphan/io/TextFile.java
Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/io/TextFile.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/io/TextFile.java?rev=1380360&r1=1380359&r2=1380360&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/io/TextFile.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/io/TextFile.java Mon Sep 3 21:21:00 2012
@@ -99,6 +99,7 @@ public class TextFile extends File {
*/
public TextFile(String filename, String encoding) {
super(filename);
+ setEncoding(encoding);
}
/**
@@ -190,18 +191,23 @@ public class TextFile extends File {
*/
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (!super.equals(obj))
+ }
+ if (!super.equals(obj)) {
return false;
- if (!(obj instanceof TextFile))
+ }
+ if (!(obj instanceof TextFile)) {
return false;
+ }
TextFile other = (TextFile) obj;
if (encoding == null) {
- if (other.encoding != null)
+ if (other.encoding != null) {
return false;
- } else if (!encoding.equals(other.encoding))
+ }
+ } else if (!encoding.equals(other.encoding)) {
return false;
+ }
return true;
}
}
|