Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
Signed-off-by: Lene Preuss <[email protected]>
  • Loading branch information
Lene Preuss authored and lene committed Oct 13, 2021
1 parent 0503448 commit bfc5f52
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions java/src/com/here/flexpolyline/PolylineEncoderDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ private static class Decoder {

private final char[] encoded;
private final AtomicInteger index;
private final Converter latConveter;
private final Converter lngConveter;
private final Converter zConveter;
private final Converter latConverter;
private final Converter lngConverter;
private final Converter zConverter;

private int precision;
private int thirdDimPrecision;
Expand All @@ -201,9 +201,9 @@ public Decoder(String encoded) {
this.encoded = encoded.toCharArray();
this.index = new AtomicInteger(0);
decodeHeader();
this.latConveter = new Converter(precision);
this.lngConveter = new Converter(precision);
this.zConveter = new Converter(thirdDimPrecision);
this.latConverter = new Converter(precision);
this.lngConverter = new Converter(precision);
this.zConverter = new Converter(thirdDimPrecision);
}

private boolean hasThirdDimension() {
Expand Down Expand Up @@ -243,14 +243,14 @@ private boolean decodeOne(AtomicReference<Double> lat,
if (index.get() == encoded.length) {
return false;
}
if (!latConveter.decodeValue(encoded, index, lat)) {
if (!latConverter.decodeValue(encoded, index, lat)) {
throw new IllegalArgumentException("Invalid encoding");
}
if (!lngConveter.decodeValue(encoded, index, lng)) {
if (!lngConverter.decodeValue(encoded, index, lng)) {
throw new IllegalArgumentException("Invalid encoding");
}
if (hasThirdDimension()) {
if (!zConveter.decodeValue(encoded, index, z)) {
if (!zConverter.decodeValue(encoded, index, z)) {
throw new IllegalArgumentException("Invalid encoding");
}
}
Expand Down

0 comments on commit bfc5f52

Please sign in to comment.