mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
Remove system-dependent line separator logic in BitMatrix
This commit is contained in:
parent
68755c5250
commit
8475bf6fd2
|
@ -414,9 +414,13 @@ public final class BitMatrix implements Cloneable {
|
|||
}
|
||||
|
||||
public String toString(String setString, String unsetString) {
|
||||
return toString(setString, unsetString, System.lineSeparator());
|
||||
return toString(setString, unsetString, "\n");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated call {@link #toString(String,String)} only, which uses \n line separator always
|
||||
*/
|
||||
@Deprecated
|
||||
public String toString(String setString, String unsetString, String lineSeparator) {
|
||||
StringBuilder result = new StringBuilder(height * (width + 1));
|
||||
for (int y = 0; y < height; y++) {
|
||||
|
|
|
@ -179,7 +179,7 @@ public final class BitMatrixTestCase extends Assert {
|
|||
|
||||
assertEquals(emptyMatrix24, BitMatrix.parse(" \n \n \n \n", "x", " "));
|
||||
|
||||
assertEquals(centerMatrix, BitMatrix.parse(centerMatrix.toString("x", ".", "\n"), "x", "."));
|
||||
assertEquals(centerMatrix, BitMatrix.parse(centerMatrix.toString("x", "."), "x", "."));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue