Skip to content

Commit c99901b

Browse files
committed
Cleaned up source and bumped version of Mapcode to 1.33.2
1 parent 9f833f3 commit c99901b

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<url>http://mapcode.com</url>
2323

2424
<properties>
25-
<mapcode.version>1.33.1</mapcode.version>
25+
<mapcode.version>1.33.2</mapcode.version>
2626
<log4j.version>1.2.17</log4j.version>
2727
<slf4j.version>1.7.2</slf4j.version>
2828
</properties>

src/main/java/com/mapcode/example/Example.java

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package com.mapcode.example;
1818

19-
import java.util.List;
20-
2119
import com.mapcode.Mapcode;
2220
import com.mapcode.MapcodeInfo;
2321
import com.mapcode.ParentTerritory;
@@ -26,6 +24,8 @@
2624
import com.mapcode.UnknownMapcodeException;
2725
import com.mapcode.UnknownTerritoryException;
2826

27+
import java.util.List;
28+
2929
/**
3030
* This class serves as an example of how to use the Mapcode Java library.
3131
*/
@@ -71,9 +71,9 @@ private static void exampleDecode() throws UnknownTerritoryException {
7171
final String mapcode2 = "NLD 49.4V";
7272
try {
7373
final Point p = Mapcode.decode(mapcode2);
74-
System.out.println("Mapcode " + mapcode2 + " in territory "
75-
+ territory + " represents latitude " + p.getLatDeg()
76-
+ ", longitude " + p.getLonDeg());
74+
System.out.println("Mapcode " + mapcode2 + " in territory "
75+
+ territory + " represents latitude " + p.getLatDeg()
76+
+ ", longitude " + p.getLonDeg());
7777
}
7878
catch (final UnknownMapcodeException ignored) {
7979
System.out.println("This should never happen in this example as the Mapcode is valid.");
@@ -109,19 +109,20 @@ private static void exampleDecode() throws UnknownTerritoryException {
109109
System.out.println("This should never happen in this example as the Mapcode is valid.");
110110
}
111111

112-
/**
113-
* The fifth example tries to decode a valid Mapcode that contains
114-
* Unicode characters. This will succeed.
115-
*/
116-
final String mapcode5 = "JPN チナ.8チ";
117-
try {
118-
final Point p = Mapcode.decode(mapcode5);
119-
System.out.println("Mapcode " + mapcode5 + " represents latitude "
120-
+ p.getLatDeg() + ", longitude " + p.getLonDeg());
121-
} catch (final UnknownMapcodeException ignored) {
122-
System.out
123-
.println("This should never happen in this example as the Mapcode is valid.");
124-
}
112+
/**
113+
* The fifth example tries to decode a valid Mapcode that contains
114+
* Unicode characters. This will succeed.
115+
*/
116+
final String mapcode5 = "JPN チナ.8チ";
117+
try {
118+
final Point p = Mapcode.decode(mapcode5);
119+
System.out.println("Mapcode " + mapcode5 + " represents latitude "
120+
+ p.getLatDeg() + ", longitude " + p.getLonDeg());
121+
}
122+
catch (final UnknownMapcodeException ignored) {
123+
System.out
124+
.println("This should never happen in this example as the Mapcode is valid.");
125+
}
125126

126127
System.out.println("");
127128
}

0 commit comments

Comments
 (0)