diff --git a/pom.xml b/pom.xml
index 97be8ed..0b944fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,6 +122,13 @@
jar
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.2
+
+
org.hamcrest
@@ -233,16 +240,15 @@
org.apache.maven.plugins
- maven-surefire-plugin
+ maven-surefire-plugin
+ 2.22.2
junit:junit
UTF-8
- UTF-8
- UTF-8
-Dfile.encoding=UTF-8
-
+
diff --git a/src/main/java/osm/jp/gpx/GpxParser.java b/src/main/java/osm/jp/gpx/GpxParser.java
index ea4c71f..228e686 100644
--- a/src/main/java/osm/jp/gpx/GpxParser.java
+++ b/src/main/java/osm/jp/gpx/GpxParser.java
@@ -78,10 +78,10 @@
for (int i = 0; i < atts.getLength(); i++) {
String aname = atts.getQName(i);
if (aname.equals("lat")) {
- lat = new Double(atts.getValue(i));
+ lat = Double.valueOf(atts.getValue(i));
}
if (aname.equals("lon")) {
- lon = new Double(atts.getValue(i));
+ lon = Double.valueOf(atts.getValue(i));
}
}
diff --git a/src/main/java/osm/jp/hayashi/tools/log/LoggerFactory.java b/src/main/java/osm/jp/hayashi/tools/log/LoggerFactory.java
index ac57164..6574677 100755
--- a/src/main/java/osm/jp/hayashi/tools/log/LoggerFactory.java
+++ b/src/main/java/osm/jp/hayashi/tools/log/LoggerFactory.java
@@ -2,17 +2,10 @@
import java.io.FileInputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.logging.FileHandler;
import java.util.logging.LogManager;
import java.util.logging.Logger;
-import osm.jp.hayashi.tools.files.Directory;
-
/**
* ロギングファイルに動作ログを出力する簡単なモデル
* "log"+日時+".log"ファイルに出力される。
diff --git a/src/test/java/osm/jp/gpx/ElementMapTRKPTTest.java b/src/test/java/osm/jp/gpx/ElementMapTRKPTTest.java
index 6820b27..92a3f01 100644
--- a/src/test/java/osm/jp/gpx/ElementMapTRKPTTest.java
+++ b/src/test/java/osm/jp/gpx/ElementMapTRKPTTest.java
@@ -94,7 +94,7 @@
};
TagTrkpt createElement(String[] values) throws ParseException {
- TagTrkpt trkpt = new TagTrkpt(new Double(values[1]), new Double(values[2]));
+ TagTrkpt trkpt = new TagTrkpt(Double.valueOf(values[1]), Double.valueOf(values[2]));
trkpt.setTime(ImportPicture.toUTCDate(values[0]));
if (values[3] != null) {
trkpt.setEle(values[3]);
@@ -147,29 +147,29 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:18Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
assertThat(tag.eleStr, is(nullValue()));
- assertThat(tag.lat, is(new Double(values[0][1])));
- assertThat(tag.lon, is(new Double(values[0][2])));
- assertThat(tag.magvarStr, is(nullValue()));
+ assertThat(tag.lat, is(Double.valueOf(values[0][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[0][2])));
+ assertNull(tag.magvarStr);
}
@Test
public void get_19() throws ParseException {
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:19Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
- assertThat(tag.eleStr, is(nullValue()));
- assertThat(tag.lat, is(new Double(values[0][1])));
- assertThat(tag.lon, is(new Double(values[0][2])));
- assertThat(tag.magvarStr, is(nullValue()));
+ assertNull(tag.eleStr);
+ assertThat(tag.lat, is(Double.valueOf(values[0][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[0][2])));
+ assertNull(tag.magvarStr);
}
@Test
public void get_20() throws ParseException {
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:20Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
- assertThat(tag.eleStr, is(nullValue()));
- assertThat(tag.lat, is(new Double(values[0][1])));
- assertThat(tag.lon, is(new Double(values[0][2])));
- assertThat(tag.magvarStr, is(nullValue()));
+ assertNull(tag.eleStr);
+ assertThat(tag.lat, is(Double.valueOf(values[0][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[0][2])));
+ assertNull(tag.magvarStr);
}
@Test
@@ -177,9 +177,9 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:21Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:21Z"));
assertThat(tag.eleStr, is("614.90"));
- assertThat(tag.lat, is(new Double(values[1][1])));
- assertThat(tag.lon, is(new Double(values[1][2])));
- assertThat(tag.magvarStr, is(notNullValue()));
+ assertThat(tag.lat, is(Double.valueOf(values[1][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[1][2])));
+ assertNotNull(tag.magvarStr);
}
@Test
@@ -187,9 +187,9 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:22Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:21Z"));
assertThat(tag.eleStr, is("614.90"));
- assertThat(tag.lat, is(new Double(values[1][1])));
- assertThat(tag.lon, is(new Double(values[1][2])));
- assertThat(tag.magvarStr, is(notNullValue()));
+ assertThat(tag.lat, is(Double.valueOf(values[1][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[1][2])));
+ assertNotNull(tag.magvarStr);
}
@Test
@@ -197,9 +197,9 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:23Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:21Z"));
assertThat(tag.eleStr, is("614.90"));
- assertThat(tag.lat, is(new Double(values[1][1])));
- assertThat(tag.lon, is(new Double(values[1][2])));
- assertThat(tag.magvarStr, is(notNullValue()));
+ assertThat(tag.lat, is(Double.valueOf(values[1][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[1][2])));
+ assertNotNull(tag.magvarStr);
}
@Test
@@ -207,8 +207,8 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:24Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:24Z"));
assertThat(tag.eleStr, is("615.00"));
- assertThat(tag.lat, is(new Double(values[2][1])));
- assertThat(tag.lon, is(new Double(values[2][2])));
+ assertThat(tag.lat, is(Double.valueOf(values[2][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[2][2])));
assertThat(tag.magvarStr, is(notNullValue()));
}
@@ -217,8 +217,8 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:25Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:24Z"));
assertThat(tag.eleStr, is("615.00"));
- assertThat(tag.lat, is(new Double(values[2][1])));
- assertThat(tag.lon, is(new Double(values[2][2])));
+ assertThat(tag.lat, is(Double.valueOf(values[2][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[2][2])));
assertThat(tag.magvarStr, is(notNullValue()));
}
@@ -227,8 +227,8 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:26Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:24Z"));
assertThat(tag.eleStr, is("615.00"));
- assertThat(tag.lat, is(new Double(values[2][1])));
- assertThat(tag.lon, is(new Double(values[2][2])));
+ assertThat(tag.lat, is(Double.valueOf(values[2][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[2][2])));
assertThat(tag.magvarStr, is(notNullValue()));
}
@@ -237,9 +237,9 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:27Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:27Z"));
assertThat(tag.eleStr, is("615.03"));
- assertThat(tag.lat, is(new Double(values[3][1])));
- assertThat(tag.lon, is(new Double(values[3][2])));
- assertThat(tag.magvarStr, is(notNullValue()));
+ assertThat(tag.lat, is(Double.valueOf(values[3][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[3][2])));
+ assertNotNull(tag.magvarStr);
}
@Test
@@ -247,8 +247,8 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:28Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:27Z"));
assertThat(tag.eleStr, is("615.03"));
- assertThat(tag.lat, is(new Double(values[3][1])));
- assertThat(tag.lon, is(new Double(values[3][2])));
+ assertThat(tag.lat, is(Double.valueOf(values[3][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[3][2])));
assertThat(tag.magvarStr, is(notNullValue()));
}
@@ -257,8 +257,8 @@
TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:30Z"));
assertThat(sdf.format(tag.time), is("2017-05-29T10:23:27Z"));
assertThat(tag.eleStr, is("615.03"));
- assertThat(tag.lat, is(new Double(values[3][1])));
- assertThat(tag.lon, is(new Double(values[3][2])));
+ assertThat(tag.lat, is(Double.valueOf(values[3][1])));
+ assertThat(tag.lon, is(Double.valueOf(values[3][2])));
assertThat(tag.magvarStr, is(notNullValue()));
}