• R/O
  • HTTP
  • SSH
  • HTTPS

importpicture: Commit


Commit MetaInfo

Revisión8d91e2a4dceb7cadcb516177a5707c90a759a4a0 (tree)
Tiempo2022-02-11 11:05:40
Autoryuuhayashi <hayashi.yuu@gmai...>
Commiteryuuhayashi

Log Message

fixed : compile warrnings.

Cambiar Resumen

Diferencia incremental

--- a/pom.xml
+++ b/pom.xml
@@ -122,6 +122,13 @@
122122 <type>jar</type>
123123 </dependency>
124124
125+ <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
126+ <dependency>
127+ <groupId>org.apache.maven.plugins</groupId>
128+ <artifactId>maven-surefire-plugin</artifactId>
129+ <version>2.22.2</version>
130+ </dependency>
131+
125132 <!-- for JUnit test -->
126133 <dependency>
127134 <groupId>org.hamcrest</groupId>
@@ -233,16 +240,15 @@
233240 <!-- mvn test -->
234241 <plugin>
235242 <groupId>org.apache.maven.plugins</groupId>
236- <artifactId>maven-surefire-plugin</artifactId>
243+ <artifactId>maven-surefire-plugin</artifactId>
244+ <version>2.22.2</version>
237245 <configuration>
238246 <junitArtifactName>junit:junit</junitArtifactName>
239247 <encoding>UTF-8</encoding>
240- <inputEncoding>UTF-8</inputEncoding>
241- <outputEncoding>UTF-8</outputEncoding>
242248 <argLine>-Dfile.encoding=UTF-8</argLine>
243249 </configuration>
244250 </plugin>
245-
251+
246252 <!-- mvn release:prepare -->
247253 <!-- mvn release:perform -Dmaven.javadoc.skip -->
248254 <plugin>
--- a/src/main/java/osm/jp/gpx/GpxParser.java
+++ b/src/main/java/osm/jp/gpx/GpxParser.java
@@ -78,10 +78,10 @@ public class GpxParser extends DefaultHandler {
7878 for (int i = 0; i < atts.getLength(); i++) {
7979 String aname = atts.getQName(i);
8080 if (aname.equals("lat")) {
81- lat = new Double(atts.getValue(i));
81+ lat = Double.valueOf(atts.getValue(i));
8282 }
8383 if (aname.equals("lon")) {
84- lon = new Double(atts.getValue(i));
84+ lon = Double.valueOf(atts.getValue(i));
8585 }
8686 }
8787
--- 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 @@ package osm.jp.hayashi.tools.log;
22
33 import java.io.FileInputStream;
44 import java.io.IOException;
5-import java.io.InputStream;
6-import java.net.URISyntaxException;
7-import java.nio.file.Files;
8-import java.nio.file.Path;
9-import java.nio.file.Paths;
105 import java.util.logging.FileHandler;
116 import java.util.logging.LogManager;
127 import java.util.logging.Logger;
138
14-import osm.jp.hayashi.tools.files.Directory;
15-
169 /**
1710 * ロギングファイルに動作ログを出力する簡単なモデル
1811 * "log"+日時+".log"ファイルに出力される。
--- a/src/test/java/osm/jp/gpx/ElementMapTRKPTTest.java
+++ b/src/test/java/osm/jp/gpx/ElementMapTRKPTTest.java
@@ -94,7 +94,7 @@ public class ElementMapTRKPTTest {
9494 };
9595
9696 TagTrkpt createElement(String[] values) throws ParseException {
97- TagTrkpt trkpt = new TagTrkpt(new Double(values[1]), new Double(values[2]));
97+ TagTrkpt trkpt = new TagTrkpt(Double.valueOf(values[1]), Double.valueOf(values[2]));
9898 trkpt.setTime(ImportPicture.toUTCDate(values[0]));
9999 if (values[3] != null) {
100100 trkpt.setEle(values[3]);
@@ -147,29 +147,29 @@ public class ElementMapTRKPTTest {
147147 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:18Z"));
148148 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
149149 assertThat(tag.eleStr, is(nullValue()));
150- assertThat(tag.lat, is(new Double(values[0][1])));
151- assertThat(tag.lon, is(new Double(values[0][2])));
152- assertThat(tag.magvarStr, is(nullValue()));
150+ assertThat(tag.lat, is(Double.valueOf(values[0][1])));
151+ assertThat(tag.lon, is(Double.valueOf(values[0][2])));
152+ assertNull(tag.magvarStr);
153153 }
154154
155155 @Test
156156 public void get_19() throws ParseException {
157157 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:19Z"));
158158 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
159- assertThat(tag.eleStr, is(nullValue()));
160- assertThat(tag.lat, is(new Double(values[0][1])));
161- assertThat(tag.lon, is(new Double(values[0][2])));
162- assertThat(tag.magvarStr, is(nullValue()));
159+ assertNull(tag.eleStr);
160+ assertThat(tag.lat, is(Double.valueOf(values[0][1])));
161+ assertThat(tag.lon, is(Double.valueOf(values[0][2])));
162+ assertNull(tag.magvarStr);
163163 }
164164
165165 @Test
166166 public void get_20() throws ParseException {
167167 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:20Z"));
168168 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:18Z"));
169- assertThat(tag.eleStr, is(nullValue()));
170- assertThat(tag.lat, is(new Double(values[0][1])));
171- assertThat(tag.lon, is(new Double(values[0][2])));
172- assertThat(tag.magvarStr, is(nullValue()));
169+ assertNull(tag.eleStr);
170+ assertThat(tag.lat, is(Double.valueOf(values[0][1])));
171+ assertThat(tag.lon, is(Double.valueOf(values[0][2])));
172+ assertNull(tag.magvarStr);
173173 }
174174
175175 @Test
@@ -177,9 +177,9 @@ public class ElementMapTRKPTTest {
177177 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:21Z"));
178178 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:21Z"));
179179 assertThat(tag.eleStr, is("614.90"));
180- assertThat(tag.lat, is(new Double(values[1][1])));
181- assertThat(tag.lon, is(new Double(values[1][2])));
182- assertThat(tag.magvarStr, is(notNullValue()));
180+ assertThat(tag.lat, is(Double.valueOf(values[1][1])));
181+ assertThat(tag.lon, is(Double.valueOf(values[1][2])));
182+ assertNotNull(tag.magvarStr);
183183 }
184184
185185 @Test
@@ -187,9 +187,9 @@ public class ElementMapTRKPTTest {
187187 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:22Z"));
188188 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:21Z"));
189189 assertThat(tag.eleStr, is("614.90"));
190- assertThat(tag.lat, is(new Double(values[1][1])));
191- assertThat(tag.lon, is(new Double(values[1][2])));
192- assertThat(tag.magvarStr, is(notNullValue()));
190+ assertThat(tag.lat, is(Double.valueOf(values[1][1])));
191+ assertThat(tag.lon, is(Double.valueOf(values[1][2])));
192+ assertNotNull(tag.magvarStr);
193193 }
194194
195195 @Test
@@ -197,9 +197,9 @@ public class ElementMapTRKPTTest {
197197 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:23Z"));
198198 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:21Z"));
199199 assertThat(tag.eleStr, is("614.90"));
200- assertThat(tag.lat, is(new Double(values[1][1])));
201- assertThat(tag.lon, is(new Double(values[1][2])));
202- assertThat(tag.magvarStr, is(notNullValue()));
200+ assertThat(tag.lat, is(Double.valueOf(values[1][1])));
201+ assertThat(tag.lon, is(Double.valueOf(values[1][2])));
202+ assertNotNull(tag.magvarStr);
203203 }
204204
205205 @Test
@@ -207,8 +207,8 @@ public class ElementMapTRKPTTest {
207207 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:24Z"));
208208 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:24Z"));
209209 assertThat(tag.eleStr, is("615.00"));
210- assertThat(tag.lat, is(new Double(values[2][1])));
211- assertThat(tag.lon, is(new Double(values[2][2])));
210+ assertThat(tag.lat, is(Double.valueOf(values[2][1])));
211+ assertThat(tag.lon, is(Double.valueOf(values[2][2])));
212212 assertThat(tag.magvarStr, is(notNullValue()));
213213 }
214214
@@ -217,8 +217,8 @@ public class ElementMapTRKPTTest {
217217 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:25Z"));
218218 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:24Z"));
219219 assertThat(tag.eleStr, is("615.00"));
220- assertThat(tag.lat, is(new Double(values[2][1])));
221- assertThat(tag.lon, is(new Double(values[2][2])));
220+ assertThat(tag.lat, is(Double.valueOf(values[2][1])));
221+ assertThat(tag.lon, is(Double.valueOf(values[2][2])));
222222 assertThat(tag.magvarStr, is(notNullValue()));
223223 }
224224
@@ -227,8 +227,8 @@ public class ElementMapTRKPTTest {
227227 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:26Z"));
228228 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:24Z"));
229229 assertThat(tag.eleStr, is("615.00"));
230- assertThat(tag.lat, is(new Double(values[2][1])));
231- assertThat(tag.lon, is(new Double(values[2][2])));
230+ assertThat(tag.lat, is(Double.valueOf(values[2][1])));
231+ assertThat(tag.lon, is(Double.valueOf(values[2][2])));
232232 assertThat(tag.magvarStr, is(notNullValue()));
233233 }
234234
@@ -237,9 +237,9 @@ public class ElementMapTRKPTTest {
237237 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:27Z"));
238238 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:27Z"));
239239 assertThat(tag.eleStr, is("615.03"));
240- assertThat(tag.lat, is(new Double(values[3][1])));
241- assertThat(tag.lon, is(new Double(values[3][2])));
242- assertThat(tag.magvarStr, is(notNullValue()));
240+ assertThat(tag.lat, is(Double.valueOf(values[3][1])));
241+ assertThat(tag.lon, is(Double.valueOf(values[3][2])));
242+ assertNotNull(tag.magvarStr);
243243 }
244244
245245 @Test
@@ -247,8 +247,8 @@ public class ElementMapTRKPTTest {
247247 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:28Z"));
248248 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:27Z"));
249249 assertThat(tag.eleStr, is("615.03"));
250- assertThat(tag.lat, is(new Double(values[3][1])));
251- assertThat(tag.lon, is(new Double(values[3][2])));
250+ assertThat(tag.lat, is(Double.valueOf(values[3][1])));
251+ assertThat(tag.lon, is(Double.valueOf(values[3][2])));
252252 assertThat(tag.magvarStr, is(notNullValue()));
253253 }
254254
@@ -257,8 +257,8 @@ public class ElementMapTRKPTTest {
257257 TagTrkpt tag = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:30Z"));
258258 assertThat(sdf.format(tag.time), is("2017-05-29T10:23:27Z"));
259259 assertThat(tag.eleStr, is("615.03"));
260- assertThat(tag.lat, is(new Double(values[3][1])));
261- assertThat(tag.lon, is(new Double(values[3][2])));
260+ assertThat(tag.lat, is(Double.valueOf(values[3][1])));
261+ assertThat(tag.lon, is(Double.valueOf(values[3][2])));
262262 assertThat(tag.magvarStr, is(notNullValue()));
263263 }
264264
Show on old repository browser