Skip to content

Commit ed8ef10

Browse files
author
Peter
committed
removed several compiler warnings
1 parent 1e107f5 commit ed8ef10

File tree

7 files changed

+7
-32
lines changed

7 files changed

+7
-32
lines changed

core/src/main/java/com/graphhopper/reader/OSMElement.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,4 @@ public int type() {
238238
public boolean isType(int type) {
239239
return this.type == type;
240240
}
241-
242-
/**
243-
* Only for testing
244-
*
245-
* @deprecated
246-
* @param tags
247-
*/
248-
public void setTags(Map<String, String> tags) {
249-
this.tags = tags;
250-
}
251241
}

core/src/test/java/com/graphhopper/reader/OSMReaderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ InputStream getResource(String file) {
159159
try {
160160
osmReader.osm2Graph(new File(getClass().getResource(testFile).toURI()));
161161
} catch (URISyntaxException e) {
162-
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
162+
throw new RuntimeException(e);
163163
}
164-
//osmReader.writeOsm2Graph(getResource(testFile));
165164
return osmReader;
166165
}
167166
};

core/src/test/java/com/graphhopper/routing/util/CarFlagEncoderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public class CarFlagEncoderTest {
3636
@Test
3737
public void testAccess() {
3838
Map<String, String> map = new HashMap<String, String>();
39-
OSMWay way = new OSMWay();
40-
way.setTags(map);
39+
OSMWay way = new OSMWay(1, map);
4140
assertFalse(encoder.isAllowed(way) > 0);
4241
map.put("highway", "service");
4342
assertTrue(encoder.isAllowed(way) > 0);

core/src/test/java/com/graphhopper/routing/util/FootFlagEncoderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ public void testGraph() {
8282
@Test
8383
public void testAccess() {
8484
Map<String, String> map = new HashMap<String, String>();
85-
OSMWay way = new OSMWay();
86-
way.setTags(map);
85+
OSMWay way = new OSMWay(1, map);
8786

8887
map.put("highway", "motorway");
8988
map.put("sidewalk", "yes");

pom.xml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,8 @@
5656
<module>core</module>
5757
<module>tools</module>
5858
<module>web</module>
59+
<!-- we build android on own build server to provide android setup for compiling and packaging the apk -->
5960
</modules>
60-
61-
<!-- does not run on build server yet
62-
call 'mvn install -P with-android' to compile everything including the android module
63-
64-
<profiles>
65-
<profile>
66-
<id>graphhopper-android</id>
67-
<modules>
68-
<module>android</module>
69-
</modules>
70-
</profile>
71-
</profiles>
72-
-->
7361

7462
<build>
7563
<plugins>

web/src/main/java/com/graphhopper/http/GraphHopperServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void writePath(HttpServletRequest req, HttpServletResponse res) throws Exception
128128
putHint("douglas.minprecision", minPathPrecision));
129129
if (rsp.hasError()) {
130130
JSONBuilder builder = new JSONBuilder().startObject("info");
131-
List list = new ArrayList();
131+
List<Map<String, String>> list = new ArrayList<Map<String, String>>();
132132
for (Throwable t : rsp.errors()) {
133133
Map<String, String> map = new HashMap<String, String>();
134134
map.put("message", t.getMessage());

web/src/main/java/com/graphhopper/http/JSONBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public class JSONBuilder {
2929

3030
private String lastObjectName;
3131
private JSONBuilder parent;
32-
private Map map;
32+
private Map<String, Object> map;
3333

3434
public JSONBuilder() {
35-
map = new HashMap(5);
35+
map = new HashMap<String, Object>(5);
3636
}
3737

3838
public JSONBuilder setParent(JSONBuilder p) {

0 commit comments

Comments
 (0)