Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed problems with style and other small issues

  • Loading branch information...
commit 72e10d3ca80ae76af8920091736882a6dc0a5036 1 parent 7b5e0ac
Juan Cortez jcortez authored
1  acknowledgements.txt
@@ -161,4 +161,3 @@
161 161 == NOTE: as of September 2011, we have stopped recording contributions here.
162 162 For a full list of everyone who has contributed great bug reports and code, please see
163 163 http://github.com/KentBeck/junit
164   ->>>>>>> upstream/master
4 src/main/java/org/junit/Assert.java
@@ -465,13 +465,9 @@ static public void assertEquals(String message, double expected,
465 465 static public void assertEquals(String message, float expected,
466 466 float actual, float delta) {
467 467 if (Float.compare(expected, actual) == 0)
468   - {
469 468 return;
470   - }
471 469 if (!(Math.abs(expected - actual) <= delta))
472   - {
473 470 failNotEquals(message, new Float(expected), new Float(actual));
474   - }
475 471 }
476 472
477 473 /**
18 src/main/java/org/junit/runners/model/InitializationError.java
... ... @@ -1,8 +1,6 @@
1 1 package org.junit.runners.model;
2 2
3   -import java.util.ArrayList;
4 3 import java.util.Arrays;
5   -import java.util.Collections;
6 4 import java.util.List;
7 5
8 6 /**
@@ -17,11 +15,11 @@
17 15 * errors {@code errors} as causes
18 16 */
19 17 public InitializationError(List<Throwable> errors) {
20   - fErrors= new ArrayList<Throwable>(errors);
  18 + fErrors= errors;
21 19 }
22 20
23 21 public InitializationError(Throwable error) {
24   - fErrors= Arrays.asList(error);
  22 + this(Arrays.asList(error));
25 23 }
26 24
27 25 /**
@@ -36,16 +34,6 @@ public InitializationError(String string) {
36 34 * Returns one or more Throwables that led to this initialization error.
37 35 */
38 36 public List<Throwable> getCauses() {
39   - return Collections.unmodifiableList(fErrors);
40   - }
41   -
42   - @Override
43   - public String getMessage() {
44   - StringBuilder sb = new StringBuilder(
45   - String.format("There were %d errors:", fErrors.size()));
46   - for (Throwable e : fErrors) {
47   - sb.append(String.format("\n %s(%s)", e.getClass().getName(), e.getMessage()));
48   - }
49   - return sb.toString();
  37 + return fErrors;
50 38 }
51 39 }

0 comments on commit 72e10d3

Please sign in to comment.
Something went wrong with that request. Please try again.