Skip to content

Commit

Permalink
format with Locale.US (tabulapdf#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
THausherr authored Apr 18, 2020
1 parent 6278064 commit eec86f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/technology/tabula/QuickSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* An implementation of Quicksort.
*
* @see http://de.wikipedia.org/wiki/Quicksort
* @see <a href="http://de.wikipedia.org/wiki/Quicksort">wikipedia</a>
*
* @author UWe Pachler
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/technology/tabula/Rectangle.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import java.awt.geom.Rectangle2D;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;

@SuppressWarnings("serial")
public class Rectangle extends Rectangle2D.Float {

/**
* Ill-defined comparator, from when Rectangle was Comparable.
*
* @see https://github.com/tabulapdf/tabula-java/issues/116
* @see <a href="https://github.com/tabulapdf/tabula-java/issues/116">PR 116</a>
* @deprecated with no replacement
*/
@Deprecated
Expand Down Expand Up @@ -151,7 +152,7 @@ public String toString() {
StringBuilder sb = new StringBuilder();
String s = super.toString();
sb.append(s.substring(0, s.length() - 1));
sb.append(String.format(",bottom=%f,right=%f]", this.getBottom(), this.getRight()));
sb.append(String.format(Locale.US, ",bottom=%f,right=%f]", this.getBottom(), this.getRight()));
return sb.toString();
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/technology/tabula/Ruling.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Comparator;
import java.util.Formatter;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;

Expand Down Expand Up @@ -291,7 +292,7 @@ public double getAngle() {
public String toString() {
StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb);
String rv = formatter.format("%s[x1=%f y1=%f x2=%f y2=%f]", this.getClass().toString(), this.x1, this.y1, this.x2, this.y2).toString();
String rv = formatter.format(Locale.US, "%s[x1=%f y1=%f x2=%f y2=%f]", this.getClass().toString(), this.x1, this.y1, this.x2, this.y2).toString();
formatter.close();
return rv;
}
Expand Down

0 comments on commit eec86f5

Please sign in to comment.