Changeset 16629 in josm
- Timestamp:
- 2020-06-14T17:17:02+02:00 (4 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build.xml
r16628 r16629 302 302 <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 --> 303 303 <compilerarg value="-XDignore.symbol.file"/> 304 <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep: JavaTimeDefaultTimeZone:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/>304 <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/> 305 305 <compilerarg line="-Xmaxwarns 1000"/> 306 306 <classpath> -
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r16509 r16629 98 98 try { 99 99 if (info.getUrl() != null && info.getUrl().contains("{time}")) { 100 final String instant = Year.now( ).atDay(1).atStartOfDay(ZoneOffset.UTC).toInstant().toString();100 final String instant = Year.now(ZoneOffset.UTC).atDay(1).atStartOfDay(ZoneOffset.UTC).toInstant().toString(); 101 101 final String example = String.join("/", instant, instant); 102 102 final String initialSelectionValue = info.getDate() != null ? info.getDate() : example; -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/DateValidator.java
r13849 r16629 5 5 6 6 import java.time.LocalDate; 7 import java.time.ZoneId; 7 8 import java.time.ZonedDateTime; 8 9 import java.time.format.DateTimeFormatter; … … 59 60 */ 60 61 public String getStandardTooltipText() { 61 final ZonedDateTime now = ZonedDateTime.now( );62 final ZonedDateTime now = ZonedDateTime.now(ZoneId.systemDefault()); 62 63 return tr( 63 64 "Please enter a date in the usual format for your locale.<br>" -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/TimeValidator.java
r13849 r16629 5 5 6 6 import java.time.LocalTime; 7 import java.time.ZoneId; 7 8 import java.time.ZonedDateTime; 8 9 import java.time.format.DateTimeFormatter; … … 61 62 */ 62 63 public String getStandardTooltipText() { 63 final ZonedDateTime now = ZonedDateTime.now( );64 final ZonedDateTime now = ZonedDateTime.now(ZoneId.systemDefault()); 64 65 return tr( 65 66 "Please enter a valid time in the usual format for your locale.<br>" -
trunk/src/org/openstreetmap/josm/gui/download/UserQueryList.java
r16488 r16629 15 15 import java.awt.event.MouseEvent; 16 16 import java.time.LocalDateTime; 17 import java.time.ZoneId; 17 18 import java.time.format.DateTimeFormatter; 18 19 import java.time.format.DateTimeParseException; … … 136 137 if (!historicExist) { 137 138 SelectorItem item = new SelectorItem( 138 TRANSLATED_HISTORY + " " + LocalDateTime.now( ).format(FORMAT), query);139 TRANSLATED_HISTORY + " " + LocalDateTime.now(ZoneId.systemDefault()).format(FORMAT), query); 139 140 140 141 this.items.put(item.getKey(), item); … … 540 541 this.query.getText(), 541 542 !newKey.equals(itemKey) || !newQuery.equals(itemQuery) 542 ? LocalDateTime.now( )543 ? LocalDateTime.now(ZoneId.systemDefault()) 543 544 : this.itemToEdit.getLastEdit())); 544 545 … … 571 572 */ 572 573 public SelectorItem(String key, String query) { 573 this(key, query, LocalDateTime.now( ));574 this(key, query, LocalDateTime.now(ZoneId.systemDefault())); 574 575 } 575 576 -
trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java
r15497 r16629 13 13 import java.text.MessageFormat; 14 14 import java.time.Year; 15 import java.time.ZoneId; 15 16 import java.util.Optional; 16 17 … … 291 292 if (copyrightYear.getText().isEmpty()) { 292 293 copyrightYear.setText(Optional.ofNullable(data.getString(META_COPYRIGHT_YEAR)).orElseGet( 293 () -> Year.now( ).toString()));294 () -> Year.now(ZoneId.systemDefault()).toString())); 294 295 } 295 296 if (copyright.getText().isEmpty()) { -
trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
r15447 r16629 10 10 import java.time.LocalDateTime; 11 11 import java.time.Period; 12 import java.time.ZoneId; 12 13 import java.time.ZoneOffset; 13 14 import java.util.Arrays; … … 205 206 switch (matcher.group(1)) { 206 207 case "date": 207 matcher.appendReplacement(sb, date(matcher.group(2), LocalDateTime.now( )));208 matcher.appendReplacement(sb, date(matcher.group(2), LocalDateTime.now(ZoneId.systemDefault()))); 208 209 break; 209 210 case "geocodeArea":
Note:
See TracChangeset
for help on using the changeset viewer.