Skip to content

Commit a90b5ee

Browse files
committed
Merge pull request #836 from paulkrause88/patch-1
Remove redundant field fCause
2 parents 1360f9b + 3189af0 commit a90b5ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/junit/internal/ArrayComparisonFailure.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public class ArrayComparisonFailure extends AssertionError {
1616

1717
private List<Integer> fIndices = new ArrayList<Integer>();
1818
private final String fMessage;
19-
private final AssertionError fCause;
2019

2120
/**
2221
* Construct a new <code>ArrayComparisonFailure</code> with an error text and the array's
@@ -28,7 +27,7 @@ public class ArrayComparisonFailure extends AssertionError {
2827
*/
2928
public ArrayComparisonFailure(String message, AssertionError cause, int index) {
3029
fMessage = message;
31-
fCause = cause;
30+
initCause(cause);
3231
addDimension(index);
3332
}
3433

@@ -49,7 +48,7 @@ public String getMessage() {
4948
sb.append("]");
5049
}
5150
sb.append("; ");
52-
sb.append(fCause.getMessage());
51+
sb.append(getCause().getMessage());
5352
return sb.toString();
5453
}
5554

0 commit comments

Comments
 (0)