[josm] 01/05: Imported Upstream version 0.0.svn9979+dfsg
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sun Mar 13 18:09:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository josm.
commit 442eaab96358b7d3d5e686ac36c6cdd6b2a821bd
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sun Mar 13 18:56:42 2016 +0100
Imported Upstream version 0.0.svn9979+dfsg
---
REVISION | 10 +-
data/mappaint-style.xsd | 129 -------
i18n/po/af.po | 2 +-
i18n/po/am.po | 2 +-
i18n/po/ar.po | 2 +-
i18n/po/ast.po | 2 +-
i18n/po/az.po | 2 +-
i18n/po/be.po | 2 +-
i18n/po/bg.po | 2 +-
i18n/po/bn.po | 2 +-
i18n/po/br.po | 2 +-
i18n/po/bs.po | 2 +-
i18n/po/ca.po | 2 +-
i18n/po/ca at valencia.po | 2 +-
i18n/po/cs.po | 2 +-
i18n/po/cy.po | 2 +-
i18n/po/da.po | 13 +-
i18n/po/de.po | 28 +-
i18n/po/de_DE.po | 2 +-
i18n/po/el.po | 2 +-
i18n/po/en_AU.po | 2 +-
i18n/po/en_CA.po | 2 +-
i18n/po/en_GB.po | 22 +-
i18n/po/eo.po | 2 +-
i18n/po/es.po | 2 +-
i18n/po/et.po | 2 +-
i18n/po/eu.po | 2 +-
i18n/po/fa.po | 2 +-
i18n/po/fi.po | 2 +-
i18n/po/fil.po | 2 +-
i18n/po/fo.po | 2 +-
i18n/po/fr.po | 2 +-
i18n/po/ga.po | 2 +-
i18n/po/gl.po | 2 +-
i18n/po/he.po | 2 +-
i18n/po/hi.po | 2 +-
i18n/po/hr.po | 2 +-
i18n/po/ht.po | 2 +-
i18n/po/hu.po | 2 +-
i18n/po/hy.po | 2 +-
i18n/po/ia.po | 2 +-
i18n/po/id.po | 2 +-
i18n/po/is.po | 2 +-
i18n/po/it.po | 2 +-
i18n/po/ja.po | 2 +-
i18n/po/ka.po | 2 +-
i18n/po/km.po | 2 +-
i18n/po/ko.po | 2 +-
i18n/po/ky.po | 2 +-
i18n/po/lo.po | 2 +-
i18n/po/lt.po | 98 +++++-
i18n/po/lv.po | 2 +-
i18n/po/mk.po | 2 +-
i18n/po/mr.po | 2 +-
i18n/po/ms.po | 2 +-
i18n/po/nb.po | 2 +-
i18n/po/nds.po | 2 +-
i18n/po/nl.po | 2 +-
i18n/po/nn.po | 2 +-
i18n/po/oc.po | 2 +-
i18n/po/pa.po | 2 +-
i18n/po/pl.po | 2 +-
i18n/po/pt.po | 2 +-
i18n/po/pt_BR.po | 2 +-
i18n/po/rm.po | 2 +-
i18n/po/ro.po | 2 +-
i18n/po/ru.po | 7 +-
i18n/po/sk.po | 8 +-
i18n/po/sl.po | 2 +-
i18n/po/sq.po | 2 +-
i18n/po/sr.po | 2 +-
i18n/po/sv.po | 2 +-
i18n/po/ta.po | 2 +-
i18n/po/te.po | 2 +-
i18n/po/th.po | 2 +-
i18n/po/tr.po | 2 +-
i18n/po/ug.po | 2 +-
i18n/po/uk.po | 2 +-
i18n/po/ur.po | 2 +-
i18n/po/vi.po | 2 +-
i18n/po/wae.po | 2 +-
i18n/po/zh_CN.po | 2 +-
i18n/po/zh_TW.po | 2 +-
.../josm/actions/CreateCircleAction.java | 2 +-
.../josm/actions/ExtensionFileFilter.java | 2 +-
.../josm/actions/MergeNodesAction.java | 2 +-
.../openstreetmap/josm/actions/OpenFileAction.java | 5 +-
.../josm/actions/OpenLocationAction.java | 3 +-
.../josm/actions/PasteTagsAction.java | 6 +-
.../josm/actions/SimplifyWayAction.java | 5 +-
.../openstreetmap/josm/actions/SplitWayAction.java | 18 +-
.../openstreetmap/josm/actions/UnGlueAction.java | 2 +-
.../openstreetmap/josm/actions/UploadAction.java | 3 +-
.../josm/actions/mapmode/DrawAction.java | 4 +-
.../josm/actions/mapmode/ModifiersSpec.java | 6 +-
.../josm/actions/mapmode/SelectAction.java | 4 +-
.../actions/relation/AbstractRelationAction.java | 1 +
.../actions/relation/AddSelectionToRelations.java | 2 +-
.../openstreetmap/josm/command/DeleteCommand.java | 1 +
.../openstreetmap/josm/corrector/TagCorrector.java | 6 +-
src/org/openstreetmap/josm/data/Preferences.java | 55 ++-
.../CachedAttributionBingAerialTileSource.java | 2 +-
.../josm/data/imagery/ImageryInfo.java | 6 +-
.../josm/data/imagery/ImageryLayerInfo.java | 8 +-
.../josm/data/oauth/SignpostAdapters.java | 6 +-
src/org/openstreetmap/josm/data/osm/BBox.java | 16 +-
src/org/openstreetmap/josm/data/osm/Node.java | 4 +-
.../openstreetmap/josm/data/osm/OsmPrimitive.java | 4 +-
src/org/openstreetmap/josm/data/osm/Relation.java | 4 +-
src/org/openstreetmap/josm/data/osm/Storage.java | 6 +-
src/org/openstreetmap/josm/data/osm/TagMap.java | 8 +-
src/org/openstreetmap/josm/data/osm/Way.java | 4 +-
.../data/osm/visitor/paint/StyledMapRenderer.java | 2 +-
.../josm/data/preferences/PreferencesReader.java | 2 +-
.../josm/data/projection/proj/AlbersEqualArea.java | 6 +-
.../data/projection/proj/DoubleStereographic.java | 14 +-
.../projection/proj/LambertAzimuthalEqualArea.java | 14 +-
.../josm/data/projection/proj/ObliqueMercator.java | 122 +++----
.../data/projection/proj/PolarStereographic.java | 2 +-
.../data/projection/proj/TransverseMercator.java | 4 +-
.../data/validation/routines/DomainValidator.java | 2 +-
.../josm/data/validation/tests/DuplicateNode.java | 1 +
.../josm/data/validation/util/Entities.java | 2 +-
.../josm/gui/HelpAwareOptionPane.java | 2 +-
src/org/openstreetmap/josm/gui/MapStatus.java | 2 +-
.../josm/gui/NavigatableComponent.java | 8 +-
.../gui/datatransfer/PrimitiveTransferable.java | 8 +-
.../datatransfer/RelationMemberTransferable.java | 10 +-
.../josm/gui/dialogs/FilterDialog.java | 4 +-
.../josm/gui/dialogs/InspectPrimitiveDialog.java | 7 +-
.../josm/gui/dialogs/LayerListDialog.java | 2 +-
.../josm/gui/dialogs/OsmIdSelectionDialog.java | 2 +-
.../gui/dialogs/properties/PropertiesDialog.java | 4 +-
.../relation/sort/WayConnectionTypeCalculator.java | 2 +-
.../josm/gui/download/PlaceSelection.java | 2 +-
.../openstreetmap/josm/gui/help/HelpBrowser.java | 9 +-
.../josm/gui/history/CoordinateInfoViewer.java | 2 +-
.../josm/gui/layer/AbstractTileSourceLayer.java | 2 +-
src/org/openstreetmap/josm/gui/layer/Layer.java | 2 +-
.../openstreetmap/josm/gui/layer/OsmDataLayer.java | 2 +-
.../josm/gui/mappaint/MapPaintStyles.java | 71 ++--
.../josm/gui/mappaint/StyleCache.java | 2 +-
.../josm/gui/mappaint/StyleSetting.java | 2 +-
.../josm/gui/mappaint/xml/AreaPrototype.java | 30 --
.../josm/gui/mappaint/xml/IconPrototype.java | 33 --
.../josm/gui/mappaint/xml/LinePrototype.java | 90 -----
.../josm/gui/mappaint/xml/LinemodPrototype.java | 68 ----
.../josm/gui/mappaint/xml/Prototype.java | 60 ----
.../josm/gui/mappaint/xml/XmlCondition.java | 50 ---
.../josm/gui/mappaint/xml/XmlStyleSource.java | 381 ---------------------
.../gui/mappaint/xml/XmlStyleSourceHandler.java | 309 -----------------
.../josm/gui/mappaint/xml/package-info.java | 7 -
.../josm/gui/preferences/SourceEditor.java | 10 +-
.../preferences/imagery/CacheContentsPanel.java | 3 +-
.../josm/gui/tagging/presets/TaggingPreset.java | 2 +-
.../josm/gui/tagging/presets/items/Text.java | 4 +-
.../gui/widgets/CompileSearchTextDecorator.java | 2 +-
.../josm/gui/widgets/FileChooserManager.java | 10 +-
.../josm/gui/widgets/MultiSplitLayout.java | 14 +-
.../josm/gui/widgets/MultiSplitPane.java | 2 +-
.../josm/gui/widgets/QuadStateCheckBox.java | 2 +-
src/org/openstreetmap/josm/io/CachedFile.java | 4 +-
src/org/openstreetmap/josm/io/OsmWriter.java | 2 +-
.../josm/io/imagery/ImageryReader.java | 4 +-
.../openstreetmap/josm/plugins/PluginHandler.java | 9 +-
src/org/openstreetmap/josm/tools/ExifReader.java | 2 +-
src/org/openstreetmap/josm/tools/HttpClient.java | 4 +-
src/org/openstreetmap/josm/tools/Utils.java | 1 +
.../josm/actions/PasteTagsActionTest.java | 55 +++
.../josm/actions/SplitWayActionTest.java | 38 +-
.../data/cache/JCSCachedTileLoaderJobTest.java | 22 +-
.../josm/data/imagery/WMTSTileSourceTest.java | 20 +-
.../josm/data/osm/DataSetMergerTest.java | 40 +++
.../openstreetmap/josm/data/osm/TagMapTest.java | 22 ++
.../validation/routines/DomainValidatorTest.java | 30 --
.../validation/routines/RegexValidatorTest.java | 49 +--
.../data/validation/routines/UrlValidatorTest.java | 8 -
.../pair/properties/PropertiesMergeModelTest.java | 12 +-
.../josm/gui/preferences/PreferencesTestUtils.java | 9 +-
.../advanced/AdvancedPreferenceTest.java | 2 +-
.../gui/preferences/audio/AudioPreferenceTest.java | 2 +-
.../preferences/display/ColorPreferenceTest.java | 2 +-
.../preferences/display/DisplayPreferenceTest.java | 2 +-
.../preferences/display/DrawingPreferenceTest.java | 2 +-
.../gui/preferences/display/LafPreferenceTest.java | 2 +-
.../display/LanguagePreferenceTest.java | 2 +-
.../preferences/imagery/ImageryPreferenceTest.java | 2 +-
.../gui/preferences/map/BackupPreferenceTest.java | 2 +-
.../preferences/map/MapPaintPreferenceTest.java | 2 +-
.../gui/preferences/map/MapPreferenceTest.java | 2 +-
.../map/TaggingPresetPreferenceTest.java | 2 +-
.../preferences/plugin/PluginPreferenceTest.java | 2 +-
.../projection/ProjectionPreferenceTest.java | 2 +-
.../remotecontrol/RemoteControlPreferenceTest.java | 2 +-
.../server/AuthenticationPreferenceTest.java | 2 +-
.../server/OverpassServerPreferenceTest.java | 2 +-
.../preferences/server/ProxyPreferenceTest.java | 2 +-
.../server/ServerAccessPreferenceTest.java | 2 +-
.../shortcut/ShortcutPreferenceTest.java | 2 +-
.../validator/ValidatorPreferenceTest.java | 2 +-
.../validator/ValidatorTestsPreferenceTest.java | 2 +-
.../openstreetmap/josm/tools/AudioPlayerTest.java | 4 +-
202 files changed, 739 insertions(+), 1693 deletions(-)
diff --git a/REVISION b/REVISION
index 27efa98..1c65fef 100644
--- a/REVISION
+++ b/REVISION
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
- revision="9963"
- kind="dir"
- path="trunk">
+ path="trunk"
+ revision="9979"
+ kind="dir">
<url>https://josm.openstreetmap.de/svn/trunk</url>
<relative-url>^/trunk</relative-url>
<repository>
@@ -11,9 +11,9 @@
<uuid>0c6e7542-c601-0410-84e7-c038aed88b3b</uuid>
</repository>
<commit
- revision="9963">
+ revision="9979">
<author>Don-vip</author>
-<date>2016-03-11T20:05:43.624013Z</date>
+<date>2016-03-13T00:17:21.257948Z</date>
</commit>
</entry>
</info>
diff --git a/data/mappaint-style.xsd b/data/mappaint-style.xsd
deleted file mode 100644
index 7a97f74..0000000
--- a/data/mappaint-style.xsd
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/mappaint-style-1.0"
- xmlns:tns="http://josm.openstreetmap.de/mappaint-style-1.0" elementFormDefault="qualified">
-
- <!--
- Localized attributes (for example de.description are not supported by
- xsd, so root element needs <anyAttribute/>
- -->
-
- <element name="rules" type="tns:root"/>
-
- <complexType name="root">
- <sequence>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="rule" type="tns:rule" />
- </choice>
- </sequence>
- <attribute name="name" type="string" />
- <attribute name="author" type="string" />
- <attribute name="version" type="string" />
- <attribute name="shortdescription" type="string" />
- <attribute name="description" type="string" />
- <attribute name="link" type="string"/>
- <attribute name="icon" type="string"/>
-
- <anyAttribute processContents="skip"/>
- </complexType>
-
- <!-- TODO: ensure that at least one of results exists, but only one of each element, except for linemod which may have more,
- scale is totally optional, but each of the two may come only once -->
- <complexType name="rule">
- <sequence>
- <element name="condition" type="tns:condition" minOccurs="1" maxOccurs="unbounded" />
- <choice minOccurs="1" maxOccurs="unbounded" >
- <group ref="tns:results" />
- <group ref="tns:scale" />
- </choice>
- </sequence>
- </complexType>
-
- <group name="results">
- <choice>
- <element name="icon" type="tns:icon" />
- <element name="area" type="tns:area" />
- <element name="line" type="tns:line" />
- <element name="linemod" type="tns:linemod" maxOccurs="unbounded" />
- </choice>
- </group>
-
- <group name="scale">
- <choice>
- <element name="scale_min" type="integer" />
- <element name="scale_max" type="integer" />
- </choice>
- </group>
-
- <complexType name="condition">
- <!-- TODO restrict to k, k+v or k+b, other attribute combinations are illegal -->
- <attribute name="k" type="string" use="required" />
- <attribute name="v" type="string" />
- <attribute name="b" type="tns:yesno" />
- </complexType>
-
- <complexType name="icon">
- <attribute name="src" type="string" use="required" />
- <attribute name="annotate" type="boolean" />
- <attribute name="priority" type="integer" />
- </complexType>
-
- <complexType name="line">
- <attribute name="width" type="integer" />
- <attribute name="dashed" type="tns:dashed" />
- <attribute name="realwidth" type="integer" />
- <attribute name="colour" type="tns:color" />
- <attribute name="dashedcolour" type="tns:color" />
- <attribute name="priority" type="integer" />
- </complexType>
-
- <complexType name="area">
- <attribute name="colour" type="tns:color" />
- <attribute name="closed" type="boolean" />
- <attribute name="priority" type="integer" />
- </complexType>
-
- <complexType name="linemod">
- <attribute name="dashed" type="tns:dashed" />
- <attribute name="realwidth" type="integer" />
- <attribute name="colour" type="tns:color" />
- <attribute name="dashedcolour" type="tns:color" />
- <attribute name="mode" type="tns:modifier_mode" use="required" />
- <attribute name="width" type="tns:width" />
- </complexType>
-
- <simpleType name="yesno">
- <restriction base="string">
- <enumeration value="yes"/>
- <enumeration value="no"/>
- </restriction>
- </simpleType>
-
- <simpleType name="dashed">
- <restriction base="string">
- <pattern value="\d+(,\d+)*"/>
- <pattern value="(true|false)"/>
- </restriction>
- </simpleType>
-
- <simpleType name="modifier_mode">
- <restriction base="string">
- <enumeration value="under"/>
- <enumeration value="over"/>
- </restriction>
- </simpleType>
-
- <simpleType name="color">
- <restriction base="string">
- <pattern value="([a-z0-9_]+#)?[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?"/>
- <!-- name#color or color only, where color is 6 or 8 hex digits -->
- </restriction>
- </simpleType>
-
- <simpleType name="width">
- <restriction base="string">
- <pattern value="\d+"/>
- <pattern value="[+-]\d+"/>
- <pattern value="\d+%"/>
- </restriction>
- </simpleType>
-</schema>
diff --git a/i18n/po/af.po b/i18n/po/af.po
index 503d510..e260556 100644
--- a/i18n/po/af.po
+++ b/i18n/po/af.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:31+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:31+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: af\n"
diff --git a/i18n/po/am.po b/i18n/po/am.po
index 7e7b8a0..685db40 100644
--- a/i18n/po/am.po
+++ b/i18n/po/am.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:32+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:32+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: am\n"
diff --git a/i18n/po/ar.po b/i18n/po/ar.po
index a68a4af..0663f38 100644
--- a/i18n/po/ar.po
+++ b/i18n/po/ar.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n % 100 >= "
"3 && n % 100 <= 10 ? 3 : n % 100 >= 11 && n % 100 <= 99 ? 4 : 5;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:32+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:32+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ar\n"
diff --git a/i18n/po/ast.po b/i18n/po/ast.po
index edc1f43..5e9ee2a 100644
--- a/i18n/po/ast.po
+++ b/i18n/po/ast.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:34+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:34+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ast\n"
diff --git a/i18n/po/az.po b/i18n/po/az.po
index 8425a52..27cebae 100644
--- a/i18n/po/az.po
+++ b/i18n/po/az.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:34+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:34+0000\n"
"X-Generator: Launchpad (build 17939)\n"
msgid "{0}: option ''{1}'' is ambiguous"
diff --git a/i18n/po/be.po b/i18n/po/be.po
index cc1b264..e137391 100644
--- a/i18n/po/be.po
+++ b/i18n/po/be.po
@@ -19,7 +19,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:35+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:35+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: be\n"
diff --git a/i18n/po/bg.po b/i18n/po/bg.po
index 7a02860..a89a25b 100644
--- a/i18n/po/bg.po
+++ b/i18n/po/bg.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:37+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:37+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: bg\n"
diff --git a/i18n/po/bn.po b/i18n/po/bn.po
index 30191d5..f926057 100644
--- a/i18n/po/bn.po
+++ b/i18n/po/bn.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:36+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:36+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: bn\n"
diff --git a/i18n/po/br.po b/i18n/po/br.po
index f473f12..8773ec5 100644
--- a/i18n/po/br.po
+++ b/i18n/po/br.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:37+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:37+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: br\n"
diff --git a/i18n/po/bs.po b/i18n/po/bs.po
index cffd6b7..eeadea6 100644
--- a/i18n/po/bs.po
+++ b/i18n/po/bs.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:36+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:36+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: bs\n"
diff --git a/i18n/po/ca.po b/i18n/po/ca.po
index 6900847..67049bf 100644
--- a/i18n/po/ca.po
+++ b/i18n/po/ca.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:38+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:38+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ca\n"
diff --git a/i18n/po/ca at valencia.po b/i18n/po/ca at valencia.po
index c1076e4..22f9518 100644
--- a/i18n/po/ca at valencia.po
+++ b/i18n/po/ca at valencia.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:17+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:15+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ca at valencia\n"
diff --git a/i18n/po/cs.po b/i18n/po/cs.po
index 73cc8d8..77650ca 100644
--- a/i18n/po/cs.po
+++ b/i18n/po/cs.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:39+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:39+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: cs\n"
diff --git a/i18n/po/cy.po b/i18n/po/cy.po
index c746fd5..1bfde5e 100644
--- a/i18n/po/cy.po
+++ b/i18n/po/cy.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=n==1 ? 0 : n==2 ? 1 : (n != 8 && n != 11) ? "
"2 : 3;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:12+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:10+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: cy\n"
diff --git a/i18n/po/da.po b/i18n/po/da.po
index 3b7575c..9a2ce91 100644
--- a/i18n/po/da.po
+++ b/i18n/po/da.po
@@ -9,14 +9,14 @@ msgstr ""
"Project-Id-Version: josm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 03:47+0100\n"
-"PO-Revision-Date: 2016-03-11 20:51+0000\n"
+"PO-Revision-Date: 2016-03-12 08:44+0000\n"
"Last-Translator: Jørn <joern.map at gmail.com>\n"
"Language-Team: Dansk <kde-i18n-doc at kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:39+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:39+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: da_DK\n"
"X-Poedit-SourceCharset: utf-8\n"
@@ -10557,6 +10557,9 @@ msgid ""
"JOSM does no longer support mappaint styles written in the old XML format.\n"
"Please update ''{0}'' to MapCSS"
msgstr ""
+"JOSM understøtter ikke længere korttegningsstile skrevet i det gamle XML-"
+"format.\n"
+"Opdater ''{0}'' til MapCSS"
msgid "loading style ''{0}''..."
msgstr "indlæser stilart \"{0}''..."
@@ -28789,13 +28792,13 @@ msgid "Opens up a wizard to create a concourse"
msgstr ""
msgid "Vertical layer:"
-msgstr ""
+msgstr "Lodret lag:"
msgid "Structure type:"
-msgstr ""
+msgstr "Strukturtype:"
msgid "Offset into background:"
-msgstr ""
+msgstr "Forskydning i baggrund:"
msgid "InfoMode"
msgstr "Infotilstand"
diff --git a/i18n/po/de.po b/i18n/po/de.po
index 8eb8199..f531d32 100644
--- a/i18n/po/de.po
+++ b/i18n/po/de.po
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 03:47+0100\n"
-"PO-Revision-Date: 2016-03-09 19:41+0000\n"
-"Last-Translator: Klumbumbus <Unknown>\n"
+"PO-Revision-Date: 2016-03-12 19:13+0000\n"
+"Last-Translator: holger (lp) <Unknown>\n"
"Language-Team: JOSM\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:44+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:44+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: de\n"
"X-Poedit-SearchPath-0: .\n"
@@ -10848,6 +10848,8 @@ msgid ""
"JOSM does no longer support mappaint styles written in the old XML format.\n"
"Please update ''{0}'' to MapCSS"
msgstr ""
+"JOSM unterstützt im alten XML-Format geschriebene Kartenstile nicht mehr.\n"
+"Bitte aktualisieren Sie ''{0}'' auf MapCSS"
msgid "loading style ''{0}''..."
msgstr "Stil ''{0}'' wird geladen…"
@@ -16418,28 +16420,28 @@ msgid "Waymarked Trails: Winter Sports"
msgstr "Markierte Pfade: Wintersportpisten"
msgid "OSM Inspector: Geometry"
-msgstr "OSM Inspector: Geometry"
+msgstr "OSM-Inspektor: Geometrie"
msgid "OSM Inspector: Tagging"
-msgstr "OSM Inspector: Tagging"
+msgstr "OSM-Inspektor: Tagging"
msgid "OSM Inspector: Places"
-msgstr "OSM Inspector: Places"
+msgstr "OSM-Inspektor: Orte"
msgid "OSM Inspector: Highways"
-msgstr "OSM Inspector: Highways"
+msgstr "OSM-Inspektor: Straßen"
msgid "OSM Inspector: Multipolygon"
-msgstr "OSM Inspector: Multipolygon"
+msgstr "OSM-Inspektor: Multipolygon"
msgid "OSM Inspector: Routing"
-msgstr "OSM Inspector: Routing"
+msgstr "OSM-Inspektor: Routing"
msgid "OSM Inspector: Addresses"
-msgstr "OSM Inspector: Addresses"
+msgstr "OSM-Inspektor: Adressen"
msgid "OSM Inspector: Boundaries (EU)"
-msgstr "OSM Inspector: Boundaries (EU)"
+msgstr "OSM-Inspektor: Grenzen (EU)"
msgid "SIG Instituto Geográfico Nacional (WMTS)"
msgstr "SIG Nationales Geographisches Institut (WMTS)"
@@ -17827,7 +17829,7 @@ msgid ""
"Bring in errors from Osm Inspector and display it on the current JOSM "
"bounding box"
msgstr ""
-"Fehler vom OSM-Inspector laden und im aktuellen JOSM-Arbeitsgebiet anzeigen"
+"Fehler vom OSM-Inspektor laden und im aktuellen JOSM-Arbeitsgebiet anzeigen"
msgid ""
"Recommends categories/tags on newly created OSM entities by analysing "
@@ -26774,7 +26776,7 @@ msgid "open end"
msgstr "offenes Ende"
msgid "Import Osm Inspector Bugs..."
-msgstr "OsmInspector-Fehler importieren …"
+msgstr "OSM-Inspektor-Fehler importieren …"
msgid "OsmInspector"
msgstr "OsmInspector"
diff --git a/i18n/po/de_DE.po b/i18n/po/de_DE.po
index 0afd924..88e5721 100644
--- a/i18n/po/de_DE.po
+++ b/i18n/po/de_DE.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:15+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:13+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/el.po b/i18n/po/el.po
index 63576ef..9ffdb46 100644
--- a/i18n/po/el.po
+++ b/i18n/po/el.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:46+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:46+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: el\n"
diff --git a/i18n/po/en_AU.po b/i18n/po/en_AU.po
index ebee670..7ef2792 100644
--- a/i18n/po/en_AU.po
+++ b/i18n/po/en_AU.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:13+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:11+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/en_CA.po b/i18n/po/en_CA.po
index 9dd5043..89dd418 100644
--- a/i18n/po/en_CA.po
+++ b/i18n/po/en_CA.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:15+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:13+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/en_GB.po b/i18n/po/en_GB.po
index f77f6c8..b0a33c9 100644
--- a/i18n/po/en_GB.po
+++ b/i18n/po/en_GB.po
@@ -11,14 +11,14 @@ msgstr ""
"Project-Id-Version: JOSM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 03:47+0100\n"
-"PO-Revision-Date: 2016-03-11 17:51+0000\n"
+"PO-Revision-Date: 2016-03-13 00:31+0000\n"
"Last-Translator: Andi Chandler <Unknown>\n"
"Language-Team: German <josm-dev at openstreetmap.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:13+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:11+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: de\n"
@@ -10493,6 +10493,8 @@ msgid ""
"JOSM does no longer support mappaint styles written in the old XML format.\n"
"Please update ''{0}'' to MapCSS"
msgstr ""
+"JOSM does no longer support mappaint styles written in the old XML format.\n"
+"Please update ''{0}'' to MapCSS"
msgid "loading style ''{0}''..."
msgstr "loading style ''{0}''..."
@@ -23184,11 +23186,11 @@ msgstr "guyed_v-frame"
msgctxt "power"
msgid "bipole"
-msgstr ""
+msgstr "bipole"
msgctxt "power"
msgid "monopolar"
-msgstr ""
+msgstr "monopolar"
msgid "Triple tower"
msgstr "Triple tower"
@@ -23212,7 +23214,7 @@ msgid "Transformer Attributes:"
msgstr "Transformer Attributes:"
msgid "Insulator"
-msgstr ""
+msgstr "Insulator"
msgid "Power Line"
msgstr "Power Line"
@@ -23221,10 +23223,10 @@ msgid "Line type"
msgstr "Line type"
msgid "line"
-msgstr ""
+msgstr "line"
msgid "minor_line"
-msgstr ""
+msgstr "minor_line"
msgid "Number of conductors/wires per cable"
msgstr "Number of conductors/wires per cable"
@@ -23235,15 +23237,15 @@ msgstr ""
msgctxt "power"
msgid "double"
-msgstr ""
+msgstr "double"
msgctxt "power"
msgid "triple"
-msgstr ""
+msgstr "triple"
msgctxt "power"
msgid "quad"
-msgstr ""
+msgstr "quad"
msgctxt "power"
msgid "fivefold"
diff --git a/i18n/po/eo.po b/i18n/po/eo.po
index 0be6fc7..80d1d36 100644
--- a/i18n/po/eo.po
+++ b/i18n/po/eo.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:41+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:40+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: eo\n"
diff --git a/i18n/po/es.po b/i18n/po/es.po
index f566dd1..991379b 100644
--- a/i18n/po/es.po
+++ b/i18n/po/es.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:06+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:04+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: es\n"
"X-Language: es_ES\n"
diff --git a/i18n/po/et.po b/i18n/po/et.po
index c6f820e..9e2970c 100644
--- a/i18n/po/et.po
+++ b/i18n/po/et.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:41+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:41+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: et\n"
diff --git a/i18n/po/eu.po b/i18n/po/eu.po
index 2ac8e81..fa0dbe7 100644
--- a/i18n/po/eu.po
+++ b/i18n/po/eu.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:35+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:35+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: eu\n"
diff --git a/i18n/po/fa.po b/i18n/po/fa.po
index 6487310..138bc9c 100644
--- a/i18n/po/fa.po
+++ b/i18n/po/fa.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:00+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:58+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: fa\n"
diff --git a/i18n/po/fi.po b/i18n/po/fi.po
index 6d05500..2a6d53d 100644
--- a/i18n/po/fi.po
+++ b/i18n/po/fi.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:42+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:42+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: fi\n"
diff --git a/i18n/po/fil.po b/i18n/po/fil.po
index 706cb64..82e7b09 100644
--- a/i18n/po/fil.po
+++ b/i18n/po/fil.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:16+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:14+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: fil\n"
diff --git a/i18n/po/fo.po b/i18n/po/fo.po
index 753db6b..509202a 100644
--- a/i18n/po/fo.po
+++ b/i18n/po/fo.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:42+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:42+0000\n"
"X-Generator: Launchpad (build 17939)\n"
msgid "{0}: option ''{1}'' is ambiguous"
diff --git a/i18n/po/fr.po b/i18n/po/fr.po
index eb4d269..65869a7 100644
--- a/i18n/po/fr.po
+++ b/i18n/po/fr.po
@@ -13,7 +13,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:43+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:43+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: fr\n"
"X-Poedit-Bookmarks: 1767,-1,-1,2669,-1,-1,-1,-1,-1,-1\n"
diff --git a/i18n/po/ga.po b/i18n/po/ga.po
index adf5bb2..c87ecf8 100644
--- a/i18n/po/ga.po
+++ b/i18n/po/ga.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:45+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:44+0000\n"
"X-Generator: Launchpad (build 17939)\n"
msgid "{0}: option ''{1}'' is ambiguous"
diff --git a/i18n/po/gl.po b/i18n/po/gl.po
index c3da104..8e6f2b7 100644
--- a/i18n/po/gl.po
+++ b/i18n/po/gl.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:45+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:45+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: gl\n"
"X-Poedit-Language: Galician\n"
diff --git a/i18n/po/he.po b/i18n/po/he.po
index 36cdc41..b8ada1d 100644
--- a/i18n/po/he.po
+++ b/i18n/po/he.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:47+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:47+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: he\n"
diff --git a/i18n/po/hi.po b/i18n/po/hi.po
index 43e68d0..d75849d 100644
--- a/i18n/po/hi.po
+++ b/i18n/po/hi.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:48+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:47+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: hi\n"
diff --git a/i18n/po/hr.po b/i18n/po/hr.po
index 521e4de..4f1d625 100644
--- a/i18n/po/hr.po
+++ b/i18n/po/hr.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:05+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:03+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: hr\n"
diff --git a/i18n/po/ht.po b/i18n/po/ht.po
index 843ffef..d9a55fa 100644
--- a/i18n/po/ht.po
+++ b/i18n/po/ht.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:47+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:46+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/hu.po b/i18n/po/hu.po
index 9e62b29..e66c8c8 100644
--- a/i18n/po/hu.po
+++ b/i18n/po/hu.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:48+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:48+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: hu\n"
diff --git a/i18n/po/hy.po b/i18n/po/hy.po
index ed7440e..9034fd4 100644
--- a/i18n/po/hy.po
+++ b/i18n/po/hy.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:33+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:33+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: hy\n"
diff --git a/i18n/po/ia.po b/i18n/po/ia.po
index 7b60d77..f4b005d 100644
--- a/i18n/po/ia.po
+++ b/i18n/po/ia.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:50+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:49+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ia\n"
diff --git a/i18n/po/id.po b/i18n/po/id.po
index c650834..00d594c 100644
--- a/i18n/po/id.po
+++ b/i18n/po/id.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:50+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:49+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: id\n"
"X-Language: id_ID\n"
diff --git a/i18n/po/is.po b/i18n/po/is.po
index 65c223d..5a7959f 100644
--- a/i18n/po/is.po
+++ b/i18n/po/is.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:49+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:48+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: is\n"
diff --git a/i18n/po/it.po b/i18n/po/it.po
index 47fc641..3f6aa10 100644
--- a/i18n/po/it.po
+++ b/i18n/po/it.po
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:51+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:50+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: it\n"
"X-Language: it_IT\n"
diff --git a/i18n/po/ja.po b/i18n/po/ja.po
index 0b607af..c005649 100644
--- a/i18n/po/ja.po
+++ b/i18n/po/ja.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:52+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:51+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"X-Poedit-Country: JAPAN\n"
"Language: ja\n"
diff --git a/i18n/po/ka.po b/i18n/po/ka.po
index 8406b9b..7cf9fa0 100644
--- a/i18n/po/ka.po
+++ b/i18n/po/ka.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:44+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:43+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ka\n"
diff --git a/i18n/po/km.po b/i18n/po/km.po
index 374e932..04483d6 100644
--- a/i18n/po/km.po
+++ b/i18n/po/km.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:52+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:51+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/ko.po b/i18n/po/ko.po
index ccab3f2..c495547 100644
--- a/i18n/po/ko.po
+++ b/i18n/po/ko.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:54+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:52+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ko\n"
diff --git a/i18n/po/ky.po b/i18n/po/ky.po
index 7aecc03..e494472 100644
--- a/i18n/po/ky.po
+++ b/i18n/po/ky.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:53+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:52+0000\n"
"X-Generator: Launchpad (build 17939)\n"
msgid "{0}: option ''{1}'' is ambiguous"
diff --git a/i18n/po/lo.po b/i18n/po/lo.po
index 4504b21..f263dcc 100644
--- a/i18n/po/lo.po
+++ b/i18n/po/lo.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:54+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:53+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/lt.po b/i18n/po/lt.po
index 9450bd0..b18e724 100644
--- a/i18n/po/lt.po
+++ b/i18n/po/lt.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: josm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 03:47+0100\n"
-"PO-Revision-Date: 2016-03-06 16:31+0000\n"
+"PO-Revision-Date: 2016-03-12 13:30+0000\n"
"Last-Translator: Aurimas Fišeras <Unknown>\n"
"Language-Team: Lithuanian <lt at li.org>\n"
"MIME-Version: 1.0\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"(n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:55+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:54+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: lt\n"
@@ -3520,7 +3520,7 @@ msgid "Failed to load defaults cache file: {0}"
msgstr ""
msgid "Failed to delete faulty defaults cache file: {0}"
-msgstr ""
+msgstr "Nepavyko pašalinti klaidingo numatytųjų reikšmių podėlio failo: {0}"
msgid "Paint style {0}: {1}"
msgstr "Paišymo stilius {0}: {1}"
@@ -14984,7 +14984,17 @@ msgid_plural ""
"referred to by nodes {1}.<br>Please load the nodes, remove the reference to "
"the node, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo taškas {1}.<br>Įkelkite tašką, pašalinkite nuorodą į tašką ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo taškai {1}.<br>Įkelkite taškus, pašalinkite nuorodas į tašką ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo taškai {1}.<br>Įkelkite taškus, pašalinkite nuorodas į tašką ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>node {0}</strong>. It is still "
@@ -14995,7 +15005,17 @@ msgid_plural ""
"referred to by ways {1}.<br>Please load the ways, remove the reference to "
"the node, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo kelias {1}.<br>Įkelkite kelią, pašalinkite nuorodą į tašką ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo keliai {1}.<br>Įkelkite kelius, pašalinkite nuorodas į tašką ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo keliai {1}.<br>Įkelkite kelius, pašalinkite nuorodas į tašką ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>node {0}</strong>. It is still "
@@ -15006,7 +15026,17 @@ msgid_plural ""
"referred to by relations {1}.<br>Please load the relations, remove the "
"reference to the node, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo ryšys {1}.<br>Įkelkite ryšį, pašalinkite nuorodą į tašką ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo ryšiai {1}.<br>Įkelkite ryšius, pašalinkite nuorodas į tašką ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>taško {0}</strong>. Į jį vis dar "
+"rodo ryšiai {1}.<br>Įkelkite ryšius, pašalinkite nuorodas į tašką ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>way {0}</strong>. It is still "
@@ -15017,7 +15047,17 @@ msgid_plural ""
"referred to by nodes {1}.<br>Please load the nodes, remove the reference to "
"the way, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo taškas {1}.<br>Įkelkite tašką, pašalinkite nuorodą į kelią ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo taškai {1}.<br>Įkelkite taškus, pašalinkite nuorodas į kelią ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo taškai {1}.<br>Įkelkite taškus, pašalinkite nuorodas į kelią ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>way {0}</strong>. It is still "
@@ -15028,7 +15068,17 @@ msgid_plural ""
"referred to by ways {1}.<br>Please load the ways, remove the reference to "
"the way, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo kelias {1}.<br>Įkelkite kelią, pašalinkite nuorodą į kelią ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo keliai {1}.<br>Įkelkite kelius, pašalinkite nuorodas į kelią ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo keliai {1}.<br>Įkelkite kelius, pašalinkite nuorodas į kelią ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>way {0}</strong>. It is still "
@@ -15039,7 +15089,17 @@ msgid_plural ""
"referred to by relations {1}.<br>Please load the relations, remove the "
"reference to the way, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo ryšys {1}.<br>Įkelkite ryšį, pašalinkite nuorodą į kelią ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo ryšiai {1}.<br>Įkelkite ryšius, pašalinkite nuorodas į kelią ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>kelio {0}</strong>. Į jį vis dar "
+"rodo ryšiai {1}.<br>Įkelkite ryšius, pašalinkite nuorodas į kelią ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>relation {0}</strong>. It is still "
@@ -15050,7 +15110,17 @@ msgid_plural ""
"referred to by nodes {1}.<br>Please load the nodes, remove the reference to "
"the relation, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo taškas {1}.<br>Įkelkite tašką, pašalinkite nuorodą į ryšį ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo taškai {1}.<br>Įkelkite taškus, pašalinkite nuorodas į ryšį ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo taškai {1}.<br>Įkelkite taškus, pašalinkite nuorodas į ryšį ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>relation {0}</strong>. It is still "
@@ -15061,7 +15131,17 @@ msgid_plural ""
"referred to by ways {1}.<br>Please load the ways, remove the reference to "
"the relation, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo kelias {1}.<br>Įkelkite kelią, pašalinkite nuorodą į ryšį ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo keliai {1}.<br>Įkelkite kelius, pašalinkite nuorodas į ryšį ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo keliai {1}.<br>Įkelkite kelius, pašalinkite nuorodas į ryšį ir vėl "
+"išsiųskite."
msgid ""
"<strong>Failed</strong> to delete <strong>relation {0}</strong>. It is still "
@@ -15072,7 +15152,17 @@ msgid_plural ""
"referred to by relations {1}.<br>Please load the relations, remove the "
"reference to the relation, and upload again."
msgstr[0] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo ryšys {1}.<br>Įkelkite ryšį, pašalinkite nuorodą į ryšį ir vėl "
+"išsiųskite."
msgstr[1] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo ryšiai {1}.<br>Įkelkite ryšius, pašalinkite nuorodas į ryšį ir vėl "
+"išsiųskite."
+msgstr[2] ""
+"<strong>Nepavyko</strong> pašalinti <strong>ryšio {0}</strong>. Į jį vis dar "
+"rodo ryšiai {1}.<br>Įkelkite ryšius, pašalinkite nuorodas į ryšį ir vėl "
+"išsiųskite."
msgid ""
"<html>Uploading to the server <strong>failed</strong> because your "
@@ -29620,7 +29710,7 @@ msgid "Click to keep the module ''{0}''"
msgstr ""
msgid "Warning: failed to delete outdated module ''{0}''."
-msgstr ""
+msgstr "Įspėjimas: nepavyko pašalinti pasenusio modulio „{0}“."
msgid ""
"Warning: failed to install already downloaded module ''{0}''. Skipping "
diff --git a/i18n/po/lv.po b/i18n/po/lv.po
index 9716a68..10f28cc 100644
--- a/i18n/po/lv.po
+++ b/i18n/po/lv.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:55+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:53+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: lv\n"
diff --git a/i18n/po/mk.po b/i18n/po/mk.po
index 00af239..83e4146 100644
--- a/i18n/po/mk.po
+++ b/i18n/po/mk.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:56+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:54+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: mk\n"
diff --git a/i18n/po/mr.po b/i18n/po/mr.po
index 6a199cd..55160b1 100644
--- a/i18n/po/mr.po
+++ b/i18n/po/mr.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:56+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:55+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: mr\n"
diff --git a/i18n/po/ms.po b/i18n/po/ms.po
index 9bb9c66..c7ffb04 100644
--- a/i18n/po/ms.po
+++ b/i18n/po/ms.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:57+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:55+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ms\n"
diff --git a/i18n/po/nb.po b/i18n/po/nb.po
index edef824..31695e3 100644
--- a/i18n/po/nb.po
+++ b/i18n/po/nb.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:59+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:57+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: nb\n"
diff --git a/i18n/po/nds.po b/i18n/po/nds.po
index 9abb58b..1ef41ed 100644
--- a/i18n/po/nds.po
+++ b/i18n/po/nds.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:57+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:56+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/nl.po b/i18n/po/nl.po
index 2425e08..5fe2dd4 100644
--- a/i18n/po/nl.po
+++ b/i18n/po/nl.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:40+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:40+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: nl\n"
diff --git a/i18n/po/nn.po b/i18n/po/nn.po
index fd88a5a..1d36db4 100644
--- a/i18n/po/nn.po
+++ b/i18n/po/nn.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:58+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:56+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: nn\n"
diff --git a/i18n/po/oc.po b/i18n/po/oc.po
index a36c5fb..24cda69 100644
--- a/i18n/po/oc.po
+++ b/i18n/po/oc.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:59+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:57+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/pa.po b/i18n/po/pa.po
index 0a9bd11..968e25c 100644
--- a/i18n/po/pa.po
+++ b/i18n/po/pa.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:00+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:58+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: pa\n"
diff --git a/i18n/po/pl.po b/i18n/po/pl.po
index 0d54648..8678a09 100644
--- a/i18n/po/pl.po
+++ b/i18n/po/pl.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:01+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:59+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: pl\n"
"X-Poedit-Bookmarks: 1098,-1,-1,-1,-1,-1,-1,-1,-1,-1\n"
diff --git a/i18n/po/pt.po b/i18n/po/pt.po
index 6b638c2..2015c12 100644
--- a/i18n/po/pt.po
+++ b/i18n/po/pt.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:02+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:59+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: pt\n"
diff --git a/i18n/po/pt_BR.po b/i18n/po/pt_BR.po
index 55e77f8..d6bb09b 100644
--- a/i18n/po/pt_BR.po
+++ b/i18n/po/pt_BR.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:12+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:10+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: pt_BR\n"
diff --git a/i18n/po/rm.po b/i18n/po/rm.po
index ee6a96a..1f8aaaa 100644
--- a/i18n/po/rm.po
+++ b/i18n/po/rm.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n !=1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:02+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:00+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/ro.po b/i18n/po/ro.po
index 46c047d..bd1d15b 100644
--- a/i18n/po/ro.po
+++ b/i18n/po/ro.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 "
"== 0) && (n != 0))) ? 2: 1));\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:03+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:01+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"X-Poedit-Country: ROMANIA\n"
"Language: ro\n"
diff --git a/i18n/po/ru.po b/i18n/po/ru.po
index de054d8..4308cbd 100644
--- a/i18n/po/ru.po
+++ b/i18n/po/ru.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: josm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 03:47+0100\n"
-"PO-Revision-Date: 2016-03-09 05:57+0000\n"
+"PO-Revision-Date: 2016-03-12 05:15+0000\n"
"Last-Translator: Aleksey Kabanov <Unknown>\n"
"Language-Team: Koptev Oleg <koptev.oleg at gmail.com>\n"
"MIME-Version: 1.0\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:03+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:01+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ru_RU\n"
@@ -10830,6 +10830,9 @@ msgid ""
"JOSM does no longer support mappaint styles written in the old XML format.\n"
"Please update ''{0}'' to MapCSS"
msgstr ""
+"JOSM больше не поддерживает стили mappaint, написанные в старом формате "
+"XML.\n"
+"Обновите ''{0}'' на MapCSS"
msgid "loading style ''{0}''..."
msgstr "загрузка стиля ''{0}''..."
diff --git a/i18n/po/sk.po b/i18n/po/sk.po
index d10484f..c8109c4 100644
--- a/i18n/po/sk.po
+++ b/i18n/po/sk.po
@@ -10,14 +10,14 @@ msgstr ""
"Project-Id-Version: josm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 03:47+0100\n"
-"PO-Revision-Date: 2016-03-08 15:05+0000\n"
+"PO-Revision-Date: 2016-03-12 18:48+0000\n"
"Last-Translator: aceman444 <Unknown>\n"
"Language-Team: Slovak <>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:05+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:03+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: sk\n"
@@ -10738,6 +10738,8 @@ msgid ""
"JOSM does no longer support mappaint styles written in the old XML format.\n"
"Please update ''{0}'' to MapCSS"
msgstr ""
+"JOSM už nepodporuje mapové štýly v starom XML formáte.\n"
+"Prosím aktualizujte \"{0}\" na MapCSS"
msgid "loading style ''{0}''..."
msgstr "nahrávam štýl ''{0}''..."
@@ -17500,7 +17502,7 @@ msgid "Import vector graphics (SVG)"
msgstr "Import vektorovej grafiky (SVG)"
msgid "This plugin simplifies the mapping and editing of indoor corridors."
-msgstr ""
+msgstr "Tento plugin zjednodušuje mapovanie a úpravy chodieb v budovách."
msgid ""
"Extra information about current layer objects pop ups - currently GPX "
diff --git a/i18n/po/sl.po b/i18n/po/sl.po
index ba90e23..391a504 100644
--- a/i18n/po/sl.po
+++ b/i18n/po/sl.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || "
"n%100==4 ? 3 : 0);\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:06+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:04+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: sl\n"
diff --git a/i18n/po/sq.po b/i18n/po/sq.po
index 9d7c89a..f9db5c1 100644
--- a/i18n/po/sq.po
+++ b/i18n/po/sq.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 04:31+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 04:31+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/sr.po b/i18n/po/sr.po
index 6c7cf95..5b5dbc0 100644
--- a/i18n/po/sr.po
+++ b/i18n/po/sr.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:04+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:02+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: sr\n"
diff --git a/i18n/po/sv.po b/i18n/po/sv.po
index 17b79c6..073b6af 100644
--- a/i18n/po/sv.po
+++ b/i18n/po/sv.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:07+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:05+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: sv\n"
diff --git a/i18n/po/ta.po b/i18n/po/ta.po
index 479fdf7..8e96029 100644
--- a/i18n/po/ta.po
+++ b/i18n/po/ta.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:07+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:05+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"X-Poedit-Country: INDIA\n"
"Language: ta\n"
diff --git a/i18n/po/te.po b/i18n/po/te.po
index db8896d..c0f5471 100644
--- a/i18n/po/te.po
+++ b/i18n/po/te.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:08+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:06+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: te\n"
diff --git a/i18n/po/th.po b/i18n/po/th.po
index 389162e..55ce07f 100644
--- a/i18n/po/th.po
+++ b/i18n/po/th.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:08+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:06+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: th\n"
diff --git a/i18n/po/tr.po b/i18n/po/tr.po
index f09f637..ac52980 100644
--- a/i18n/po/tr.po
+++ b/i18n/po/tr.po
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:09+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:07+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/ug.po b/i18n/po/ug.po
index 9f69749..85b62e3 100644
--- a/i18n/po/ug.po
+++ b/i18n/po/ug.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:09+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:07+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: \n"
diff --git a/i18n/po/uk.po b/i18n/po/uk.po
index 963dc92..dbe9c3d 100644
--- a/i18n/po/uk.po
+++ b/i18n/po/uk.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:10+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:08+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: uk\n"
diff --git a/i18n/po/ur.po b/i18n/po/ur.po
index 31f4003..49af3d9 100644
--- a/i18n/po/ur.po
+++ b/i18n/po/ur.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:11+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:09+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: ur\n"
diff --git a/i18n/po/vi.po b/i18n/po/vi.po
index 27860ce..5ab2c55 100644
--- a/i18n/po/vi.po
+++ b/i18n/po/vi.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:11+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:09+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: vi\n"
diff --git a/i18n/po/wae.po b/i18n/po/wae.po
index cec4551..0fa353e 100644
--- a/i18n/po/wae.po
+++ b/i18n/po/wae.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:16+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:14+0000\n"
"X-Generator: Launchpad (build 17939)\n"
msgid "{0}: option ''{1}'' is ambiguous"
diff --git a/i18n/po/zh_CN.po b/i18n/po/zh_CN.po
index 153f187..16f055e 100644
--- a/i18n/po/zh_CN.po
+++ b/i18n/po/zh_CN.po
@@ -18,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:14+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:12+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: zh_CN\n"
diff --git a/i18n/po/zh_TW.po b/i18n/po/zh_TW.po
index 2599b28..1d19494 100644
--- a/i18n/po/zh_TW.po
+++ b/i18n/po/zh_TW.po
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Launchpad-Export-Date: 2016-03-12 05:14+0000\n"
+"X-Launchpad-Export-Date: 2016-03-13 05:12+0000\n"
"X-Generator: Launchpad (build 17939)\n"
"Language: zh_TW\n"
diff --git a/src/org/openstreetmap/josm/actions/CreateCircleAction.java b/src/org/openstreetmap/josm/actions/CreateCircleAction.java
index 8889ed0..0797e41 100644
--- a/src/org/openstreetmap/josm/actions/CreateCircleAction.java
+++ b/src/org/openstreetmap/josm/actions/CreateCircleAction.java
@@ -197,7 +197,7 @@ public final class CreateCircleAction extends JosmAction {
}
Arrays.sort(angles, new PolarNodeComparator());
int[] count = distributeNodes(angles,
- numberOfNodesInCircle >= nodes.size() ? numberOfNodesInCircle - nodes.size() : 0);
+ numberOfNodesInCircle >= nodes.size() ? (numberOfNodesInCircle - nodes.size()) : 0);
// now we can start doing things to OSM data
Collection<Command> cmds = new LinkedList<>();
diff --git a/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java b/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
index 8245eab..39e2e24 100644
--- a/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
+++ b/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
@@ -318,7 +318,7 @@ public class ExtensionFileFilter extends FileFilter implements java.io.FileFilte
Utils.join(",", extensionsPlusArchive),
defaultExtension,
description + (!extensionsForDescription.isEmpty()
- ? " (" + Utils.join(", ", extensionsForDescription) + ")"
+ ? (" (" + Utils.join(", ", extensionsForDescription) + ")")
: "")
);
}
diff --git a/src/org/openstreetmap/josm/actions/MergeNodesAction.java b/src/org/openstreetmap/josm/actions/MergeNodesAction.java
index 3e98dad..d54dedf 100644
--- a/src/org/openstreetmap/josm/actions/MergeNodesAction.java
+++ b/src/org/openstreetmap/josm/actions/MergeNodesAction.java
@@ -174,7 +174,7 @@ public class MergeNodesAction extends JosmAction {
lastNode = n;
}
if (targetNode == null) {
- targetNode = (oldestNode != null ? oldestNode : lastNode);
+ targetNode = oldestNode != null ? oldestNode : lastNode;
}
return targetNode;
}
diff --git a/src/org/openstreetmap/josm/actions/OpenFileAction.java b/src/org/openstreetmap/josm/actions/OpenFileAction.java
index 62c0b3d..46a0e51 100644
--- a/src/org/openstreetmap/josm/actions/OpenFileAction.java
+++ b/src/org/openstreetmap/josm/actions/OpenFileAction.java
@@ -32,7 +32,6 @@ import javax.swing.filechooser.FileFilter;
import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.gui.HelpAwareOptionPane;
import org.openstreetmap.josm.gui.PleaseWaitRunnable;
-import org.openstreetmap.josm.gui.help.HelpUtil;
import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
import org.openstreetmap.josm.io.AllFormatsImporter;
import org.openstreetmap.josm.io.FileImporter;
@@ -202,7 +201,7 @@ public class OpenFileAction extends DiskAccessAction {
msg.toString(),
tr("Warning"),
JOptionPane.WARNING_MESSAGE,
- HelpUtil.ht("/Action/Open#ImporterCantImportFiles")
+ ht("/Action/Open#ImporterCantImportFiles")
);
}
@@ -228,7 +227,7 @@ public class OpenFileAction extends DiskAccessAction {
msg.toString(),
tr("Warning"),
JOptionPane.WARNING_MESSAGE,
- HelpUtil.ht("/Action/Open#MissingImporterForFiles")
+ ht("/Action/Open#MissingImporterForFiles")
);
}
diff --git a/src/org/openstreetmap/josm/actions/OpenLocationAction.java b/src/org/openstreetmap/josm/actions/OpenLocationAction.java
index b63eb4e..df1723c 100644
--- a/src/org/openstreetmap/josm/actions/OpenLocationAction.java
+++ b/src/org/openstreetmap/josm/actions/OpenLocationAction.java
@@ -38,7 +38,6 @@ import org.openstreetmap.josm.actions.downloadtasks.DownloadTask;
import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
import org.openstreetmap.josm.gui.ExtendedDialog;
import org.openstreetmap.josm.gui.HelpAwareOptionPane;
-import org.openstreetmap.josm.gui.help.HelpUtil;
import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
import org.openstreetmap.josm.tools.Shortcut;
@@ -237,7 +236,7 @@ public class OpenLocationAction extends JosmAction {
final String details = findSummaryDocumentation(); // Explain what patterns are supported
HelpAwareOptionPane.showMessageDialogInEDT(Main.parent, "<html><p>" + tr(
"Cannot open URL ''{0}''<br>The following download tasks accept the URL patterns shown:<br>{1}",
- url, details) + "</p></html>", tr("Download Location"), JOptionPane.ERROR_MESSAGE, HelpUtil.ht("/Action/OpenLocation"));
+ url, details) + "</p></html>", tr("Download Location"), JOptionPane.ERROR_MESSAGE, ht("/Action/OpenLocation"));
}
/**
diff --git a/src/org/openstreetmap/josm/actions/PasteTagsAction.java b/src/org/openstreetmap/josm/actions/PasteTagsAction.java
index 87ede1e..b4c1ced 100644
--- a/src/org/openstreetmap/josm/actions/PasteTagsAction.java
+++ b/src/org/openstreetmap/josm/actions/PasteTagsAction.java
@@ -75,9 +75,9 @@ public final class PasteTagsAction extends JosmAction {
*/
protected boolean isHeterogeneousSource() {
int count = 0;
- count = !getSourcePrimitivesByType(OsmPrimitiveType.NODE).isEmpty() ? count + 1 : count;
- count = !getSourcePrimitivesByType(OsmPrimitiveType.WAY).isEmpty() ? count + 1 : count;
- count = !getSourcePrimitivesByType(OsmPrimitiveType.RELATION).isEmpty() ? count + 1 : count;
+ count = !getSourcePrimitivesByType(OsmPrimitiveType.NODE).isEmpty() ? (count + 1) : count;
+ count = !getSourcePrimitivesByType(OsmPrimitiveType.WAY).isEmpty() ? (count + 1) : count;
+ count = !getSourcePrimitivesByType(OsmPrimitiveType.RELATION).isEmpty() ? (count + 1) : count;
return count > 1;
}
diff --git a/src/org/openstreetmap/josm/actions/SimplifyWayAction.java b/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
index 5b47d04..98c128f 100644
--- a/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
+++ b/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
@@ -30,7 +30,6 @@ import org.openstreetmap.josm.data.projection.Ellipsoid;
import org.openstreetmap.josm.gui.HelpAwareOptionPane;
import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
import org.openstreetmap.josm.gui.Notification;
-import org.openstreetmap.josm.gui.help.HelpUtil;
import org.openstreetmap.josm.tools.ImageProvider;
import org.openstreetmap.josm.tools.Shortcut;
@@ -58,7 +57,7 @@ public class SimplifyWayAction extends JosmAction {
tr("Please select at least one way to simplify."))
.setIcon(JOptionPane.WARNING_MESSAGE)
.setDuration(Notification.TIME_SHORT)
- .setHelpTopic(HelpUtil.ht("/Action/SimplifyWay#SelectAWayToSimplify"))
+ .setHelpTopic(ht("/Action/SimplifyWay#SelectAWayToSimplify"))
.show();
}
@@ -88,7 +87,7 @@ public class SimplifyWayAction extends JosmAction {
null, // no special icon
options,
options[0],
- HelpUtil.ht("/Action/SimplifyWay#ConfirmSimplifyAll")
+ ht("/Action/SimplifyWay#ConfirmSimplifyAll")
);
}
diff --git a/src/org/openstreetmap/josm/actions/SplitWayAction.java b/src/org/openstreetmap/josm/actions/SplitWayAction.java
index 147731a..63525fd 100644
--- a/src/org/openstreetmap/josm/actions/SplitWayAction.java
+++ b/src/org/openstreetmap/josm/actions/SplitWayAction.java
@@ -613,13 +613,7 @@ public class SplitWayAction extends JosmAction {
/* this code assumes the restriction is correct. No real error checking done */
String role = rm.getRole();
if ("from".equals(role) || "to".equals(role)) {
- OsmPrimitive via = null;
- for (RelationMember rmv : r.getMembers()) {
- if ("restriction".equals(type) && "via".equals(rmv.getRole())
- || "destination_sign".equals(type) && rmv.hasRole("sign", "intersection")) {
- via = rmv.getMember();
- }
- }
+ OsmPrimitive via = findVia(r, type);
List<Node> nodes = new ArrayList<>();
if (via != null) {
if (via instanceof Node) {
@@ -750,6 +744,16 @@ public class SplitWayAction extends JosmAction {
);
}
+ static OsmPrimitive findVia(Relation r, String type) {
+ for (RelationMember rmv : r.getMembers()) {
+ if (("restriction".equals(type) && "via".equals(rmv.getRole()))
+ || ("destination_sign".equals(type) && rmv.hasRole("sign", "intersection"))) {
+ return rmv.getMember();
+ }
+ }
+ return null;
+ }
+
/**
* Splits the way {@code way} at the nodes in {@code atNodes} and replies
* the result of this process in an instance of {@link SplitWayResult}.
diff --git a/src/org/openstreetmap/josm/actions/UnGlueAction.java b/src/org/openstreetmap/josm/actions/UnGlueAction.java
index 1984b7e..d0c277a 100644
--- a/src/org/openstreetmap/josm/actions/UnGlueAction.java
+++ b/src/org/openstreetmap/josm/actions/UnGlueAction.java
@@ -696,7 +696,7 @@ public class UnGlueAction extends JosmAction {
for (Way way : ways) {
for (OsmPrimitive ref : way.getReferrers()) {
if (ref instanceof Relation && ref.isUsable()) {
- affectedRelations.add((ref.getDisplayName(DefaultNameFormatter.getInstance())));
+ affectedRelations.add(ref.getDisplayName(DefaultNameFormatter.getInstance()));
}
}
}
diff --git a/src/org/openstreetmap/josm/actions/UploadAction.java b/src/org/openstreetmap/josm/actions/UploadAction.java
index d9acff9..af487c4 100644
--- a/src/org/openstreetmap/josm/actions/UploadAction.java
+++ b/src/org/openstreetmap/josm/actions/UploadAction.java
@@ -21,7 +21,6 @@ import org.openstreetmap.josm.actions.upload.ValidateUploadHook;
import org.openstreetmap.josm.data.APIDataSet;
import org.openstreetmap.josm.data.conflict.ConflictCollection;
import org.openstreetmap.josm.gui.HelpAwareOptionPane;
-import org.openstreetmap.josm.gui.help.HelpUtil;
import org.openstreetmap.josm.gui.io.UploadDialog;
import org.openstreetmap.josm.gui.io.UploadPrimitivesTask;
import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
@@ -154,7 +153,7 @@ public class UploadAction extends JosmAction {
),
tr("Warning"),
JOptionPane.WARNING_MESSAGE,
- HelpUtil.ht("/Action/Upload#PrimitivesParticipateInConflicts")
+ ht("/Action/Upload#PrimitivesParticipateInConflicts")
);
}
diff --git a/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java b/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
index 8ee76cf..bf57b4b 100644
--- a/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
+++ b/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
@@ -534,7 +534,7 @@ public class DrawAction extends MapMode implements MapViewPaintable, SelectionCh
// Ok we know now that we'll insert a line segment, but will it connect to an
// existing way or make a new way of its own? The "alt" modifier means that the
// user wants a new way.
- Way way = alt ? null : (selectedWay != null) ? selectedWay : getWayForNode(n0);
+ Way way = alt ? null : (selectedWay != null ? selectedWay : getWayForNode(n0));
Way wayToSelect;
// Don't allow creation of self-overlapping ways
@@ -1564,7 +1564,7 @@ public class DrawAction extends MapMode implements MapViewPaintable, SelectionCh
double phi;
e0 = p0.east();
n0 = p0.north();
- buildLabelText((nearestAngle <= 180) ? nearestAngle : nearestAngle-360);
+ buildLabelText((nearestAngle <= 180) ? nearestAngle : (nearestAngle-360));
phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
// (pe,pn) - direction of snapping line
diff --git a/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java b/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java
index a17d784..3de2c89 100644
--- a/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java
+++ b/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java
@@ -24,9 +24,9 @@ public class ModifiersSpec {
char s = str.charAt(1);
char c = str.charAt(2);
// @formatter:off
- alt = (a == '?' ? UNKNOWN : (a == 'A' ? ON : OFF));
- shift = (s == '?' ? UNKNOWN : (s == 'S' ? ON : OFF));
- ctrl = (c == '?' ? UNKNOWN : (c == 'C' ? ON : OFF));
+ alt = a == '?' ? UNKNOWN : (a == 'A' ? ON : OFF);
+ shift = s == '?' ? UNKNOWN : (s == 'S' ? ON : OFF);
+ ctrl = c == '?' ? UNKNOWN : (c == 'C' ? ON : OFF);
// @formatter:on
}
diff --git a/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java b/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
index 492079b..6c8b0bf 100644
--- a/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
+++ b/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
@@ -409,7 +409,7 @@ public class SelectAction extends MapMode implements ModifierListener, KeyPressR
// We don't want to change to draw tool if the user tries to (de)select
// stuff but accidentally clicks in an empty area when selection is empty
- cancelDrawMode = (shift || ctrl);
+ cancelDrawMode = shift || ctrl;
didMouseDrag = false;
initialMoveThresholdExceeded = false;
mouseDownTime = System.currentTimeMillis();
@@ -1151,7 +1151,7 @@ public class SelectAction extends MapMode implements ModifierListener, KeyPressR
}
} else {
// setup for iterating a sel group again or a new, different one..
- nxt = (cycleList.contains(cycleStart)) ? cycleStart : first;
+ nxt = cycleList.contains(cycleStart) ? cycleStart : first;
cycleStart = nxt;
}
} else {
diff --git a/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java b/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
index 0ca343e..7902d64 100644
--- a/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
+++ b/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
@@ -19,6 +19,7 @@ import org.openstreetmap.josm.tools.SubclassFilteredCollection;
public abstract class AbstractRelationAction extends AbstractAction implements OsmPrimitiveAction {
protected transient Collection<Relation> relations = Collections.<Relation>emptySet();
+ @SuppressWarnings("unused")
protected static final Collection<Relation> getRelations(Collection<? extends OsmPrimitive> primitives) {
if (primitives == null || primitives.isEmpty()) {
return Collections.<Relation>emptySet();
diff --git a/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java b/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java
index d000c63..b5e5477 100644
--- a/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java
+++ b/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java
@@ -48,7 +48,7 @@ public class AddSelectionToRelations extends AbstractRelationAction implements S
new Notification(
tr("<html><strong>Add selection to relation</strong>: Control every single relation to avoid damage!"))
.setIcon(JOptionPane.WARNING_MESSAGE)
- .show();;
+ .show();
}
}
diff --git a/src/org/openstreetmap/josm/command/DeleteCommand.java b/src/org/openstreetmap/josm/command/DeleteCommand.java
index 348ff65..cd18d5a 100644
--- a/src/org/openstreetmap/josm/command/DeleteCommand.java
+++ b/src/org/openstreetmap/josm/command/DeleteCommand.java
@@ -369,6 +369,7 @@ public class DeleteCommand extends Command {
return null;
// Diamond operator does not work with Java 9 here
+ @SuppressWarnings("unused")
Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection);
Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class);
diff --git a/src/org/openstreetmap/josm/corrector/TagCorrector.java b/src/org/openstreetmap/josm/corrector/TagCorrector.java
index 5112873..5529ff6 100644
--- a/src/org/openstreetmap/josm/corrector/TagCorrector.java
+++ b/src/org/openstreetmap/josm/corrector/TagCorrector.java
@@ -45,7 +45,7 @@ public abstract class TagCorrector<P extends OsmPrimitive> {
public abstract Collection<Command> execute(P oldprimitive, P primitive) throws UserCancelException;
- private final String[] applicationOptions = new String[] {
+ private static final String[] APPLICATION_OPTIONS = new String[] {
tr("Apply selected changes"),
tr("Do not apply changes"),
tr("Cancel")
@@ -132,8 +132,8 @@ public abstract class TagCorrector<P extends OsmPrimitive> {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE,
null,
- applicationOptions,
- applicationOptions[0]
+ APPLICATION_OPTIONS,
+ APPLICATION_OPTIONS[0]
);
if (answer == JOptionPane.YES_OPTION) {
diff --git a/src/org/openstreetmap/josm/data/Preferences.java b/src/org/openstreetmap/josm/data/Preferences.java
index 118ac77..78c34ef 100644
--- a/src/org/openstreetmap/josm/data/Preferences.java
+++ b/src/org/openstreetmap/josm/data/Preferences.java
@@ -152,7 +152,7 @@ public class Preferences {
* Indicates whether {@link #init(boolean)} completed successfully.
* Used to decide whether to write backup preference file in {@link #save()}
*/
- protected boolean initSuccessful = false;
+ protected boolean initSuccessful;
/**
* Event triggered when a preference entry value changes.
@@ -1433,42 +1433,10 @@ public class Preferences {
* @param loadedVersion JOSM version when the preferences file was written
*/
private void removeObsolete(int loadedVersion) {
- // drop this block march 2016
- // update old style JOSM server links to use zip now, see #10581, #12189
- // actually also cache and mirror entries should be cleared
- if (loadedVersion < 9216) {
- for (String key: new String[]{"mappaint.style.entries", "taggingpreset.entries"}) {
- Collection<Map<String, String>> data = getListOfStructs(key, (Collection<Map<String, String>>) null);
- if (data != null) {
- List<Map<String, String>> newlist = new ArrayList<>();
- boolean modified = false;
- for (Map<String, String> map : data) {
- Map<String, String> newmap = new LinkedHashMap<>();
- for (Entry<String, String> entry : map.entrySet()) {
- String val = entry.getValue();
- String mkey = entry.getKey();
- if ("url".equals(mkey) && val.contains("josm.openstreetmap.de/josmfile") && !val.contains("zip=1")) {
- val += "&zip=1";
- modified = true;
- }
- if ("url".equals(mkey) && val.contains("http://josm.openstreetmap.de/josmfile")) {
- val = val.replace("http://", "https://");
- modified = true;
- }
- newmap.put(mkey, val);
- }
- newlist.add(newmap);
- }
- if (modified) {
- putListOfStructs(key, newlist);
- }
- }
- }
- }
/* drop in October 2016 */
if (loadedVersion < 9715) {
Setting<?> setting = settingsMap.get("imagery.entries");
- if (setting != null && setting instanceof MapListSetting) {
+ if (setting instanceof MapListSetting) {
List<Map<String, String>> l = new LinkedList<>();
boolean modified = false;
for (Map<String, String> map: ((MapListSetting) setting).getValue()) {
@@ -1490,6 +1458,25 @@ public class Preferences {
}
}
}
+ // drop in November 2016
+ if (loadedVersion < 9965) {
+ Setting<?> setting = settingsMap.get("mappaint.style.entries");
+ if (setting instanceof MapListSetting) {
+ List<Map<String, String>> l = new LinkedList<>();
+ boolean modified = false;
+ for (Map<String, String> map: ((MapListSetting) setting).getValue()) {
+ String url = map.get("url");
+ if (url != null && url.contains("josm.openstreetmap.de/josmfile?page=Styles/LegacyStandard")) {
+ modified = true;
+ } else {
+ l.add(map);
+ }
+ }
+ if (modified) {
+ putListOfStructs("mappaint.style.entries", l);
+ }
+ }
+ }
for (String key : OBSOLETE_PREF_KEYS) {
if (settingsMap.containsKey(key)) {
diff --git a/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java b/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java
index 2b0b675..508f525 100644
--- a/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java
+++ b/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java
@@ -69,7 +69,7 @@ public class CachedAttributionBingAerialTileSource extends BingAerialTileSource
while (true) {
try {
String xml = attributionLoader.updateIfRequiredString();
- List<Attribution> ret = parseAttributionText(new InputSource(new StringReader((xml))));
+ List<Attribution> ret = parseAttributionText(new InputSource(new StringReader(xml)));
if (attributionDownloadedTask != null) {
GuiHelper.runInEDT(attributionDownloadedTask);
attributionDownloadedTask = null;
diff --git a/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java b/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
index b61de3f..2653294 100644
--- a/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
+++ b/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
@@ -187,11 +187,11 @@ public class ImageryInfo extends TileSourceInfo implements Comparable<ImageryInf
/** country code of the imagery (for country specific imagery) */
private String countryCode = "";
/** mirrors of different type for this entry */
- private List<ImageryInfo> mirrors = null;
+ private List<ImageryInfo> mirrors;
/** icon used in menu */
private String icon;
- private boolean isGeoreferenceValid = false;
- private boolean isEpsg4326To3857Supported = false;
+ private boolean isGeoreferenceValid;
+ private boolean isEpsg4326To3857Supported;
// when adding a field, also adapt the ImageryInfo(ImageryInfo)
// and ImageryInfo(ImageryPreferenceEntry) constructor, equals method, and ImageryPreferenceEntry
diff --git a/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java b/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
index d1fb9e7..e02d4b4 100644
--- a/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
+++ b/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
@@ -1,6 +1,8 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.data.imagery;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -24,8 +26,6 @@ import org.openstreetmap.josm.io.imagery.ImageryReader;
import org.openstreetmap.josm.tools.Utils;
import org.xml.sax.SAXException;
-import static org.openstreetmap.josm.tools.I18n.tr;
-
/**
* Manages the list of imagery entries that are shown in the imagery menu.
*/
@@ -112,8 +112,8 @@ public class ImageryLayerInfo {
private final boolean clearCache;
private final boolean fastFail;
private final List<ImageryInfo> newLayers = new ArrayList<>();
- private transient ImageryReader reader;
- private transient boolean canceled;
+ private ImageryReader reader;
+ private boolean canceled;
DefaultEntryLoader(boolean clearCache, boolean fastFail) {
super(tr("Update default entries"));
diff --git a/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java b/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java
index 98395d0..ed6f427 100644
--- a/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java
+++ b/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java
@@ -6,11 +6,11 @@ import java.io.InputStream;
import java.net.URL;
import java.util.Map;
+import org.openstreetmap.josm.tools.HttpClient;
+
import oauth.signpost.AbstractOAuthConsumer;
import oauth.signpost.AbstractOAuthProvider;
-import org.openstreetmap.josm.tools.HttpClient;
-
/**
* Adapters to make {@code oauth.signpost} work with {@link HttpClient}.
*/
@@ -53,7 +53,7 @@ public final class SignpostAdapters {
@Override
protected HttpRequest wrap(Object request) {
- return new HttpRequest(((HttpClient) request));
+ return new HttpRequest((HttpClient) request);
}
}
diff --git a/src/org/openstreetmap/josm/data/osm/BBox.java b/src/org/openstreetmap/josm/data/osm/BBox.java
index 5882c9f..206e708 100644
--- a/src/org/openstreetmap/josm/data/osm/BBox.java
+++ b/src/org/openstreetmap/josm/data/osm/BBox.java
@@ -152,12 +152,8 @@ public class BBox {
* @return {@code true} if {@code b} lies completely inside this bbox
*/
public boolean bounds(BBox b) {
- if (!(xmin <= b.xmin) ||
- !(xmax >= b.xmax) ||
- !(ymin <= b.ymin) ||
- !(ymax >= b.ymax))
- return false;
- return true;
+ return xmin <= b.xmin && xmax >= b.xmax
+ && ymin <= b.ymin && ymax >= b.ymax;
}
/**
@@ -166,12 +162,8 @@ public class BBox {
* @return {@code true} if {@code c} lies within the bbox
*/
public boolean bounds(LatLon c) {
- if ((xmin <= c.lon()) &&
- (xmax >= c.lon()) &&
- (ymin <= c.lat()) &&
- (ymax >= c.lat()))
- return true;
- return false;
+ return xmin <= c.lon() && xmax >= c.lon()
+ && ymin <= c.lat() && ymax >= c.lat();
}
/**
diff --git a/src/org/openstreetmap/josm/data/osm/Node.java b/src/org/openstreetmap/josm/data/osm/Node.java
index f63f02b..20e7fa2 100644
--- a/src/org/openstreetmap/josm/data/osm/Node.java
+++ b/src/org/openstreetmap/josm/data/osm/Node.java
@@ -280,10 +280,10 @@ public final class Node extends OsmPrimitive implements INode {
}
@Override
- public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
+ public boolean hasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly) {
if (!(other instanceof Node))
return false;
- if (!super.hasEqualSemanticAttributes(other))
+ if (!super.hasEqualSemanticAttributes(other, testInterestingTagsOnly))
return false;
Node n = (Node) other;
LatLon coor = getCoor();
diff --git a/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java b/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
index 7cb46e8..e21aeeb 100644
--- a/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
+++ b/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
@@ -291,7 +291,7 @@ public abstract class OsmPrimitive extends AbstractPrimitive implements Comparab
*/
protected OsmPrimitive(long id, int version, boolean allowNegativeId) {
this(id, allowNegativeId);
- this.version = (id > 0 ? version : 0);
+ this.version = id > 0 ? version : 0;
setIncomplete(id > 0 && version == 0);
}
@@ -1236,7 +1236,7 @@ public abstract class OsmPrimitive extends AbstractPrimitive implements Comparab
* @param other other primitive to compare
* @return true if this primitive and other are equal with respect to their semantic attributes.
*/
- public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
+ public final boolean hasEqualSemanticAttributes(OsmPrimitive other) {
return hasEqualSemanticAttributes(other, true);
}
diff --git a/src/org/openstreetmap/josm/data/osm/Relation.java b/src/org/openstreetmap/josm/data/osm/Relation.java
index 7e16fc1..c4c2e18 100644
--- a/src/org/openstreetmap/josm/data/osm/Relation.java
+++ b/src/org/openstreetmap/josm/data/osm/Relation.java
@@ -286,10 +286,10 @@ public final class Relation extends OsmPrimitive implements IRelation {
}
@Override
- public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
+ public boolean hasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly) {
if (!(other instanceof Relation))
return false;
- if (!super.hasEqualSemanticAttributes(other))
+ if (!super.hasEqualSemanticAttributes(other, testInterestingTagsOnly))
return false;
Relation r = (Relation) other;
return Arrays.equals(members, r.members);
diff --git a/src/org/openstreetmap/josm/data/osm/Storage.java b/src/org/openstreetmap/josm/data/osm/Storage.java
index 79869ba..f6bfe09 100644
--- a/src/org/openstreetmap/josm/data/osm/Storage.java
+++ b/src/org/openstreetmap/josm/data/osm/Storage.java
@@ -90,7 +90,7 @@ public class Storage<T> extends AbstractSet<T> {
private int mask;
private int size;
private volatile int modCount;
- private final double loadFactor = 0.6d;
+ private static final double LOAD_FACTOR = 0.6d;
private static final int DEFAULT_CAPACITY = 16;
private final boolean safeIterator;
private boolean arrayCopyNecessary;
@@ -142,7 +142,7 @@ public class Storage<T> extends AbstractSet<T> {
*/
public Storage(Hash<? super T, ? super T> ha, int capacity, boolean safeIterator) {
this.hash = ha;
- int cap = 1 << (int) (Math.ceil(Math.log(capacity/loadFactor) / Math.log(2)));
+ int cap = 1 << (int) (Math.ceil(Math.log(capacity/LOAD_FACTOR) / Math.log(2)));
@SuppressWarnings("unchecked") T[] newData = (T[]) new Object[cap];
data = newData;
mask = data.length - 1;
@@ -327,7 +327,7 @@ public class Storage<T> extends AbstractSet<T> {
}
private void ensureSpace() {
- if (size > data.length*loadFactor) { // rehash
+ if (size > data.length*LOAD_FACTOR) { // rehash
@SuppressWarnings("unchecked") T[] big = (T[]) new Object[data.length * 2];
int nMask = big.length - 1;
diff --git a/src/org/openstreetmap/josm/data/osm/TagMap.java b/src/org/openstreetmap/josm/data/osm/TagMap.java
index 1b61eef..ce49e40 100644
--- a/src/org/openstreetmap/josm/data/osm/TagMap.java
+++ b/src/org/openstreetmap/josm/data/osm/TagMap.java
@@ -36,7 +36,7 @@ public class TagMap extends AbstractMap<String, String> {
/**
* Current tag index. Always a multiple of 2.
*/
- private int currentIndex = 0;
+ private int currentIndex;
/**
* Create a new {@link TagEntryInterator}
@@ -233,14 +233,14 @@ public class TagMap extends AbstractMap<String, String> {
boolean first = true;
for (java.util.Map.Entry<String, String> e : entrySet()) {
if (!first) {
- stringBuilder.append(",");
+ stringBuilder.append(',');
}
stringBuilder.append(e.getKey());
- stringBuilder.append("=");
+ stringBuilder.append('=');
stringBuilder.append(e.getValue());
first = false;
}
- stringBuilder.append("]");
+ stringBuilder.append(']');
return stringBuilder.toString();
}
diff --git a/src/org/openstreetmap/josm/data/osm/Way.java b/src/org/openstreetmap/josm/data/osm/Way.java
index 0164728..17201fd 100644
--- a/src/org/openstreetmap/josm/data/osm/Way.java
+++ b/src/org/openstreetmap/josm/data/osm/Way.java
@@ -330,10 +330,10 @@ public final class Way extends OsmPrimitive implements IWay {
}
@Override
- public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
+ public boolean hasEqualSemanticAttributes(OsmPrimitive other, boolean testInterestingTagsOnly) {
if (!(other instanceof Way))
return false;
- if (!super.hasEqualSemanticAttributes(other))
+ if (!super.hasEqualSemanticAttributes(other, testInterestingTagsOnly))
return false;
Way w = (Way) other;
if (getNodesCount() != w.getNodesCount()) return false;
diff --git a/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java b/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
index db02783..e10f693 100644
--- a/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
+++ b/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
@@ -266,7 +266,7 @@ public class StyledMapRenderer extends AbstractMapRenderer {
}
/* can be set by tests, if detailed benchmark data is requested */
- public BenchmarkData benchmarkData = null;
+ public BenchmarkData benchmarkData;
private static Map<Font, Boolean> IS_GLYPH_VECTOR_DOUBLE_TRANSLATION_BUG = new HashMap<>();
diff --git a/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java b/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java
index 1e3583b..a75afb5 100644
--- a/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java
+++ b/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java
@@ -41,7 +41,7 @@ public class PreferencesReader {
private final SortedMap<String, Setting<?>> settings = new TreeMap<>();
private XMLStreamReader parser;
- private int version = 0;
+ private int version;
private Reader reader;
private File file;
diff --git a/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java b/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java
index b779089..347708b 100644
--- a/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java
+++ b/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java
@@ -109,7 +109,7 @@ public class AlbersEqualArea extends AbstractProj {
double sinphi = Math.sin(phi1);
double cosphi = Math.cos(phi1);
double n = sinphi;
- boolean secant = (Math.abs(phi1 - phi2) >= EPSILON);
+ boolean secant = Math.abs(phi1 - phi2) >= EPSILON;
double m1 = msfn(sinphi, cosphi);
double q1 = qsfn(sinphi);
if (secant) { // secant cone
@@ -205,8 +205,8 @@ public class AlbersEqualArea extends AbstractProj {
final double one_es = 1 - e2;
if (e >= EPSILON) {
final double con = e * sinphi;
- return (one_es * (sinphi / (1. - con*con) -
- (0.5/e) * Math.log((1.-con) / (1.+con))));
+ return one_es * (sinphi / (1. - con*con) -
+ (0.5/e) * Math.log((1.-con) / (1.+con)));
} else {
return sinphi + sinphi;
}
diff --git a/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java b/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java
index e1fc6e0..e629d3d 100644
--- a/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java
+++ b/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java
@@ -34,7 +34,7 @@ public class DoubleStereographic extends AbstractProj {
private double n;
private double c;
private double chi0;
- private double R;
+ private double r;
private static final double EPSILON = 1e-12;
@@ -60,7 +60,7 @@ public class DoubleStereographic extends AbstractProj {
private void initialize(double lat_0) {
double phi0 = toRadians(lat_0);
double e2 = ellps.e2;
- R = sqrt(1-e2) / (1 - e2*pow(sin(phi0), 2));
+ r = sqrt(1-e2) / (1 - e2*pow(sin(phi0), 2));
n = sqrt(1 + ellps.eb2 * pow(cos(phi0), 4));
double S1 = (1 + sin(phi0)) / (1 - sin(phi0));
double S2 = (1 - e * sin(phi0)) / (1 + e * sin(phi0));
@@ -79,19 +79,19 @@ public class DoubleStereographic extends AbstractProj {
double w = c * pow(Sa * pow(Sb, e), n);
double chi = asin((w - 1) / (w + 1));
double B = 1 + sin(chi) * sin(chi0) + cos(chi) * cos(chi0) * cos(Lambda);
- double x = 2 * R * cos(chi) * sin(Lambda) / B;
- double y = 2 * R * (sin(chi) * cos(chi0) - cos(chi) * sin(chi0) * cos(Lambda)) / B;
+ double x = 2 * r * cos(chi) * sin(Lambda) / B;
+ double y = 2 * r * (sin(chi) * cos(chi0) - cos(chi) * sin(chi0) * cos(Lambda)) / B;
return new double[] {x, y};
}
@Override
public double[] invproject(double x, double y) {
double e2 = ellps.e2;
- double g = 2 * R * tan(PI/4 - chi0/2);
- double h = 4 * R * tan(chi0) + g;
+ double g = 2 * r * tan(PI/4 - chi0/2);
+ double h = 4 * r * tan(chi0) + g;
double i = atan(x/(h + y));
double j = atan(x/(g - y)) - i;
- double chi = chi0 + 2 * atan((y - x * tan(j/2)) / (2 * R));
+ double chi = chi0 + 2 * atan((y - x * tan(j/2)) / (2 * r));
double Lambda = j + 2*i;
double lambda = Lambda / n;
double psi = 0.5 * log((1 + sin(chi)) / (c*(1 - sin(chi)))) / n;
diff --git a/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java b/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java
index 0469935..577f090 100644
--- a/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java
+++ b/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java
@@ -56,7 +56,7 @@ public class LambertAzimuthalEqualArea extends AbstractProj {
private double sinb1, cosb1, xmf, ymf, mmf, qp, dd, rq;
/** Coefficients for authalic latitude. */
- private double APA0, APA1, APA2;
+ private double aPA0, aPA1, aPA2;
private double latitudeOfOrigin;
@@ -94,9 +94,9 @@ public class LambertAzimuthalEqualArea extends AbstractProj {
*/
final double es2 = e2 * e2;
final double es3 = e2 * es2;
- APA0 = P02 * es3 + P01 * es2 + P00 * e2;
- APA1 = P11 * es3 + P10 * es2;
- APA2 = P20 * es3;
+ aPA0 = P02 * es3 + P01 * es2 + P00 * e2;
+ aPA1 = P11 * es3 + P10 * es2;
+ aPA2 = P20 * es3;
final double sinphi;
qp = qsfn(1);
@@ -257,8 +257,8 @@ public class LambertAzimuthalEqualArea extends AbstractProj {
private double qsfn(final double sinphi) {
if (e >= EPSILON) {
final double con = e * sinphi;
- return ((1.0 - e2) * (sinphi / (1.0 - con*con) -
- (0.5 / e) * Math.log((1.0 - con) / (1.0 + con))));
+ return (1.0 - e2) * (sinphi / (1.0 - con*con) -
+ (0.5 / e) * Math.log((1.0 - con) / (1.0 + con)));
} else {
return sinphi + sinphi;
}
@@ -271,7 +271,7 @@ public class LambertAzimuthalEqualArea extends AbstractProj {
*/
private double authlat(final double beta) {
final double t = beta + beta;
- return beta + APA0 * Math.sin(t) + APA1 * Math.sin(t+t) + APA2 * Math.sin(t+t+t);
+ return beta + aPA0 * Math.sin(t) + aPA1 * Math.sin(t+t) + aPA2 * Math.sin(t+t+t);
}
@Override
diff --git a/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java b/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java
index c9d343a..263863c 100644
--- a/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java
+++ b/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java
@@ -158,18 +158,18 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
/**
* Constants used in the transformation.
*/
- private double B, A, E;
+ private double b, a, e;
/**
- * Convenience values equal to {@link #A} / {@link #B},
- * {@link #A}×{@link #B}, and {@link #B} / {@link #A}.
+ * Convenience values equal to {@link #a} / {@link #b},
+ * {@link #a}×{@link #b}, and {@link #b} / {@link #a}.
*/
- private double ArB, AB, BrA;
+ private double arb, ab, bra;
/**
* <var>v</var> values when the input latitude is a pole.
*/
- private double v_pole_n, v_pole_s;
+ private double vPoleN, vPoleS;
/**
* Sine and Cosine values for gamma0 (the angle between the meridian
@@ -188,7 +188,7 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
* <var>u</var> value (in (U,V) coordinate system) of the central point. Used in
* the oblique mercator case. The <var>v</var> value of the central point is 0.0.
*/
- private double u_c;
+ private double uc;
/**
* Central longitude in <u>radians</u>. Default value is 0, the Greenwich meridian.
@@ -226,20 +226,20 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
double cosph0 = Math.cos(latCenter);
final double con = 1. - e2 * sinph0 * sinph0;
double temp = cosph0 * cosph0;
- B = Math.sqrt(1.0 + e2 * (temp * temp) / (1.0 - e2));
- A = B * com / con;
- final double D = B * com / (cosph0 * Math.sqrt(con));
- double F = D * D - 1.0;
- if (F < 0.0) {
- F = 0.0;
+ b = Math.sqrt(1.0 + e2 * (temp * temp) / (1.0 - e2));
+ a = b * com / con;
+ final double d = b * com / (cosph0 * Math.sqrt(con));
+ double f = d * d - 1.0;
+ if (f < 0.0) {
+ f = 0.0;
} else {
- F = Math.sqrt(F);
+ f = Math.sqrt(f);
if (latCenter < 0.0) {
- F = -F;
+ f = -f;
}
}
- E = F += D;
- E = F * Math.pow(tsfn(latCenter, sinph0), B);
+ e = f += d;
+ e = f * Math.pow(tsfn(latCenter, sinph0), b);
/*
* Computes the constants that depend on the "twoPoint" vs "azimuth" case. In the
@@ -275,12 +275,12 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
/*
* The coefficients for the "two points" case.
*/
- final double H = Math.pow(tsfn(lat1, Math.sin(lat1)), B);
- final double L = Math.pow(tsfn(lat2, Math.sin(lat2)), B);
- final double Fp = E / H;
- final double P = (L - H) / (L + H);
- double J = E * E;
- J = (J - L * H) / (J + L * H);
+ final double h = Math.pow(tsfn(lat1, Math.sin(lat1)), b);
+ final double l = Math.pow(tsfn(lat2, Math.sin(lat2)), b);
+ final double fp = e / h;
+ final double p = (l - h) / (l + h);
+ double j = e * e;
+ j = (j - l * h) / (j + l * h);
double diff = lon1 - lon2;
if (diff < -Math.PI) {
lon2 -= 2.0 * Math.PI;
@@ -288,10 +288,10 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
lon2 += 2.0 * Math.PI;
}
centralMeridian = normalizeLonRad(0.5 * (lon1 + lon2) -
- Math.atan(J * Math.tan(0.5 * B * (lon1 - lon2)) / P) / B);
- gamma0 = Math.atan(2.0 * Math.sin(B * normalizeLonRad(lon1 - centralMeridian)) /
- (Fp - 1.0 / Fp));
- azimuth = Math.asin(D * Math.sin(gamma0));
+ Math.atan(j * Math.tan(0.5 * b * (lon1 - lon2)) / p) / b);
+ gamma0 = Math.atan(2.0 * Math.sin(b * normalizeLonRad(lon1 - centralMeridian)) /
+ (fp - 1.0 / fp));
+ azimuth = Math.asin(d * Math.sin(gamma0));
rectifiedGridAngle = azimuth;
} else {
if (params.lonc == null)
@@ -314,16 +314,16 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
} else {
rectifiedGridAngle = azimuth;
}
- gamma0 = Math.asin(Math.sin(azimuth) / D);
+ gamma0 = Math.asin(Math.sin(azimuth) / d);
// Check for asin(+-1.00000001)
- temp = 0.5 * (F - 1.0 / F) * Math.tan(gamma0);
+ temp = 0.5 * (f - 1.0 / f) * Math.tan(gamma0);
if (Math.abs(temp) > 1.0) {
if (Math.abs(Math.abs(temp) - 1.0) > EPSILON) {
throw new ProjectionConfigurationException(tr("error in initialization"));
}
temp = (temp > 0) ? 1.0 : -1.0;
}
- centralMeridian = lonCenter - Math.asin(temp) / B;
+ centralMeridian = lonCenter - Math.asin(temp) / b;
}
/*
@@ -333,27 +333,27 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
cosgamma0 = Math.cos(gamma0);
sinrot = Math.sin(rectifiedGridAngle);
cosrot = Math.cos(rectifiedGridAngle);
- ArB = A / B;
- AB = A * B;
- BrA = B / A;
- v_pole_n = ArB * Math.log(Math.tan(0.5 * (Math.PI/2.0 - gamma0)));
- v_pole_s = ArB * Math.log(Math.tan(0.5 * (Math.PI/2.0 + gamma0)));
+ arb = a / b;
+ ab = a * b;
+ bra = b / a;
+ vPoleN = arb * Math.log(Math.tan(0.5 * (Math.PI/2.0 - gamma0)));
+ vPoleS = arb * Math.log(Math.tan(0.5 * (Math.PI/2.0 + gamma0)));
boolean hotine = params.no_off != null && params.no_off;
if (hotine) {
- u_c = 0.0;
+ uc = 0.0;
} else {
if (Math.abs(Math.abs(azimuth) - Math.PI/2.0) < EPSILON_LATITUDE) {
// lonCenter == null in twoPoint, but azimuth cannot be 90 here (lat1 != lat2)
if (lonCenter == null) {
throw new ProjectionConfigurationException("assertion error");
}
- u_c = A * (lonCenter - centralMeridian);
+ uc = a * (lonCenter - centralMeridian);
} else {
- double u_c = Math.abs(ArB * Math.atan2(Math.sqrt(D * D - 1.0), Math.cos(azimuth)));
+ double uC = Math.abs(arb * Math.atan2(Math.sqrt(d * d - 1.0), Math.cos(azimuth)));
if (latCenter < 0.0) {
- u_c = -u_c;
+ uC = -uC;
}
- this.u_c = u_c;
+ this.uc = uC;
}
}
}
@@ -366,27 +366,27 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
public double[] project(double y, double x) {
double u, v;
if (Math.abs(Math.abs(y) - Math.PI/2.0) > EPSILON) {
- double Q = E / Math.pow(tsfn(y, Math.sin(y)), B);
- double temp = 1.0 / Q;
- double S = 0.5 * (Q - temp);
- double V = Math.sin(B * x);
- double U = (S * singamma0 - V * cosgamma0) / (0.5 * (Q + temp));
+ double q = e / Math.pow(tsfn(y, Math.sin(y)), b);
+ double temp = 1.0 / q;
+ double s = 0.5 * (q - temp);
+ double V = Math.sin(b * x);
+ double U = (s * singamma0 - V * cosgamma0) / (0.5 * (q + temp));
if (Math.abs(Math.abs(U) - 1.0) < EPSILON) {
v = 0; // this is actually an error and should be reported to the caller somehow
} else {
- v = 0.5 * ArB * Math.log((1.0 - U) / (1.0 + U));
+ v = 0.5 * arb * Math.log((1.0 - U) / (1.0 + U));
}
- temp = Math.cos(B * x);
+ temp = Math.cos(b * x);
if (Math.abs(temp) < EPSILON_LATITUDE) {
- u = AB * x;
+ u = ab * x;
} else {
- u = ArB * Math.atan2((S * cosgamma0 + V * singamma0), temp);
+ u = arb * Math.atan2(s * cosgamma0 + V * singamma0, temp);
}
} else {
- v = y > 0 ? v_pole_n : v_pole_s;
- u = ArB * y;
+ v = y > 0 ? vPoleN : vPoleS;
+ u = arb * y;
}
- u -= u_c;
+ u -= uc;
x = v * cosrot + u * sinrot;
y = u * cosrot - v * sinrot;
return new double[] {x, y};
@@ -395,19 +395,19 @@ public class ObliqueMercator extends AbstractProj implements ICentralMeridianPro
@Override
public double[] invproject(double x, double y) {
double v = x * cosrot - y * sinrot;
- double u = y * cosrot + x * sinrot + u_c;
- double Qp = Math.exp(-BrA * v);
- double temp = 1.0 / Qp;
- double Sp = 0.5 * (Qp - temp);
- double Vp = Math.sin(BrA * u);
- double Up = (Vp * cosgamma0 + Sp * singamma0) / (0.5 * (Qp + temp));
- if (Math.abs(Math.abs(Up) - 1.0) < EPSILON) {
+ double u = y * cosrot + x * sinrot + uc;
+ double qp = Math.exp(-bra * v);
+ double temp = 1.0 / qp;
+ double sp = 0.5 * (qp - temp);
+ double vp = Math.sin(bra * u);
+ double up = (vp * cosgamma0 + sp * singamma0) / (0.5 * (qp + temp));
+ if (Math.abs(Math.abs(up) - 1.0) < EPSILON) {
x = 0.0;
- y = Up < 0.0 ? -Math.PI / 2.0 : Math.PI / 2.0;
+ y = up < 0.0 ? -Math.PI / 2.0 : Math.PI / 2.0;
} else {
- y = Math.pow(E / Math.sqrt((1. + Up) / (1. - Up)), 1.0 / B); //calculate t
+ y = Math.pow(e / Math.sqrt((1. + up) / (1. - up)), 1.0 / b); //calculate t
y = cphi2(y);
- x = -Math.atan2((Sp * cosgamma0 - Vp * singamma0), Math.cos(BrA * u)) / B;
+ x = -Math.atan2(sp * cosgamma0 - vp * singamma0, Math.cos(bra * u)) / b;
}
return new double[] {y, x};
}
diff --git a/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java b/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java
index 2102b76..ccdc860 100644
--- a/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java
+++ b/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java
@@ -160,7 +160,7 @@ public class PolarStereographic extends AbstractProj {
final double phi = (Math.PI/2) - 2.0*Math.atan(t*Math.pow((1-esinphi)/(1+esinphi), halfe));
if (Math.abs(phi-phi0) < ITERATION_TOLERANCE) {
x = (Math.abs(rho) < EPSILON) ? 0.0 : Math.atan2(x, -y);
- y = (southPole) ? -phi : phi;
+ y = southPole ? -phi : phi;
break;
}
phi0 = phi;
diff --git a/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java b/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
index 42b3c01..fbf0408 100644
--- a/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
+++ b/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
@@ -136,12 +136,12 @@ public class TransverseMercator extends AbstractProj {
double n = eb2 * cosphi*cosphi;
/* NOTE: meridinal distance at latitudeOfOrigin is always 0 */
- y = (mlfn(y, sinphi, cosphi) - ml0 +
+ y = mlfn(y, sinphi, cosphi) - ml0 +
sinphi * al * x *
FC2 * (1.0 +
FC4 * als * (5.0 - t + n*(9.0 + 4.0*n) +
FC6 * als * (61.0 + t * (t - 58.0) + n*(270.0 - 330.0*t) +
- FC8 * als * (1385.0 + t * (t*(543.0 - t) - 3111.0))))));
+ FC8 * als * (1385.0 + t * (t*(543.0 - t) - 3111.0)))));
x = al*(FC1 + FC3 * als*(1.0 - t + n +
FC5 * als * (5.0 + t*(t - 18.0) + n*(14.0 - 58.0*t) +
diff --git a/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java b/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
index a407506..ded9fec 100644
--- a/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
+++ b/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
@@ -1564,7 +1564,7 @@ public final class DomainValidator extends AbstractValidator {
* This field does not need to be volatile since it is only accessed from
* synchronized methods.
*/
- private static boolean inUse = false;
+ private static boolean inUse;
/*
* These arrays are mutable, but they don't need to be volatile.
diff --git a/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java b/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
index 502ff3a..aa34a39 100644
--- a/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
+++ b/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
@@ -382,6 +382,7 @@ public class DuplicateNode extends Test {
public Command fixError(TestError testError) {
if (!isFixable(testError)) return null;
// Diamond operator does not work with Java 9 here
+ @SuppressWarnings("unused")
Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>(testError.getPrimitives());
Set<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class));
diff --git a/src/org/openstreetmap/josm/data/validation/util/Entities.java b/src/org/openstreetmap/josm/data/validation/util/Entities.java
index 1d1b60d..bb5725e 100644
--- a/src/org/openstreetmap/josm/data/validation/util/Entities.java
+++ b/src/org/openstreetmap/josm/data/validation/util/Entities.java
@@ -392,7 +392,7 @@ public final class Entities {
}
}
String value = mapNameToValue.get(entityContent);
- entityValue = (value == null ? -1 : Integer.parseInt(value));
+ entityValue = value == null ? -1 : Integer.parseInt(value);
}
}
diff --git a/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java b/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
index 574071d..04769be 100644
--- a/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
+++ b/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
@@ -229,7 +229,7 @@ public final class HelpAwareOptionPane {
}
if (msg instanceof String) {
- msg = new JMultilineLabel(((String) msg), true);
+ msg = new JMultilineLabel((String) msg, true);
}
final JOptionPane pane = new JOptionPane(
diff --git a/src/org/openstreetmap/josm/gui/MapStatus.java b/src/org/openstreetmap/josm/gui/MapStatus.java
index 1b40e6f..5a61fda 100644
--- a/src/org/openstreetmap/josm/gui/MapStatus.java
+++ b/src/org/openstreetmap/josm/gui/MapStatus.java
@@ -182,7 +182,7 @@ public class MapStatus extends JPanel implements Helpful, Destroyable, Preferenc
}
/** The {@link CoordinateFormat} set in the previous update */
- private transient CoordinateFormat previousCoordinateFormat = null;
+ private transient CoordinateFormat previousCoordinateFormat;
private final ImageLabel latText = new ImageLabel("lat",
null, LatLon.SOUTH_POLE.latToString(CoordinateFormat.DEGREES_MINUTES_SECONDS).length(), PROP_BACKGROUND_COLOR.get());
private final ImageLabel lonText = new ImageLabel("lon",
diff --git a/src/org/openstreetmap/josm/gui/NavigatableComponent.java b/src/org/openstreetmap/josm/gui/NavigatableComponent.java
index 0547032..af82068 100644
--- a/src/org/openstreetmap/josm/gui/NavigatableComponent.java
+++ b/src/org/openstreetmap/josm/gui/NavigatableComponent.java
@@ -1322,14 +1322,14 @@ public class NavigatableComponent extends JComponent implements Helpful {
*
* @param osm node to check
* @param p point clicked
- * @param use_selected whether to prefer selected nodes
+ * @param useSelected whether to prefer selected nodes
* @return true, if the node fulfills the properties of the function body
*/
- private boolean isPrecedenceNode(Node osm, Point p, boolean use_selected) {
+ private boolean isPrecedenceNode(Node osm, Point p, boolean useSelected) {
if (osm != null) {
- if (!(p.distanceSq(getPoint2D(osm)) > (4)*(4))) return true;
+ if (p.distanceSq(getPoint2D(osm)) <= (4*4)) return true;
if (osm.isTagged()) return true;
- if (use_selected && osm.isSelected()) return true;
+ if (useSelected && osm.isSelected()) return true;
}
return false;
}
diff --git a/src/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferable.java b/src/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferable.java
index 8bd6669..cd91a24 100644
--- a/src/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferable.java
+++ b/src/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferable.java
@@ -77,10 +77,10 @@ public class PrimitiveTransferable implements Transferable {
protected String getStringData() {
final StringBuilder sb = new StringBuilder();
for (OsmPrimitive primitive : primitives) {
- sb.append(primitive.getType());
- sb.append(" ").append(primitive.getUniqueId());
- sb.append(" # ").append(primitive.getDisplayName(DefaultNameFormatter.getInstance()));
- sb.append("\n");
+ sb.append(primitive.getType())
+ .append(' ').append(primitive.getUniqueId())
+ .append(" # ").append(primitive.getDisplayName(DefaultNameFormatter.getInstance()))
+ .append('\n');
}
return sb.toString().replace("\u200E", "").replace("\u200F", "");
}
diff --git a/src/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferable.java b/src/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferable.java
index 3376331..46dc5d2 100644
--- a/src/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferable.java
+++ b/src/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferable.java
@@ -77,11 +77,11 @@ public class RelationMemberTransferable implements Transferable {
protected String getStringData() {
final StringBuilder sb = new StringBuilder();
for (RelationMember member : members) {
- sb.append(member.getType());
- sb.append(" ").append(member.getUniqueId());
- sb.append(" ").append(member.getRole());
- sb.append(" # ").append(member.getMember().getDisplayName(DefaultNameFormatter.getInstance()));
- sb.append("\n");
+ sb.append(member.getType())
+ .append(' ').append(member.getUniqueId())
+ .append(' ').append(member.getRole())
+ .append(" # ").append(member.getMember().getDisplayName(DefaultNameFormatter.getInstance()))
+ .append('\n');
}
return sb.toString().replace("\u200E", "").replace("\u200F", "");
}
diff --git a/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java b/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
index 6835968..127a0d3 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
@@ -97,7 +97,7 @@ public class FilterDialog extends ToggleDialog implements DataSetListener {
= Shortcut.registerShortcut("core_multikey:hidingFilter", tr("Multikey: {0}", tr("Hide filter")),
KeyEvent.VK_H, Shortcut.ALT_CTRL);
- protected final String[] columnToolTips = {
+ protected static final String[] COLUMN_TOOLTIPS = {
Main.platform.makeTooltip(tr("Enable filter"), ENABLE_FILTER_SHORTCUT),
Main.platform.makeTooltip(tr("Hiding filter"), HIDING_FILTER_SHORTCUT),
null,
@@ -115,7 +115,7 @@ public class FilterDialog extends ToggleDialog implements DataSetListener {
java.awt.Point p = e.getPoint();
int index = columnModel.getColumnIndexAtX(p.x);
int realIndex = columnModel.getColumn(index).getModelIndex();
- return columnToolTips[realIndex];
+ return COLUMN_TOOLTIPS[realIndex];
}
};
}
diff --git a/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java b/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
index 6a69388..54828f0 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
@@ -38,7 +38,6 @@ import org.openstreetmap.josm.gui.ExtendedDialog;
import org.openstreetmap.josm.gui.NavigatableComponent;
import org.openstreetmap.josm.gui.layer.OsmDataLayer;
import org.openstreetmap.josm.gui.mappaint.Cascade;
-import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement;
import org.openstreetmap.josm.gui.mappaint.ElemStyles;
import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
import org.openstreetmap.josm.gui.mappaint.MultiCascade;
@@ -46,7 +45,7 @@ import org.openstreetmap.josm.gui.mappaint.StyleCache;
import org.openstreetmap.josm.gui.mappaint.StyleElementList;
import org.openstreetmap.josm.gui.mappaint.StyleSource;
import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
-import org.openstreetmap.josm.gui.mappaint.xml.XmlStyleSource;
+import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement;
import org.openstreetmap.josm.gui.util.GuiHelper;
import org.openstreetmap.josm.gui.widgets.JosmTextArea;
import org.openstreetmap.josm.tools.GBC;
@@ -422,9 +421,7 @@ public class InspectPrimitiveDialog extends ExtendedDialog {
}
private static String getSort(StyleSource s) {
- if (s instanceof XmlStyleSource) {
- return tr("xml");
- } else if (s instanceof MapCSSStyleSource) {
+ if (s instanceof MapCSSStyleSource) {
return tr("mapcss");
} else {
return tr("unknown");
diff --git a/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java b/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
index 3a7c880..af5f61c 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
@@ -887,7 +887,7 @@ public class LayerListDialog extends ToggleDialog {
@Override
public boolean supportLayers(List<Layer> layers) {
- if (layers.size() < 1) {
+ if (layers.isEmpty()) {
return false;
} else {
final Layer firstLayer = layers.get(0);
diff --git a/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java b/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
index cdf244a..3c1e6d0 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
@@ -161,7 +161,7 @@ public class OsmIdSelectionDialog extends ExtendedDialog implements WindowListen
* @param cbHistory the {@link HistoryComboBox} to which the history is restored to
*/
protected void restorePrimitivesHistory(HistoryComboBox cbHistory) {
- java.util.List<String> cmtHistory = new LinkedList<>(
+ List<String> cmtHistory = new LinkedList<>(
Main.pref.getCollection(getClass().getName() + ".primitivesHistory", new LinkedList<String>()));
// we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
Collections.reverse(cmtHistory);
diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
index dafc8f0..a19d093 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
@@ -990,7 +990,7 @@ implements SelectionChangedListener, MapView.EditLayerChangeListener, DataSetLis
if (rowCount > rows.length) {
if (nextKeyIndex == rows[rows.length-1]) {
// no gap found, pick next or previous key in list
- nextKeyIndex = (nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1);
+ nextKeyIndex = nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1;
} else {
// gap found
nextKeyIndex++;
@@ -1400,7 +1400,7 @@ implements SelectionChangedListener, MapView.EditLayerChangeListener, DataSetLis
}
String token = new StringBuilder(t).append(val).toString();
if (consideredTokens.add(token)) {
- s.append(sep).append('(').append(t).append(SearchCompiler.buildSearchStringForTag(key, val)).append(")");
+ s.append(sep).append('(').append(t).append(SearchCompiler.buildSearchStringForTag(key, val)).append(')');
sep = " OR ";
}
}
diff --git a/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java b/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
index 7596e66..e3bf380 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
@@ -76,7 +76,7 @@ public class WayConnectionTypeCalculator {
if (!RelationSortUtils.isOneway(m) && lastWct != null) {
wct.direction = determineDirection(i-1, lastWct.direction, i);
- wct.linkPrev = (wct.direction != NONE);
+ wct.linkPrev = wct.direction != NONE;
}
}
diff --git a/src/org/openstreetmap/josm/gui/download/PlaceSelection.java b/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
index 4c13438..66799df 100644
--- a/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
+++ b/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
@@ -274,7 +274,7 @@ public class PlaceSelection implements DownloadSelection {
* Read characters for description.
*/
@Override
- public void characters(char[] data, int start, int length) throws org.xml.sax.SAXException {
+ public void characters(char[] data, int start, int length) throws SAXException {
if (description != null) {
description.append(data, start, length);
}
diff --git a/src/org/openstreetmap/josm/gui/help/HelpBrowser.java b/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
index 4d6937d..e47e1a0 100644
--- a/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
+++ b/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
@@ -3,6 +3,7 @@ package org.openstreetmap.josm.gui.help;
import static org.openstreetmap.josm.gui.help.HelpUtil.buildAbsoluteHelpTopic;
import static org.openstreetmap.josm.gui.help.HelpUtil.getHelpTopicEditUrl;
+import static org.openstreetmap.josm.gui.help.HelpUtil.getHelpTopicUrl;
import static org.openstreetmap.josm.tools.I18n.tr;
import java.awt.BorderLayout;
@@ -297,16 +298,16 @@ public class HelpBrowser extends JDialog implements IHelpBrowser {
* @param relativeHelpTopic the relative help topic
*/
protected void loadRelativeHelpTopic(String relativeHelpTopic) {
- String url = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.DEFAULTNOTENGLISH));
+ String url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.DEFAULTNOTENGLISH));
String content = null;
try {
content = reader.fetchHelpTopicContent(url, true);
} catch (MissingHelpContentException e) {
- url = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.BASELANGUAGE));
+ url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.BASELANGUAGE));
try {
content = reader.fetchHelpTopicContent(url, true);
} catch (MissingHelpContentException e1) {
- url = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.ENGLISH));
+ url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.ENGLISH));
try {
content = reader.fetchHelpTopicContent(url, true);
} catch (MissingHelpContentException e2) {
@@ -340,7 +341,7 @@ public class HelpBrowser extends JDialog implements IHelpBrowser {
* @param absoluteHelpTopic the absolute help topic name
*/
protected void loadAbsoluteHelpTopic(String absoluteHelpTopic) {
- String url = HelpUtil.getHelpTopicUrl(absoluteHelpTopic);
+ String url = getHelpTopicUrl(absoluteHelpTopic);
String content = null;
try {
content = reader.fetchHelpTopicContent(url, true);
diff --git a/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java b/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
index ad9d294..653ee0e 100644
--- a/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
+++ b/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
@@ -190,7 +190,7 @@ public class CoordinateInfoViewer extends JPanel {
}
private static class Updater {
- private final transient HistoryBrowserModel model;
+ private final HistoryBrowserModel model;
private final PointInTimeType role;
protected Updater(HistoryBrowserModel model, PointInTimeType role) {
diff --git a/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java b/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
index ce0da83..dec57af 100644
--- a/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
+++ b/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
@@ -1614,7 +1614,7 @@ implements ImageObserver, TileLoaderListener, ZoomChangeListener {
@Override
public Action[] getMenuEntries() {
- ArrayList<Action> actions = new ArrayList<Action>();
+ ArrayList<Action> actions = new ArrayList<>();
actions.addAll(Arrays.asList(getLayerListEntries()));
actions.addAll(Arrays.asList(getCommonEntries()));
actions.add(SeparatorLayerAction.INSTANCE);
diff --git a/src/org/openstreetmap/josm/gui/layer/Layer.java b/src/org/openstreetmap/josm/gui/layer/Layer.java
index c2398b0..26842aa 100644
--- a/src/org/openstreetmap/josm/gui/layer/Layer.java
+++ b/src/org/openstreetmap/josm/gui/layer/Layer.java
@@ -137,7 +137,7 @@ public abstract class Layer implements Destroyable, MapViewPaintable, Projection
/**
* This is set if user renamed this layer.
*/
- private boolean renamed = false;
+ private boolean renamed;
/**
* If a file is associated with this layer, this variable should be set to it.
diff --git a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
index d4c4d94..55d352b 100644
--- a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
+++ b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
@@ -145,7 +145,7 @@ public class OsmDataLayer extends AbstractModifiableLayer implements Listener, S
* @since 9668
*/
public ArrayList<Relation> getRecentRelations() {
- ArrayList<Relation> list = new ArrayList<Relation>(recentRelations.keySet());
+ ArrayList<Relation> list = new ArrayList<>(recentRelations.keySet());
Collections.reverse(list);
return list;
}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java b/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
index e6f20ec..93a7609 100644
--- a/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
+++ b/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
@@ -17,6 +17,7 @@ import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import javax.swing.ImageIcon;
+import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import org.openstreetmap.josm.Main;
@@ -24,16 +25,18 @@ import org.openstreetmap.josm.data.coor.LatLon;
import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.josm.data.osm.Node;
import org.openstreetmap.josm.data.osm.Tag;
+import org.openstreetmap.josm.gui.HelpAwareOptionPane;
import org.openstreetmap.josm.gui.PleaseWaitRunnable;
+import org.openstreetmap.josm.gui.help.HelpUtil;
import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
import org.openstreetmap.josm.gui.mappaint.styleelement.MapImage;
import org.openstreetmap.josm.gui.mappaint.styleelement.NodeElement;
import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement;
-import org.openstreetmap.josm.gui.mappaint.xml.XmlStyleSource;
import org.openstreetmap.josm.gui.preferences.SourceEntry;
import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference.MapPaintPrefHelper;
import org.openstreetmap.josm.gui.progress.ProgressMonitor;
import org.openstreetmap.josm.io.CachedFile;
+import org.openstreetmap.josm.io.IllegalDataException;
import org.openstreetmap.josm.tools.ImageProvider;
import org.openstreetmap.josm.tools.Utils;
@@ -46,6 +49,10 @@ import org.openstreetmap.josm.tools.Utils;
*/
public final class MapPaintStyles {
+ /** To remove in November 2016 */
+ private static final String XML_STYLE_MIME_TYPES =
+ "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
+
private static ElemStyles styles = new ElemStyles();
/**
@@ -279,12 +286,10 @@ public final class MapPaintStyles {
}
private static StyleSource fromSourceEntry(SourceEntry entry) {
- CachedFile cf = null;
- try {
- Set<String> mimes = new HashSet<>();
- mimes.addAll(Arrays.asList(XmlStyleSource.XML_STYLE_MIME_TYPES.split(", ")));
- mimes.addAll(Arrays.asList(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES.split(", ")));
- cf = new CachedFile(entry.url).setHttpAccept(Utils.join(", ", mimes));
+ // TODO: Method to clean up in November 2016: remove XML detection completely
+ Set<String> mimes = new HashSet<>(Arrays.asList(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES.split(", ")));
+ mimes.addAll(Arrays.asList(XML_STYLE_MIME_TYPES.split(", ")));
+ try (CachedFile cf = new CachedFile(entry.url).setHttpAccept(Utils.join(", ", mimes))) {
String zipEntryPath = cf.findZipEntryPath("mapcss", "style");
if (zipEntryPath != null) {
entry.isZip = true;
@@ -292,41 +297,39 @@ public final class MapPaintStyles {
return new MapCSSStyleSource(entry);
}
zipEntryPath = cf.findZipEntryPath("xml", "style");
- if (zipEntryPath != null)
- return new XmlStyleSource(entry);
+ if (zipEntryPath != null || Utils.hasExtension(entry.url, "xml"))
+ throw new IllegalDataException("XML style");
if (Utils.hasExtension(entry.url, "mapcss"))
return new MapCSSStyleSource(entry);
- if (Utils.hasExtension(entry.url, "xml"))
- return new XmlStyleSource(entry);
- else {
- try (InputStreamReader reader = new InputStreamReader(cf.getInputStream(), StandardCharsets.UTF_8)) {
- WHILE: while (true) {
- int c = reader.read();
- switch (c) {
- case -1:
- break WHILE;
- case ' ':
- case '\t':
- case '\n':
- case '\r':
- continue;
- case '<':
- return new XmlStyleSource(entry);
- default:
- return new MapCSSStyleSource(entry);
- }
+ try (InputStreamReader reader = new InputStreamReader(cf.getInputStream(), StandardCharsets.UTF_8)) {
+ WHILE: while (true) {
+ int c = reader.read();
+ switch (c) {
+ case -1:
+ break WHILE;
+ case ' ':
+ case '\t':
+ case '\n':
+ case '\r':
+ continue;
+ case '<':
+ throw new IllegalDataException("XML style");
+ default:
+ return new MapCSSStyleSource(entry);
}
}
- Main.warn("Could not detect style type. Using default (xml).");
- return new XmlStyleSource(entry);
}
+ Main.warn("Could not detect style type. Using default (mapcss).");
+ return new MapCSSStyleSource(entry);
} catch (IOException e) {
Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString()));
Main.error(e);
- } finally {
- if (cf != null) {
- cf.close();
- }
+ } catch (IllegalDataException e) {
+ String msg = tr("JOSM does no longer support mappaint styles written in the old XML format.\nPlease update ''{0}'' to MapCSS",
+ entry.url);
+ Main.error(msg);
+ HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Warning"), JOptionPane.WARNING_MESSAGE,
+ HelpUtil.ht("/Styles/MapCSSImplementation"));
}
return null;
}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java b/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
index 6f24b4e..8fa8b8e 100644
--- a/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
+++ b/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
@@ -20,7 +20,7 @@ public final class StyleCache {
private static final int SELECTED = 1;
@SuppressWarnings("unchecked")
- private final DividedScale<StyleElementList>[] states = (DividedScale<StyleElementList>[]) new DividedScale[2];
+ private final DividedScale<StyleElementList>[] states = new DividedScale[2];
private StyleCache(StyleCache sc) {
states[0] = sc.states[0];
diff --git a/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java b/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
index 783791f..c27f542 100644
--- a/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
+++ b/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
@@ -91,7 +91,7 @@ public interface StyleSetting {
}
public void setValue(Object o) {
- if (o == null || !(o instanceof Boolean)) {
+ if (!(o instanceof Boolean)) {
throw new IllegalArgumentException();
}
boolean b = (Boolean) o;
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java b/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java
deleted file mode 100644
index 7728a21..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import java.awt.Color;
-
-import org.openstreetmap.josm.gui.mappaint.Range;
-
-public class AreaPrototype extends Prototype {
- public Color color;
- public boolean closed; // if true, it does not apply to unclosed ways
-
- public AreaPrototype(AreaPrototype a, Range range) {
- super(range);
- this.color = a.color;
- this.closed = a.closed;
- this.priority = a.priority;
- this.conditions = a.conditions;
- }
-
- public AreaPrototype() {
- init();
- }
-
- public final void init() {
- priority = 0;
- range = Range.ZERO_TO_INFINITY;
- closed = false;
- color = null;
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java b/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java
deleted file mode 100644
index 34ff2b8..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
-import org.openstreetmap.josm.gui.mappaint.Range;
-
-public class IconPrototype extends Prototype {
-
- public IconReference icon;
- public Boolean annotate;
-
- public IconPrototype(IconPrototype i, Range range) {
- super(range);
- this.icon = i.icon;
- this.annotate = i.annotate;
- this.priority = i.priority;
- this.conditions = i.conditions;
- }
-
- /**
- * Constructs a new {@code IconPrototype}.
- */
- public IconPrototype() {
- init();
- }
-
- public final void init() {
- priority = 0;
- range = Range.ZERO_TO_INFINITY;
- icon = null;
- annotate = null;
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java b/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java
deleted file mode 100644
index 3d752d5..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java
+++ /dev/null
@@ -1,90 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import java.awt.Color;
-import java.util.List;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
-import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
-import org.openstreetmap.josm.gui.mappaint.Range;
-import org.openstreetmap.josm.tools.I18n;
-
-public class LinePrototype extends Prototype {
-
- protected int width;
- public Integer realWidth; // the real width of this line in meter
- public Color color;
- protected List<Float> dashed;
- public Color dashedColor;
-
- public LinePrototype(LinePrototype s, Range range) {
- super(range);
- this.width = s.width;
- this.realWidth = s.realWidth;
- this.color = s.color;
- this.dashed = s.dashed;
- this.dashedColor = s.dashedColor;
- this.priority = s.priority;
- this.conditions = s.conditions;
- }
-
- /**
- * Constructs a new {@code LinePrototype}.
- */
- public LinePrototype() {
- init();
- }
-
- public void init() {
- priority = 0;
- range = Range.ZERO_TO_INFINITY;
- width = -1;
- realWidth = null;
- dashed = null;
- dashedColor = null;
- color = PaintColors.UNTAGGED.get();
- }
-
- public List<Float> getDashed() {
- return dashed;
- }
-
- public void setDashed(List<Float> dashed) {
- if (dashed == null || dashed.isEmpty()) {
- this.dashed = null;
- return;
- }
-
- boolean found = false;
- for (Float f : dashed) {
- if (f == null) {
- this.dashed = null;
- return;
- }
- if (f > 0) {
- found = true;
- }
- if (f < 0) {
- Main.error(I18n.tr("Illegal dash pattern, values must be positive"));
- this.dashed = null;
- return;
- }
- }
- if (found) {
- this.dashed = dashed;
- } else {
- Main.error(I18n.tr("Illegal dash pattern, at least one value must be > 0"));
- }
- }
-
- public int getWidth() {
- if (width == -1)
- return MapPaintSettings.INSTANCE.getDefaultSegmentWidth();
- return width;
- }
-
- public void setWidth(int width) {
- this.width = width;
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java b/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java
deleted file mode 100644
index d345c1d..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import org.openstreetmap.josm.gui.mappaint.Range;
-
-public class LinemodPrototype extends LinePrototype implements Comparable<LinemodPrototype> {
-
- public enum WidthMode { ABSOLUTE, PERCENT, OFFSET }
-
- public WidthMode widthMode;
- public boolean over;
-
- public LinemodPrototype(LinemodPrototype s, Range range) {
- super(s, range);
- this.over = s.over;
- this.widthMode = s.widthMode;
- }
-
- /**
- * Constructs a new {@code LinemodPrototype}.
- */
- public LinemodPrototype() {
- init();
- }
-
- @Override
- public final void init() {
- super.init();
- over = true;
- widthMode = WidthMode.ABSOLUTE;
- }
-
- /**
- * get width for overlays
- * @param ref reference width
- * @return width according to {@link #widthMode} with a minimal value of 1
- */
- public float getWidth(float ref) {
- float res;
- if (widthMode == WidthMode.ABSOLUTE) {
- res = width;
- } else if (widthMode == WidthMode.OFFSET) {
- res = ref + width;
- } else {
- if (width < 0) {
- res = 0;
- } else {
- res = ref*width/100;
- }
- }
- return res <= 0 ? 1 : res;
- }
-
- @Override
- public int getWidth() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int compareTo(LinemodPrototype s) {
- if (s.priority != priority)
- return s.priority > priority ? 1 : -1;
- if (!over && s.over)
- return -1;
- // we have no idea how to order other objects :-)
- return 0;
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java b/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java
deleted file mode 100644
index 3ac97f1..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import java.util.Collection;
-
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.OsmUtils;
-import org.openstreetmap.josm.gui.mappaint.Range;
-
-public abstract class Prototype {
- // zoom range to display the feature
- public Range range;
-
- public int priority;
- public String code;
- public Collection<XmlCondition> conditions;
-
- public Prototype(Range range) {
- this.range = range;
- }
-
- /**
- * Constructs a new {@code Prototype}.
- */
- public Prototype() {
- // Allows subclassing
- }
-
- public String getCode() {
- if (code == null) {
- if (conditions == null || conditions.isEmpty()) {
- code = "";
- } else {
- final StringBuilder sb = new StringBuilder();
- for (XmlCondition r: conditions) {
- r.appendCode(sb);
- }
- code = sb.toString();
- }
- }
- return code;
- }
-
- public boolean check(OsmPrimitive primitive) {
- if (conditions == null)
- return true;
- for (XmlCondition r : conditions) {
- String k = primitive.get(r.key);
-
- if (k == null || (r.value != null && !k.equals(r.value)))
- return false;
-
- String bv = OsmUtils.getNamedOsmBoolean(r.boolValue);
-
- if (bv != null && !bv.equals(OsmUtils.getNamedOsmBoolean(k)))
- return false;
- }
- return true;
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java b/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java
deleted file mode 100644
index 57e38c3..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import org.openstreetmap.josm.data.osm.OsmUtils;
-
-public class XmlCondition {
-
- public String key;
- public String value;
- public String boolValue;
-
- public XmlCondition() {
- init();
- }
-
- public XmlCondition(XmlCondition c) {
- key = c.key;
- value = c.value;
- boolValue = c.boolValue;
- }
-
- public String getKey() {
- if (value != null)
- return 'n' + key + '=' + value;
- else if (boolValue != null)
- return 'b' + key + '=' + OsmUtils.getNamedOsmBoolean(boolValue);
- else
- return 'x' + key;
- }
-
- public final void init() {
- key = value = boolValue = null;
- }
-
- @Override
- public String toString() {
- return "Rule["+key+','+(boolValue != null ? "b="+boolValue : "v="+value)+']';
- }
-
- public void appendCode(StringBuilder sb) {
- sb.append("[k=").append(key);
-
- if (boolValue != null)
- sb.append(",b=").append(boolValue);
- else
- sb.append(",v=").append(value);
-
- sb.append(']');
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java b/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
deleted file mode 100644
index c1b6b52..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
+++ /dev/null
@@ -1,381 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.OsmUtils;
-import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.gui.mappaint.Cascade;
-import org.openstreetmap.josm.gui.mappaint.Keyword;
-import org.openstreetmap.josm.gui.mappaint.MultiCascade;
-import org.openstreetmap.josm.gui.mappaint.Range;
-import org.openstreetmap.josm.gui.mappaint.StyleKeys;
-import org.openstreetmap.josm.gui.mappaint.StyleSource;
-import org.openstreetmap.josm.gui.preferences.SourceEntry;
-import org.openstreetmap.josm.io.CachedFile;
-import org.openstreetmap.josm.tools.Utils;
-import org.openstreetmap.josm.tools.XmlObjectParser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class XmlStyleSource extends StyleSource implements StyleKeys {
-
- /**
- * The accepted MIME types sent in the HTTP Accept header.
- * @since 6867
- */
- public static final String XML_STYLE_MIME_TYPES =
- "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
-
- protected final Map<String, IconPrototype> icons = new HashMap<>();
- protected final Map<String, LinePrototype> lines = new HashMap<>();
- protected final Map<String, LinemodPrototype> modifiers = new HashMap<>();
- protected final Map<String, AreaPrototype> areas = new HashMap<>();
- protected final List<IconPrototype> iconsList = new LinkedList<>();
- protected final List<LinePrototype> linesList = new LinkedList<>();
- protected final List<LinemodPrototype> modifiersList = new LinkedList<>();
- protected final List<AreaPrototype> areasList = new LinkedList<>();
-
- public XmlStyleSource(String url, String name, String shortdescription) {
- super(url, name, shortdescription);
- }
-
- public XmlStyleSource(SourceEntry entry) {
- super(entry);
- }
-
- @Override
- protected void init() {
- super.init();
- icons.clear();
- lines.clear();
- modifiers.clear();
- areas.clear();
- iconsList.clear();
- linesList.clear();
- modifiersList.clear();
- areasList.clear();
- }
-
- @Override
- public void loadStyleSource() {
- init();
- try {
- try (
- InputStream in = getSourceInputStream();
- InputStreamReader reader = new InputStreamReader(in, StandardCharsets.UTF_8)
- ) {
- XmlObjectParser parser = new XmlObjectParser(new XmlStyleSourceHandler(this));
- parser.startWithValidation(reader,
- Main.getXMLBase()+"/mappaint-style-1.0",
- "resource://data/mappaint-style.xsd");
- while (parser.hasNext());
- }
- } catch (IOException e) {
- Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString()));
- Main.error(e);
- logError(e);
- } catch (SAXParseException e) {
- Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: [{1}:{2}] {3}",
- url, e.getLineNumber(), e.getColumnNumber(), e.getMessage()));
- Main.error(e);
- logError(e);
- } catch (SAXException e) {
- Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));
- Main.error(e);
- logError(e);
- }
- }
-
- @Override
- public InputStream getSourceInputStream() throws IOException {
- CachedFile cf = getCachedFile();
- InputStream zip = cf.findZipEntryInputStream("xml", "style");
- if (zip != null) {
- zipIcons = cf.getFile();
- return zip;
- } else {
- zipIcons = null;
- return cf.getInputStream();
- }
- }
-
- @Override
- @SuppressWarnings("resource")
- public CachedFile getCachedFile() throws IOException {
- return new CachedFile(url).setHttpAccept(XML_STYLE_MIME_TYPES); // NOSONAR
- }
-
- private static class WayPrototypesRecord {
- public LinePrototype line;
- public List<LinemodPrototype> linemods;
- public AreaPrototype area;
- }
-
- private <T extends Prototype> T update(T current, T candidate, Double scale, MultiCascade mc) {
- if (requiresUpdate(current, candidate, scale, mc))
- return candidate;
- else
- return current;
- }
-
- /**
- * checks whether a certain match is better than the current match
- * @param current can be null
- * @param candidate the new Prototype that could be used instead
- * @param scale ignored if null, otherwise checks if scale is within the range of candidate
- * @param mc side effect: update the valid region for the current MultiCascade
- * @return {@code true} if {@code candidate} is better than the current match
- */
- private static boolean requiresUpdate(Prototype current, Prototype candidate, Double scale, MultiCascade mc) {
- if (current == null || candidate.priority >= current.priority) {
- if (scale == null)
- return true;
-
- if (candidate.range.contains(scale)) {
- mc.range = Range.cut(mc.range, candidate.range);
- return true;
- } else {
- mc.range = mc.range.reduceAround(scale, candidate.range);
- return false;
- }
- }
- return false;
- }
-
- private IconPrototype getNode(OsmPrimitive primitive, Double scale, MultiCascade mc) {
- IconPrototype icon = null;
- for (String key : primitive.keySet()) {
- String val = primitive.get(key);
- IconPrototype p;
- if ((p = icons.get('n' + key + '=' + val)) != null) {
- icon = update(icon, p, scale, mc);
- }
- if ((p = icons.get('b' + key + '=' + OsmUtils.getNamedOsmBoolean(val))) != null) {
- icon = update(icon, p, scale, mc);
- }
- if ((p = icons.get('x' + key)) != null) {
- icon = update(icon, p, scale, mc);
- }
- }
- for (IconPrototype s : iconsList) {
- if (s.check(primitive)) {
- icon = update(icon, s, scale, mc);
- }
- }
- return icon;
- }
-
- /**
- * @param primitive OSM primitive
- * @param closed The primitive is a closed way or we pretend it is closed.
- * This is useful for multipolygon relations and outer ways of untagged
- * multipolygon relations.
- * @param p helper
- * @param scale scale
- * @param mc multi cascade
- */
- private void get(OsmPrimitive primitive, boolean closed, WayPrototypesRecord p, Double scale, MultiCascade mc) {
- String lineIdx = null;
- Map<String, LinemodPrototype> overlayMap = new HashMap<>();
- boolean isNotArea = primitive.isKeyFalse("area");
- for (String key : primitive.keySet()) {
- String val = primitive.get(key);
- AreaPrototype styleArea;
- LinePrototype styleLine;
- LinemodPrototype styleLinemod;
- String idx = 'n' + key + '=' + val;
- if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
- p.area = update(p.area, styleArea, scale, mc);
- }
- if ((styleLine = lines.get(idx)) != null) {
- if (requiresUpdate(p.line, styleLine, scale, mc)) {
- p.line = styleLine;
- lineIdx = idx;
- }
- }
- if ((styleLinemod = modifiers.get(idx)) != null) {
- if (requiresUpdate(null, styleLinemod, scale, mc)) {
- overlayMap.put(idx, styleLinemod);
- }
- }
- idx = 'b' + key + '=' + OsmUtils.getNamedOsmBoolean(val);
- if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
- p.area = update(p.area, styleArea, scale, mc);
- }
- if ((styleLine = lines.get(idx)) != null) {
- if (requiresUpdate(p.line, styleLine, scale, mc)) {
- p.line = styleLine;
- lineIdx = idx;
- }
- }
- if ((styleLinemod = modifiers.get(idx)) != null) {
- if (requiresUpdate(null, styleLinemod, scale, mc)) {
- overlayMap.put(idx, styleLinemod);
- }
- }
- idx = 'x' + key;
- if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
- p.area = update(p.area, styleArea, scale, mc);
- }
- if ((styleLine = lines.get(idx)) != null) {
- if (requiresUpdate(p.line, styleLine, scale, mc)) {
- p.line = styleLine;
- lineIdx = idx;
- }
- }
- if ((styleLinemod = modifiers.get(idx)) != null) {
- if (requiresUpdate(null, styleLinemod, scale, mc)) {
- overlayMap.put(idx, styleLinemod);
- }
- }
- }
- for (AreaPrototype s : areasList) {
- if ((closed || !s.closed) && !isNotArea && s.check(primitive)) {
- p.area = update(p.area, s, scale, mc);
- }
- }
- for (LinePrototype s : linesList) {
- if (s.check(primitive)) {
- p.line = update(p.line, s, scale, mc);
- }
- }
- for (LinemodPrototype s : modifiersList) {
- if (s.check(primitive)) {
- if (requiresUpdate(null, s, scale, mc)) {
- overlayMap.put(s.getCode(), s);
- }
- }
- }
- overlayMap.remove(lineIdx); // do not use overlay if linestyle is from the same rule (example: railway=tram)
- if (!overlayMap.isEmpty()) {
- List<LinemodPrototype> tmp = new LinkedList<>();
- if (p.linemods != null) {
- tmp.addAll(p.linemods);
- }
- tmp.addAll(overlayMap.values());
- Collections.sort(tmp);
- p.linemods = tmp;
- }
- }
-
- public void add(XmlCondition c, Collection<XmlCondition> conditions, Prototype prot) {
- if (conditions != null) {
- prot.conditions = conditions;
- if (prot instanceof IconPrototype) {
- iconsList.add((IconPrototype) prot);
- } else if (prot instanceof LinemodPrototype) {
- modifiersList.add((LinemodPrototype) prot);
- } else if (prot instanceof LinePrototype) {
- linesList.add((LinePrototype) prot);
- } else if (prot instanceof AreaPrototype) {
- areasList.add((AreaPrototype) prot);
- } else
- throw new RuntimeException();
- } else {
- String key = c.getKey();
- prot.code = key;
- if (prot instanceof IconPrototype) {
- icons.put(key, (IconPrototype) prot);
- } else if (prot instanceof LinemodPrototype) {
- modifiers.put(key, (LinemodPrototype) prot);
- } else if (prot instanceof LinePrototype) {
- lines.put(key, (LinePrototype) prot);
- } else if (prot instanceof AreaPrototype) {
- areas.put(key, (AreaPrototype) prot);
- } else
- throw new RuntimeException();
- }
- }
-
- @Override
- public void apply(MultiCascade mc, OsmPrimitive osm, double scale, boolean pretendWayIsClosed) {
- Cascade def = mc.getOrCreateCascade("default");
- boolean useMinMaxScale = Main.pref.getBoolean("mappaint.zoomLevelDisplay", false);
-
- if (osm instanceof Node || (osm instanceof Relation && "restriction".equals(osm.get("type")))) {
- IconPrototype icon = getNode(osm, useMinMaxScale ? scale : null, mc);
- if (icon != null) {
- def.put(ICON_IMAGE, icon.icon);
- if (osm instanceof Node) {
- if (icon.annotate != null) {
- if (icon.annotate) {
- def.put(TEXT, Keyword.AUTO);
- } else {
- def.remove(TEXT);
- }
- }
- }
- }
- } else if (osm instanceof Way || (osm instanceof Relation && ((Relation) osm).isMultipolygon())) {
- WayPrototypesRecord p = new WayPrototypesRecord();
- get(osm, pretendWayIsClosed || !(osm instanceof Way) || ((Way) osm).isClosed(), p, useMinMaxScale ? scale : null, mc);
- if (p.line != null) {
- def.put(WIDTH, new Float(p.line.getWidth()));
- def.putOrClear(REAL_WIDTH, p.line.realWidth != null ? new Float(p.line.realWidth) : null);
- def.putOrClear(COLOR, p.line.color);
- if (p.line.color != null) {
- int alpha = p.line.color.getAlpha();
- if (alpha != 255) {
- def.put(OPACITY, Utils.color_int2float(alpha));
- }
- }
- def.putOrClear(DASHES, p.line.getDashed());
- def.putOrClear(DASHES_BACKGROUND_COLOR, p.line.dashedColor);
- }
- Float refWidth = def.get(WIDTH, null, Float.class);
- if (refWidth != null && p.linemods != null) {
- int numOver = 0, numUnder = 0;
-
- while (mc.hasLayer(String.format("over_%d", ++numOver)));
- while (mc.hasLayer(String.format("under_%d", ++numUnder)));
-
- for (LinemodPrototype mod : p.linemods) {
- Cascade c;
- if (mod.over) {
- String layer = String.format("over_%d", numOver);
- c = mc.getOrCreateCascade(layer);
- c.put(OBJECT_Z_INDEX, new Float(numOver));
- ++numOver;
- } else {
- String layer = String.format("under_%d", numUnder);
- c = mc.getOrCreateCascade(layer);
- c.put(OBJECT_Z_INDEX, new Float(-numUnder));
- ++numUnder;
- }
- c.put(WIDTH, new Float(mod.getWidth(refWidth)));
- c.putOrClear(COLOR, mod.color);
- if (mod.color != null) {
- int alpha = mod.color.getAlpha();
- if (alpha != 255) {
- c.put(OPACITY, Utils.color_int2float(alpha));
- }
- }
- c.putOrClear(DASHES, mod.getDashed());
- c.putOrClear(DASHES_BACKGROUND_COLOR, mod.dashedColor);
- }
- }
- if (p.area != null) {
- def.putOrClear(FILL_COLOR, p.area.color);
- def.putOrClear(TEXT_POSITION, Keyword.CENTER);
- def.putOrClear(TEXT, Keyword.AUTO);
- def.remove(FILL_IMAGE);
- }
- }
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java b/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
deleted file mode 100644
index 367b5b8..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
+++ /dev/null
@@ -1,309 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.mappaint.xml;
-
-import java.awt.Color;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.LinkedList;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
-import org.openstreetmap.josm.gui.mappaint.Range;
-import org.openstreetmap.josm.tools.ColorHelper;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class XmlStyleSourceHandler extends DefaultHandler {
- private boolean inDoc, inRule, inCondition, inLine, inLineMod, inIcon, inArea, inScaleMax, inScaleMin;
- private boolean hadLine, hadLineMod, hadIcon, hadArea;
- private final RuleElem rule = new RuleElem();
-
- private final XmlStyleSource style;
-
- static class RuleElem {
- private final XmlCondition cond = new XmlCondition();
- private Collection<XmlCondition> conditions;
- private double scaleMax;
- private double scaleMin;
- private final LinePrototype line = new LinePrototype();
- private final LinemodPrototype linemod = new LinemodPrototype();
- private final AreaPrototype area = new AreaPrototype();
- private IconPrototype icon = new IconPrototype();
- public void init() {
- conditions = null;
- scaleMax = Double.POSITIVE_INFINITY;
- scaleMin = 0;
- line.init();
- cond.init();
- linemod.init();
- area.init();
- icon.init();
- }
- }
-
- public XmlStyleSourceHandler(XmlStyleSource style) {
- this.style = style;
- inDoc = inRule = inCondition = inLine = inIcon = inArea = false;
- rule.init();
- }
-
- private Color convertColor(String colString) {
- int i = colString.indexOf('#');
- Color ret;
- if (i < 0) {
- ret = Main.pref.getColor("mappaint."+style.getPrefName()+'.'+colString, Color.red);
- } else if (i == 0) {
- ret = ColorHelper.html2color(colString);
- } else {
- ret = Main.pref.getColor("mappaint."+style.getPrefName()+'.'+colString.substring(0, i),
- ColorHelper.html2color(colString.substring(i)));
- }
- return ret;
- }
-
- @Override
- public void startDocument() {
- inDoc = true;
- }
-
- @Override
- public void endDocument() {
- inDoc = false;
- }
-
- private void error(String message) {
- String warning = style.getDisplayString() + " (" + rule.cond.key + '=' + rule.cond.value + "): " + message;
- Main.warn(warning);
- style.logError(new Exception(warning));
- }
-
- private void startElementLine(String qName, Attributes atts, LinePrototype line) {
- for (int count = 0; count < atts.getLength(); count++) {
- switch (atts.getQName(count)) {
- case "width":
- String val = atts.getValue(count);
- if (!(val.startsWith("+") || val.startsWith("-") || val.endsWith("%"))) {
- line.setWidth(Integer.parseInt(val));
- }
- break;
- case "colour":
- line.color = convertColor(atts.getValue(count));
- break;
- case "realwidth":
- line.realWidth = Integer.valueOf(atts.getValue(count));
- break;
- case "dashed":
- Float[] dashed;
- try {
- String[] parts = atts.getValue(count).split(",");
- dashed = new Float[parts.length];
- for (int i = 0; i < parts.length; i++) {
- dashed[i] = (float) Integer.parseInt(parts[i]);
- }
- } catch (NumberFormatException nfe) {
- boolean isDashed = Boolean.parseBoolean(atts.getValue(count));
- if (isDashed) {
- dashed = new Float[]{9f};
- } else {
- dashed = null;
- }
- }
- line.setDashed(dashed == null ? null : Arrays.asList(dashed));
- break;
- case "dashedcolour":
- line.dashedColor = convertColor(atts.getValue(count));
- break;
- case "priority":
- line.priority = Integer.parseInt(atts.getValue(count));
- break;
- case "mode":
- if (line instanceof LinemodPrototype)
- break;
- default:
- error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
- }
- }
- }
-
- private void startElementLinemod(String qName, Attributes atts, LinemodPrototype line) {
- startElementLine(qName, atts, line);
- for (int count = 0; count < atts.getLength(); count++) {
- switch (atts.getQName(count)) {
- case "width":
- String val = atts.getValue(count);
- if (val.startsWith("+")) {
- line.setWidth(Integer.parseInt(val.substring(1)));
- line.widthMode = LinemodPrototype.WidthMode.OFFSET;
- } else if (val.startsWith("-")) {
- line.setWidth(Integer.parseInt(val));
- line.widthMode = LinemodPrototype.WidthMode.OFFSET;
- } else if (val.endsWith("%")) {
- line.setWidth(Integer.parseInt(val.substring(0, val.length()-1)));
- line.widthMode = LinemodPrototype.WidthMode.PERCENT;
- } else {
- line.setWidth(Integer.parseInt(val));
- }
- break;
- case "mode":
- line.over = !"under".equals(atts.getValue(count));
- break;
- }
- }
- }
-
- @Override
- public void startElement(String uri, String name, String qName, Attributes atts) {
- if (inDoc) {
- switch(qName) {
- case "rule":
- inRule = true;
- break;
- case "rules":
- if (style.name == null) {
- style.name = atts.getValue("name");
- }
- if (style.title == null) {
- style.title = atts.getValue("shortdescription");
- }
- if (style.icon == null) {
- style.icon = atts.getValue("icon");
- }
- break;
- case "scale_max":
- inScaleMax = true;
- break;
- case "scale_min":
- inScaleMin = true;
- break;
- case "condition":
- if (inRule) {
- inCondition = true;
- XmlCondition c = rule.cond;
- if (c.key != null) {
- if (rule.conditions == null) {
- rule.conditions = new LinkedList<>();
- }
- rule.conditions.add(new XmlCondition(rule.cond));
- c = new XmlCondition();
- rule.conditions.add(c);
- }
- for (int count = 0; count < atts.getLength(); count++) {
- switch (atts.getQName(count)) {
- case "k":
- c.key = atts.getValue(count);
- break;
- case "v":
- c.value = atts.getValue(count);
- break;
- case "b":
- c.boolValue = atts.getValue(count);
- break;
- default:
- error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
- }
- }
- if (c.key == null) {
- error("The condition has no key!");
- }
- }
- break;
- case "line":
- hadLine = inLine = true;
- startElementLine(qName, atts, rule.line);
- break;
- case "linemod":
- hadLineMod = inLineMod = true;
- startElementLinemod(qName, atts, rule.linemod);
- break;
- case "icon":
- inIcon = true;
- for (int count = 0; count < atts.getLength(); count++) {
- switch (atts.getQName(count)) {
- case "src":
- IconReference icon = new IconReference(atts.getValue(count), style);
- hadIcon = (icon != null);
- rule.icon.icon = icon;
- break;
- case "annotate":
- rule.icon.annotate = Boolean.valueOf(atts.getValue(count));
- break;
- case "priority":
- rule.icon.priority = Integer.parseInt(atts.getValue(count));
- break;
- default:
- error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
- }
- }
- break;
- case "area":
- hadArea = inArea = true;
- for (int count = 0; count < atts.getLength(); count++) {
- switch (atts.getQName(count)) {
- case "colour":
- rule.area.color = convertColor(atts.getValue(count));
- break;
- case "closed":
- rule.area.closed = Boolean.parseBoolean(atts.getValue(count));
- break;
- case "priority":
- rule.area.priority = Integer.parseInt(atts.getValue(count));
- break;
- default:
- error("The element \"" + qName + "\" has unknown attribute \"" + atts.getQName(count) + "\"!");
- }
- }
- break;
- default:
- error("The element \"" + qName + "\" is unknown!");
- }
- }
- }
-
- @Override
- public void endElement(String uri, String name, String qName) {
- if (inRule && "rule".equals(qName)) {
- if (hadLine) {
- style.add(rule.cond, rule.conditions,
- new LinePrototype(rule.line, new Range(rule.scaleMin, rule.scaleMax)));
- }
- if (hadLineMod) {
- style.add(rule.cond, rule.conditions,
- new LinemodPrototype(rule.linemod, new Range(rule.scaleMin, rule.scaleMax)));
- }
- if (hadIcon) {
- style.add(rule.cond, rule.conditions,
- new IconPrototype(rule.icon, new Range(rule.scaleMin, rule.scaleMax)));
- }
- if (hadArea) {
- style.add(rule.cond, rule.conditions,
- new AreaPrototype(rule.area, new Range(rule.scaleMin, rule.scaleMax)));
- }
- inRule = false;
- hadLine = hadLineMod = hadIcon = hadArea = false;
- rule.init();
- } else if (inCondition && "condition".equals(qName)) {
- inCondition = false;
- } else if (inLine && "line".equals(qName)) {
- inLine = false;
- } else if (inLineMod && "linemod".equals(qName)) {
- inLineMod = false;
- } else if (inIcon && "icon".equals(qName)) {
- inIcon = false;
- } else if (inArea && "area".equals(qName)) {
- inArea = false;
- } else if ("scale_max".equals(qName)) {
- inScaleMax = false;
- } else if ("scale_min".equals(qName)) {
- inScaleMin = false;
- }
- }
-
- @Override
- public void characters(char[] ch, int start, int length) {
- if (inScaleMax) {
- rule.scaleMax = Long.parseLong(new String(ch, start, length));
- } else if (inScaleMin) {
- rule.scaleMin = Long.parseLong(new String(ch, start, length));
- }
- }
-}
diff --git a/src/org/openstreetmap/josm/gui/mappaint/xml/package-info.java b/src/org/openstreetmap/josm/gui/mappaint/xml/package-info.java
deleted file mode 100644
index b00a9f3..0000000
--- a/src/org/openstreetmap/josm/gui/mappaint/xml/package-info.java
+++ /dev/null
@@ -1,7 +0,0 @@
-// License: GPL. For details, see LICENSE file.
-
-/**
- * Drawing system based on XML map styles. This is a legacy system, not maintained anymore.
- * For reference, see <a href="https://josm.openstreetmap.de/wiki/Styles/LegacyStandard">JOSM wiki</a>
- */
-package org.openstreetmap.josm.gui.mappaint.xml;
diff --git a/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java b/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
index 11e79e4..27e6a5e 100644
--- a/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
+++ b/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
@@ -1342,8 +1342,8 @@ public abstract class SourceEditor extends JPanel {
class SourceLoader extends PleaseWaitRunnable {
private final String url;
private final List<SourceProvider> sourceProviders;
- private transient CachedFile cachedFile;
- private transient boolean canceled;
+ private CachedFile cachedFile;
+ private boolean canceled;
private final List<ExtendedSourceEntry> sources = new ArrayList<>();
SourceLoader(String url, List<SourceProvider> sourceProviders) {
@@ -1389,6 +1389,12 @@ public abstract class SourceEditor extends JPanel {
}
}
readFile();
+ for (Iterator<ExtendedSourceEntry> it = sources.iterator(); it.hasNext();) {
+ if ("xml".equals(it.next().styleType)) {
+ Main.debug("Removing XML source entry");
+ it.remove();
+ }
+ }
} catch (IOException e) {
if (canceled)
// ignore the exception and return
diff --git a/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java b/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
index f522a65..eec5c56 100644
--- a/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
+++ b/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
@@ -242,7 +242,7 @@ public class CacheContentsPanel extends JPanel {
}
private static DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) {
- final DefaultTableModel tableModel = new DefaultTableModel(
+ return new DefaultTableModel(
getCacheStats(cache),
new String[]{tr("Cache name"), tr("Object Count"), tr("Clear")}) {
@Override
@@ -250,6 +250,5 @@ public class CacheContentsPanel extends JPanel {
return column == 2;
}
};
- return tableModel;
}
}
diff --git a/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java b/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
index 059acee..1a5c26e 100644
--- a/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
+++ b/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
@@ -223,7 +223,7 @@ public class TaggingPreset extends AbstractAction implements MapView.LayerChange
public void setName_template_filter(String filter) throws SAXException {
try {
this.nameTemplateFilter = SearchCompiler.compile(filter);
- } catch (org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) {
+ } catch (SearchCompiler.ParseError e) {
Main.error("Error while parsing" + filter + ": " + e.getMessage());
throw new SAXException(e);
}
diff --git a/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java b/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
index 0eb9c22..76b5939 100644
--- a/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
+++ b/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
@@ -134,7 +134,7 @@ public class Text extends KeyedItem {
for (final String ai : auto_increment.split(",")) {
JToggleButton aibutton = new JToggleButton(ai);
aibutton.setToolTipText(tr("Select auto-increment of {0} for this field", ai));
- aibutton.setMargin(new java.awt.Insets(0, 0, 0, 0));
+ aibutton.setMargin(new Insets(0, 0, 0, 0));
aibutton.setFocusable(false);
saveHorizontalSpace(aibutton);
bg.add(aibutton);
@@ -164,7 +164,7 @@ public class Text extends KeyedItem {
// of the X remaining selected
JButton releasebutton = new JButton("X");
releasebutton.setToolTipText(tr("Cancel auto-increment for this field"));
- releasebutton.setMargin(new java.awt.Insets(0, 0, 0, 0));
+ releasebutton.setMargin(new Insets(0, 0, 0, 0));
releasebutton.setFocusable(false);
releasebutton.addActionListener(new ActionListener() {
@Override
diff --git a/src/org/openstreetmap/josm/gui/widgets/CompileSearchTextDecorator.java b/src/org/openstreetmap/josm/gui/widgets/CompileSearchTextDecorator.java
index b283a61..18a0f88 100644
--- a/src/org/openstreetmap/josm/gui/widgets/CompileSearchTextDecorator.java
+++ b/src/org/openstreetmap/josm/gui/widgets/CompileSearchTextDecorator.java
@@ -18,7 +18,7 @@ public final class CompileSearchTextDecorator implements DocumentListener {
private final JTextComponent textComponent;
private final String originalToolTipText;
- private SearchCompiler.Match filter = null;
+ private SearchCompiler.Match filter;
private CompileSearchTextDecorator(JTextComponent textComponent) {
this.textComponent = textComponent;
diff --git a/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java b/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java
index 1b6c50d..08e5af8 100644
--- a/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java
+++ b/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java
@@ -37,14 +37,14 @@ public class FileChooserManager {
private final String lastDirProperty;
private final String curDir;
- private boolean multiple = false;
- private String title = null;
+ private boolean multiple;
+ private String title;
private Collection<? extends FileFilter> filters;
private FileFilter defaultFilter;
private int selectionMode = JFileChooser.FILES_ONLY;
- private String extension = null;
- private boolean allTypes = false;
- private File file = null;
+ private String extension;
+ private boolean allTypes;
+ private File file;
private AbstractFileChooser fc;
diff --git a/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java b/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
index 1d84f77..f00d1a0 100644
--- a/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
+++ b/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
@@ -387,7 +387,7 @@ public class MultiSplitLayout implements LayoutManager {
Node splitChild = splitChildren.next();
Rectangle splitChildBounds = splitChild.getBounds();
double minSplitChildWidth = minimumNodeSize(splitChild).getWidth();
- double splitChildWeight = (onlyShrinkWeightedComponents)
+ double splitChildWeight = onlyShrinkWeightedComponents
? splitChild.getWeight()
: (splitChildBounds.getWidth() / totalWidth);
@@ -433,7 +433,7 @@ public class MultiSplitLayout implements LayoutManager {
Node splitChild = splitChildren.next();
Rectangle splitChildBounds = splitChild.getBounds();
double minSplitChildHeight = minimumNodeSize(splitChild).getHeight();
- double splitChildWeight = (onlyShrinkWeightedComponents)
+ double splitChildWeight = onlyShrinkWeightedComponents
? splitChild.getWeight()
: (splitChildBounds.getHeight() / totalHeight);
@@ -498,7 +498,7 @@ public class MultiSplitLayout implements LayoutManager {
Rectangle newSplitChildBounds = boundsWithXandWidth(bounds, x, newWidth);
layout2(splitChild, newSplitChildBounds);
} else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) {
- double allocatedWidth = (splitChild.equals(lastWeightedChild))
+ double allocatedWidth = splitChild.equals(lastWeightedChild)
? availableWidth
: Math.rint(splitChildWeight * extraWidth);
double newWidth = splitChildBounds.getWidth() + allocatedWidth;
@@ -536,7 +536,7 @@ public class MultiSplitLayout implements LayoutManager {
Rectangle newSplitChildBounds = boundsWithYandHeight(bounds, y, newHeight);
layout2(splitChild, newSplitChildBounds);
} else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) {
- double allocatedHeight = (splitChild.equals(lastWeightedChild))
+ double allocatedHeight = splitChild.equals(lastWeightedChild)
? availableHeight
: Math.rint(splitChildWeight * extraHeight);
double newHeight = splitChildBounds.getHeight() + allocatedHeight;
@@ -615,7 +615,7 @@ public class MultiSplitLayout implements LayoutManager {
while (splitChildren.hasNext()) {
Node splitChild = splitChildren.next();
Divider dividerChild =
- (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;
+ splitChildren.hasNext() ? (Divider) (splitChildren.next()) : null;
double childWidth = 0.0;
if (getFloatingDividers()) {
@@ -649,7 +649,7 @@ public class MultiSplitLayout implements LayoutManager {
while (splitChildren.hasNext()) {
Node splitChild = splitChildren.next();
Divider dividerChild =
- (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;
+ splitChildren.hasNext() ? (Divider) splitChildren.next() : null;
double childHeight = 0.0;
if (getFloatingDividers()) {
@@ -761,7 +761,7 @@ public class MultiSplitLayout implements LayoutManager {
private Divider dividerAt(Node root, int x, int y) {
if (root instanceof Divider) {
Divider divider = (Divider) root;
- return (divider.getBounds().contains(x, y)) ? divider : null;
+ return divider.getBounds().contains(x, y) ? divider : null;
} else if (root instanceof Split) {
Split split = (Split) root;
for (Node child : split.getChildren()) {
diff --git a/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java b/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
index d905ed4..b17989e 100644
--- a/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
+++ b/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
@@ -335,7 +335,7 @@ public class MultiSplitPane extends JPanel {
if (show) {
MultiSplitLayout.Divider divider = getMultiSplitLayout().dividerAt(x, y);
if (divider != null) {
- cursorID = (divider.isVertical()) ?
+ cursorID = divider.isVertical() ?
Cursor.E_RESIZE_CURSOR :
Cursor.N_RESIZE_CURSOR;
}
diff --git a/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java b/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java
index 7d7113c..9185785 100644
--- a/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java
+++ b/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java
@@ -128,7 +128,7 @@ public class QuadStateCheckBox extends JCheckBox {
private final class QuadStateDecorator implements ButtonModel {
private final ButtonModel other;
- private String propertyText = null;
+ private String propertyText;
private QuadStateDecorator(ButtonModel other) {
this.other = other;
diff --git a/src/org/openstreetmap/josm/io/CachedFile.java b/src/org/openstreetmap/josm/io/CachedFile.java
index 2669546..5139cf5 100644
--- a/src/org/openstreetmap/josm/io/CachedFile.java
+++ b/src/org/openstreetmap/josm/io/CachedFile.java
@@ -68,8 +68,8 @@ public class CachedFile implements Closeable {
protected String httpAccept;
protected CachingStrategy cachingStrategy;
- private transient boolean fastFail;
- private transient HttpClient activeConnection;
+ private boolean fastFail;
+ private HttpClient activeConnection;
protected File cacheFile;
protected boolean initialized;
diff --git a/src/org/openstreetmap/josm/io/OsmWriter.java b/src/org/openstreetmap/josm/io/OsmWriter.java
index a42a6d9..89604a4 100644
--- a/src/org/openstreetmap/josm/io/OsmWriter.java
+++ b/src/org/openstreetmap/josm/io/OsmWriter.java
@@ -55,7 +55,7 @@ public class OsmWriter extends XmlWriter implements PrimitiveVisitor {
protected OsmWriter(PrintWriter out, boolean osmConform, String version) {
super(out);
this.osmConform = osmConform;
- this.version = (version == null ? DEFAULT_API_VERSION : version);
+ this.version = version == null ? DEFAULT_API_VERSION : version;
}
public void setWithBody(boolean wb) {
diff --git a/src/org/openstreetmap/josm/io/imagery/ImageryReader.java b/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
index d6d8073..09b86a7 100644
--- a/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
+++ b/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
@@ -32,8 +32,8 @@ import org.xml.sax.helpers.DefaultHandler;
public class ImageryReader implements Closeable {
private final String source;
- private transient CachedFile cachedFile;
- private transient boolean fastFail;
+ private CachedFile cachedFile;
+ private boolean fastFail;
private enum State {
INIT, // initial state, should always be at the bottom of the stack
diff --git a/src/org/openstreetmap/josm/plugins/PluginHandler.java b/src/org/openstreetmap/josm/plugins/PluginHandler.java
index 6c05033..bd83008 100644
--- a/src/org/openstreetmap/josm/plugins/PluginHandler.java
+++ b/src/org/openstreetmap/josm/plugins/PluginHandler.java
@@ -54,7 +54,6 @@ import org.openstreetmap.josm.data.Version;
import org.openstreetmap.josm.gui.HelpAwareOptionPane;
import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
import org.openstreetmap.josm.gui.download.DownloadSelection;
-import org.openstreetmap.josm.gui.help.HelpUtil;
import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
import org.openstreetmap.josm.gui.progress.ProgressMonitor;
@@ -517,7 +516,7 @@ public final class PluginHandler {
null, /* no special icon */
specs,
specs[0],
- HelpUtil.ht("/Plugin/Loading#MissingRequiredPlugin"))) {
+ ht("/Plugin/Loading#MissingRequiredPlugin"))) {
downloadRequiredPluginsAndRestart(parent, missingRequiredPlugin);
}
}
@@ -579,7 +578,7 @@ public final class PluginHandler {
),
tr("Warning"),
JOptionPane.WARNING_MESSAGE,
- HelpUtil.ht("/Plugin/Loading#JOSMUpdateRequired")
+ ht("/Plugin/Loading#JOSMUpdateRequired")
);
}
@@ -859,7 +858,7 @@ public final class PluginHandler {
sb.toString(),
tr("Warning"),
JOptionPane.WARNING_MESSAGE,
- HelpUtil.ht("/Plugin/Loading#MissingPluginInfos")
+ ht("/Plugin/Loading#MissingPluginInfos")
);
}
@@ -927,7 +926,7 @@ public final class PluginHandler {
sb.toString(),
tr("Plugin update failed"),
JOptionPane.ERROR_MESSAGE,
- HelpUtil.ht("/Plugin/Loading#FailedPluginUpdated")
+ ht("/Plugin/Loading#FailedPluginUpdated")
);
}
diff --git a/src/org/openstreetmap/josm/tools/ExifReader.java b/src/org/openstreetmap/josm/tools/ExifReader.java
index 65a45f8..216343d 100644
--- a/src/org/openstreetmap/josm/tools/ExifReader.java
+++ b/src/org/openstreetmap/josm/tools/ExifReader.java
@@ -189,7 +189,7 @@ public final class ExifReader {
if (Double.isNaN(deg) && Double.isNaN(min) && Double.isNaN(sec))
throw new IllegalArgumentException("deg, min and sec are NaN");
- value = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600)));
+ value = Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600));
if (dirGps.getString(gpsTagRef).charAt(0) == cRef) {
value = -value;
diff --git a/src/org/openstreetmap/josm/tools/HttpClient.java b/src/org/openstreetmap/josm/tools/HttpClient.java
index 492e18d..ff47780 100644
--- a/src/org/openstreetmap/josm/tools/HttpClient.java
+++ b/src/org/openstreetmap/josm/tools/HttpClient.java
@@ -49,8 +49,8 @@ public final class HttpClient {
private int maxRedirects = Main.pref.getInteger("socket.maxredirects", 5);
private boolean useCache;
private String reasonForRequest;
- private transient HttpURLConnection connection; // to allow disconnecting before `response` is set
- private transient Response response;
+ private HttpURLConnection connection; // to allow disconnecting before `response` is set
+ private Response response;
static {
CookieHandler.setDefault(new CookieManager());
diff --git a/src/org/openstreetmap/josm/tools/Utils.java b/src/org/openstreetmap/josm/tools/Utils.java
index 198cc7d..5a0e6dc 100644
--- a/src/org/openstreetmap/josm/tools/Utils.java
+++ b/src/org/openstreetmap/josm/tools/Utils.java
@@ -144,6 +144,7 @@ public final class Utils {
return null;
}
+ @SuppressWarnings("unused")
public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) {
// Diamond operator does not work with Java 9 here
return new FilteredCollection<T>(collection, predicate);
diff --git a/test/unit/org/openstreetmap/josm/actions/PasteTagsActionTest.java b/test/unit/org/openstreetmap/josm/actions/PasteTagsActionTest.java
new file mode 100644
index 0000000..0763efa
--- /dev/null
+++ b/test/unit/org/openstreetmap/josm/actions/PasteTagsActionTest.java
@@ -0,0 +1,55 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.actions;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.actions.PasteTagsAction.TagPaster;
+import org.openstreetmap.josm.data.osm.NodeData;
+import org.openstreetmap.josm.data.osm.PrimitiveData;
+import org.openstreetmap.josm.data.osm.RelationData;
+import org.openstreetmap.josm.data.osm.WayData;
+
+/**
+ * Unit tests for class {@link PasteTagsAction}.
+ */
+public class PasteTagsActionTest {
+
+ /**
+ * Setup test.
+ */
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ JOSMFixture.createUnitTestFixture().init();
+ }
+
+ private static boolean isHeterogeneousSource(PrimitiveData... t) {
+ return new TagPaster(Arrays.asList(t), null).isHeterogeneousSource();
+ }
+
+ /**
+ * Unit test of {@link TagPaster#isHeterogeneousSource}.
+ */
+ @Test
+ public void testTagPasterIsHeterogeneousSource() {
+ // 0 item
+ assertFalse(isHeterogeneousSource());
+ // 1 item
+ assertFalse(isHeterogeneousSource(new NodeData()));
+ assertFalse(isHeterogeneousSource(new WayData()));
+ assertFalse(isHeterogeneousSource(new RelationData()));
+ // 2 items of same type
+ assertFalse(isHeterogeneousSource(new NodeData(), new NodeData()));
+ assertFalse(isHeterogeneousSource(new WayData(), new WayData()));
+ assertFalse(isHeterogeneousSource(new RelationData(), new RelationData()));
+ // 2 items of different type
+ assertTrue(isHeterogeneousSource(new NodeData(), new WayData()));
+ assertTrue(isHeterogeneousSource(new NodeData(), new RelationData()));
+ assertTrue(isHeterogeneousSource(new WayData(), new RelationData()));
+ }
+}
diff --git a/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java b/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
index e9600c0..1da9192 100644
--- a/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
+++ b/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
@@ -2,6 +2,7 @@
package org.openstreetmap.josm.actions;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -101,6 +102,41 @@ public final class SplitWayActionTest {
}
}
+ /**
+ * Unit test of {@link SplitWayAction#findVia}.
+ */
+ @Test
+ public void testFindVia() {
+ // empty relation
+ assertNull(SplitWayAction.findVia(new Relation(), null));
+ // restriction relation without via member
+ Relation r = new Relation();
+ r.addMember(new RelationMember("", new Node()));
+ assertNull(SplitWayAction.findVia(r, "restriction"));
+ // restriction relation with via member
+ r = new Relation();
+ OsmPrimitive via = new Node();
+ r.addMember(new RelationMember("via", via));
+ assertEquals(via, SplitWayAction.findVia(r, "restriction"));
+ // destination_sign relation without sign nor intersection
+ r = new Relation();
+ r.addMember(new RelationMember("", new Node()));
+ assertNull(SplitWayAction.findVia(r, "destination_sign"));
+ // destination_sign with sign
+ r = new Relation();
+ via = new Node();
+ r.addMember(new RelationMember("sign", via));
+ assertEquals(via, SplitWayAction.findVia(r, "destination_sign"));
+ // destination_sign with intersection
+ r = new Relation();
+ via = new Node();
+ r.addMember(new RelationMember("intersection", via));
+ assertEquals(via, SplitWayAction.findVia(r, "destination_sign"));
+ }
+
+ /**
+ * Unit tests of route relations.
+ */
@Test
public void testRouteRelation() {
doTestRouteRelation(false, 0);
@@ -142,7 +178,6 @@ public final class SplitWayActionTest {
route.addMember(new RelationMember("", w3));
dataSet.setSelected(Arrays.asList(w2, n3, n4, n5));
-
final SplitWayAction.Strategy strategy = new SplitWayAction.Strategy() {
@Override
@@ -173,7 +208,6 @@ public final class SplitWayActionTest {
assertFirstLastNodeIs(((Way) route.getMemberPrimitivesList().get(4)), n6);
assertFirstLastNodeIs(((Way) route.getMemberPrimitivesList().get(5)), n6);
assertFirstLastNodeIs(((Way) route.getMemberPrimitivesList().get(5)), n7);
-
}
static void assertFirstLastNodeIs(Way way, Node node) {
diff --git a/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java b/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
index 795eeac..84ea487 100644
--- a/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
+++ b/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
@@ -71,20 +71,20 @@ public class JCSCachedTileLoaderJobTest {
@Test
public void testStatusCodes() throws Exception {
- testStatusCode(200);
+ doTestStatusCode(200);
// can't test for 3xx, as httpstat.us redirects finally to 200 page
- testStatusCode(401);
- testStatusCode(402);
- testStatusCode(403);
- testStatusCode(404);
- testStatusCode(405);
- testStatusCode(500);
- testStatusCode(501);
- testStatusCode(502);
+ doTestStatusCode(401);
+ doTestStatusCode(402);
+ doTestStatusCode(403);
+ doTestStatusCode(404);
+ doTestStatusCode(405);
+ doTestStatusCode(500);
+ doTestStatusCode(501);
+ doTestStatusCode(502);
}
@Test
- public void testUnkownHost() throws Exception {
+ public void testUnknownHost() throws Exception {
TestCachedTileLoaderJob job = new TestCachedTileLoaderJob("http://unkownhost.unkownhost/unkown");
Listener listener = new Listener();
job.submit(listener, true);
@@ -96,7 +96,7 @@ public class JCSCachedTileLoaderJobTest {
assertEquals("java.net.UnknownHostException: unkownhost.unkownhost", listener.attributes.getErrorMessage());
}
- public void testStatusCode(int responseCode) throws Exception {
+ private void doTestStatusCode(int responseCode) throws Exception {
TestCachedTileLoaderJob job = getStatusLoaderJob(responseCode);
Listener listener = new Listener();
job.submit(listener, true);
diff --git a/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java b/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
index 6e1fbd9..c84b370 100644
--- a/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
+++ b/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
@@ -9,6 +9,7 @@ import java.io.IOException;
import java.net.MalformedURLException;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
import org.openstreetmap.josm.JOSMFixture;
@@ -83,7 +84,6 @@ public class WMTSTileSourceTest {
assertEquals("TileYMax", 2, testSource.getTileYMax(1));
assertEquals("TileXMax", 4, testSource.getTileXMax(2));
assertEquals("TileYMax", 4, testSource.getTileYMax(2));
-
}
@Test
@@ -105,8 +105,8 @@ public class WMTSTileSourceTest {
verifyBounds(wallonieBounds, testSource, 10, 17724, 20324);
}
- // XXX - disable this test, needs further working
- // @Test
+ @Test
+ @Ignore("disable this test, needs further working") // XXX
public void testWALLONIENoMatrixDimension() throws MalformedURLException, IOException {
Main.setProjection(Projections.getProjectionByCode("EPSG:31370"));
WMTSTileSource testSource = new WMTSTileSource(getImagery("test/data/wmts/WMTSCapabilities-Wallonie-nomatrixdimension.xml"));
@@ -223,9 +223,8 @@ public class WMTSTileSourceTest {
testSource.getTileUrl(0, 1, 1));
}
-
- // XXX: disabled as this needs user action
- //@Test
+ @Test
+ @Ignore("disabled as this needs user action") // XXX
public void testTwoTileSetsForOneProjection() throws Exception {
Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
WMTSTileSource testSource = new WMTSTileSource(testImageryOntario);
@@ -235,8 +234,8 @@ public class WMTSTileSourceTest {
}
- // XXX: disabled as this needs user action
- // @Test
+ @Test
+ @Ignore("disabled as this needs user action") // XXX
public void testManyLayersScrollbars() throws Exception {
Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
WMTSTileSource testSource = new WMTSTileSource(testLotsOfLayers);
@@ -245,7 +244,7 @@ public class WMTSTileSourceTest {
}
@Test
- public void testPraserForDuplicateTags() throws Exception {
+ public void testParserForDuplicateTags() throws Exception {
Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
WMTSTileSource testSource = new WMTSTileSource(testDuplicateTags);
testSource.initProjection(Main.getProjection());
@@ -257,7 +256,7 @@ public class WMTSTileSourceTest {
}
@Test
- public void testPraserForMissingStyleIdentifier() throws Exception {
+ public void testParserForMissingStyleIdentifier() throws Exception {
Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
WMTSTileSource testSource = new WMTSTileSource(testMissingStyleIdentifer);
testSource.initProjection(Main.getProjection());
@@ -267,7 +266,6 @@ public class WMTSTileSourceTest {
LatLon ll = new LatLon(source.tileXYToLatLon(x, y, z));
assertEquals("Latitude", expected.lat(), ll.lat(), 1e-05);
assertEquals("Longitude", expected.lon(), ll.lon(), 1e-05);
-
}
private void verifyMercatorTile(WMTSTileSource testSource, int x, int y, int z) {
diff --git a/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java b/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
index 97b015d..aaee689 100644
--- a/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
+++ b/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
@@ -1033,4 +1033,44 @@ public class DataSetMergerTest {
assertTrue(n.isModified());
}
+
+ /**
+ * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12616">Bug #12616</a>.
+ */
+ @Test
+ public void testTicket12616() {
+ // Server node: no modifications
+ Node n1 = new Node(1, 1);
+ n1.setCoor(LatLon.ZERO);
+ assertFalse(n1.isModified());
+ their.addPrimitive(n1);
+
+ // Local node: one modification: move
+ Node n1b = new Node(n1);
+ n1b.setCoor(new LatLon(1, 1));
+ n1b.setModified(true);
+ assertTrue(n1b.isModified());
+ assertEquals(new LatLon(1, 1), n1b.getCoor());
+ my.addPrimitive(n1b);
+
+ // Merge
+ DataSetMerger visitor = new DataSetMerger(my, their);
+ visitor.merge();
+
+ // Check that modification is still here
+ Node n = (Node) my.getPrimitiveById(1, OsmPrimitiveType.NODE);
+ assertNotNull(n);
+ assertEquals(new LatLon(1, 1), n.getCoor());
+ assertTrue(n.isModified());
+
+ // Merge again
+ visitor = new DataSetMerger(my, their);
+ visitor.merge();
+
+ // Check that modification is still here
+ n = (Node) my.getPrimitiveById(1, OsmPrimitiveType.NODE);
+ assertNotNull(n);
+ assertEquals(new LatLon(1, 1), n.getCoor());
+ assertTrue(n.isModified());
+ }
}
diff --git a/test/unit/org/openstreetmap/josm/data/osm/TagMapTest.java b/test/unit/org/openstreetmap/josm/data/osm/TagMapTest.java
new file mode 100644
index 0000000..0889738
--- /dev/null
+++ b/test/unit/org/openstreetmap/josm/data/osm/TagMapTest.java
@@ -0,0 +1,22 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.osm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/**
+ * Unit tests of the {@code TagMap} class.
+ */
+public class TagMapTest {
+
+ /**
+ * Unit test for {@link TagMap#toString}
+ */
+ @Test
+ public void testToString() {
+ assertEquals("TagMap[]", new TagMap().toString());
+ assertEquals("TagMap[key=val]", new TagMap(new String[]{"key", "val"}).toString());
+ assertEquals("TagMap[key=val,foo=bar]", new TagMap(new String[]{"key", "val", "foo", "bar"}).toString());
+ }
+}
diff --git a/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java b/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java
index 9a72152..238ea63 100644
--- a/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java
+++ b/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.fail;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
-import java.net.IDN;
import java.util.Locale;
import org.junit.Before;
@@ -284,35 +283,6 @@ public class DomainValidatorTest {
}
/**
- * Check if IDN.toASCII is broken or not
- */
- @Test
- public void testIsIDNtoASCIIBroken() {
- System.out.println(">>DomainValidatorTest.testIsIDNtoASCIIBroken()");
- final String input = ".";
- final boolean ok = input.equals(IDN.toASCII(input));
- System.out.println("IDN.toASCII is " + (ok ? "OK" : "BROKEN"));
- String[] props = {
- "java.version", // Java Runtime Environment version
- "java.vendor", // Java Runtime Environment vendor
- "java.vm.specification.version", // Java Virtual Machine specification version
- "java.vm.specification.vendor", // Java Virtual Machine specification vendor
- "java.vm.specification.name", // Java Virtual Machine specification name
- "java.vm.version", // Java Virtual Machine implementation version
- "java.vm.vendor", // Java Virtual Machine implementation vendor
- "java.vm.name", // Java Virtual Machine implementation name
- "java.specification.version", // Java Runtime Environment specification version
- "java.specification.vendor", // Java Runtime Environment specification vendor
- "java.specification.name", // Java Runtime Environment specification name
- "java.class.version", // Java class format version number
- };
- for (String t : props) {
- System.out.println(t + "=" + System.getProperty(t));
- }
- System.out.println("<<DomainValidatorTest.testIsIDNtoASCIIBroken()");
- }
-
- /**
* Check array is sorted and is lower-case
* @throws Exception if an error occurs
*/
diff --git a/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java b/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java
index c270bf0..dc2be10 100644
--- a/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java
+++ b/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java
@@ -17,7 +17,9 @@
package org.openstreetmap.josm.data.validation.routines;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Arrays;
@@ -55,16 +57,16 @@ public class RegexValidatorTest {
RegexValidator insensitive = new RegexValidator(REGEX, false);
// isValid()
- assertEquals("Sensitive isValid() valid", true, sensitive.isValid("ac-DE-1"));
- assertEquals("Sensitive isValid() invalid", false, sensitive.isValid("AB-de-1"));
- assertEquals("Insensitive isValid() valid", true, insensitive.isValid("AB-de-1"));
- assertEquals("Insensitive isValid() invalid", false, insensitive.isValid("ABd-de-1"));
+ assertTrue("Sensitive isValid() valid", sensitive.isValid("ac-DE-1"));
+ assertFalse("Sensitive isValid() invalid", sensitive.isValid("AB-de-1"));
+ assertTrue("Insensitive isValid() valid", insensitive.isValid("AB-de-1"));
+ assertFalse("Insensitive isValid() invalid", insensitive.isValid("ABd-de-1"));
// validate()
- assertEquals("Sensitive validate() valid", "acDE1", sensitive.validate("ac-DE-1"));
- assertEquals("Sensitive validate() invalid", null, sensitive.validate("AB-de-1"));
- assertEquals("Insensitive validate() valid", "ABde1", insensitive.validate("AB-de-1"));
- assertEquals("Insensitive validate() invalid", null, insensitive.validate("ABd-de-1"));
+ assertEquals("Sensitive validate() valid", "acDE1", sensitive.validate("ac-DE-1"));
+ assertNull("Sensitive validate() invalid", sensitive.validate("AB-de-1"));
+ assertEquals("Insensitive validate() valid", "ABde1", insensitive.validate("AB-de-1"));
+ assertNull("Insensitive validate() invalid", insensitive.validate("ABd-de-1"));
// match()
checkArray("Sensitive match() valid", new String[] {"ac", "DE", "1"}, sensitive.match("ac-DE-1"));
@@ -93,16 +95,16 @@ public class RegexValidatorTest {
String[] array = new String[] {"aac", "FDE", "321"};
// isValid()
- assertEquals("Sensitive isValid() Multiple", true, multiple.isValid(value));
- assertEquals("Sensitive isValid() 1st", false, single1.isValid(value));
- assertEquals("Sensitive isValid() 2nd", true, single2.isValid(value));
- assertEquals("Sensitive isValid() 3rd", false, single3.isValid(value));
+ assertTrue("Sensitive isValid() Multiple", multiple.isValid(value));
+ assertFalse("Sensitive isValid() 1st", single1.isValid(value));
+ assertTrue("Sensitive isValid() 2nd", single2.isValid(value));
+ assertFalse("Sensitive isValid() 3rd", single3.isValid(value));
// validate()
assertEquals("Sensitive validate() Multiple", expect, multiple.validate(value));
- assertNull("Sensitive validate() 1st", single1.validate(value));
+ assertNull("Sensitive validate() 1st", single1.validate(value));
assertEquals("Sensitive validate() 2nd", expect, single2.validate(value));
- assertNull("Sensitive validate() 3rd", single3.validate(value));
+ assertNull("Sensitive validate() 3rd", single3.validate(value));
// match()
checkArray("Sensitive match() Multiple", array, multiple.match(value));
@@ -112,7 +114,7 @@ public class RegexValidatorTest {
// All invalid
value = "AAC*FDE*321";
- assertEquals("isValid() Invalid", false, multiple.isValid(value));
+ assertFalse("isValid() Invalid", multiple.isValid(value));
assertNull("validate() Invalid", multiple.validate(value));
assertNull("match() Multiple", multiple.match(value));
}
@@ -135,16 +137,16 @@ public class RegexValidatorTest {
String[] array = new String[] {"AAC", "FDE", "321"};
// isValid()
- assertEquals("isValid() Multiple", true, multiple.isValid(value));
- assertEquals("isValid() 1st", false, single1.isValid(value));
- assertEquals("isValid() 2nd", true, single2.isValid(value));
- assertEquals("isValid() 3rd", false, single3.isValid(value));
+ assertTrue("isValid() Multiple", multiple.isValid(value));
+ assertFalse("isValid() 1st", single1.isValid(value));
+ assertTrue("isValid() 2nd", single2.isValid(value));
+ assertFalse("isValid() 3rd", single3.isValid(value));
// validate()
assertEquals("validate() Multiple", expect, multiple.validate(value));
- assertNull("validate() 1st", single1.validate(value));
+ assertNull("validate() 1st", single1.validate(value));
assertEquals("validate() 2nd", expect, single2.validate(value));
- assertNull("validate() 3rd", single3.validate(value));
+ assertNull("validate() 3rd", single3.validate(value));
// match()
checkArray("match() Multiple", array, multiple.match(value));
@@ -154,7 +156,7 @@ public class RegexValidatorTest {
// All invalid
value = "AAC*FDE*321";
- assertEquals("isValid() Invalid", false, multiple.isValid(value));
+ assertFalse("isValid() Invalid", multiple.isValid(value));
assertNull("validate() Invalid", multiple.validate(value));
assertNull("match() Multiple", multiple.match(value));
}
@@ -164,9 +166,8 @@ public class RegexValidatorTest {
*/
@Test
public void testNullValue() {
-
RegexValidator validator = new RegexValidator(REGEX);
- assertEquals("Instance isValid()", false, validator.isValid(null));
+ assertFalse("Instance isValid()", validator.isValid(null));
assertNull("Instance validate()", validator.validate(null));
assertNull("Instance match()", validator.match(null));
}
diff --git a/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java b/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java
index 5afea53..cefd487 100644
--- a/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java
+++ b/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java
@@ -401,14 +401,6 @@ public class UrlValidatorTest {
}
/**
- * Test validate URL
- */
- @Test
- public void testValidateUrl() {
- assertTrue(true);
- }
-
- /**
* Non-regression test for VALIDATOR-290
*/
@Test
diff --git a/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java b/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java
index 7cf0f89..3a3fb60 100644
--- a/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java
@@ -23,15 +23,16 @@ import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
public class PropertiesMergeModelTest {
- public abstract static class TestObserver implements Observer {
+ private abstract static class TestObserver implements Observer {
public int numInvocations;
+ @Override
public void update(Observable o, Object arg) {
numInvocations++;
- test();
+ doTest();
}
- public abstract void test();
+ public abstract void doTest();
public void assertNumInvocations(int count) {
assertEquals(count, numInvocations);
@@ -99,7 +100,6 @@ public class PropertiesMergeModelTest {
populate(n1, n2);
assertTrue(model.hasCoordConflict());
-
n1.cloneFrom(new Node(1));
n2.setCoor(new LatLon(2, 2));
populate(n1, n2);
@@ -116,7 +116,7 @@ public class PropertiesMergeModelTest {
model.addObserver(
observerTest = new TestObserver() {
@Override
- public void test() {
+ public void doTest() {
assertTrue(model.isCoordMergeDecision(MergeDecisionType.KEEP_MINE));
}
}
@@ -131,7 +131,7 @@ public class PropertiesMergeModelTest {
model.addObserver(
observerTest = new TestObserver() {
@Override
- public void test() {
+ public void doTest() {
assertTrue(model.isCoordMergeDecision(MergeDecisionType.KEEP_THEIR));
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java b/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java
index 5e1377d..122c7d1 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java
@@ -17,8 +17,9 @@ public final class PreferencesTestUtils {
* @param factory setting factory to test
* @param parentClass optional parent setting, can be {@code null}
*/
- public static void testPreferenceSettingAddGui(PreferenceSettingFactory factory, Class<? extends DefaultTabPreferenceSetting> parentClass) {
- testPreferenceSettingAddGui(factory, parentClass, 1);
+ public static void doTestPreferenceSettingAddGui(
+ PreferenceSettingFactory factory, Class<? extends DefaultTabPreferenceSetting> parentClass) {
+ doTestPreferenceSettingAddGui(factory, parentClass, 1);
}
/**
@@ -27,8 +28,8 @@ public final class PreferencesTestUtils {
* @param parentClass optional parent setting, can be {@code null}
* @param increment expected tab number increment
*/
- public static void testPreferenceSettingAddGui(PreferenceSettingFactory factory, Class<? extends DefaultTabPreferenceSetting> parentClass,
- int increment) {
+ public static void doTestPreferenceSettingAddGui(
+ PreferenceSettingFactory factory, Class<? extends DefaultTabPreferenceSetting> parentClass, int increment) {
PreferenceSetting setting = factory.createPreferenceSetting();
PreferenceTabbedPane tabPane = new PreferenceTabbedPane();
tabPane.buildGui();
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java
index 1af183e..1ad4e6e 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java
@@ -34,6 +34,6 @@ public class AdvancedPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new AdvancedPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new AdvancedPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java
index a64972c..c60a9f3 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java
@@ -34,6 +34,6 @@ public class AudioPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new AudioPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new AudioPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java
index fad3f86..97a2dc6 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java
@@ -34,6 +34,6 @@ public class ColorPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ColorPreference.Factory(), DisplayPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ColorPreference.Factory(), DisplayPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java
index 298312d..fe5ebcb 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java
@@ -34,6 +34,6 @@ public class DisplayPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new DisplayPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new DisplayPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java
index 3ffebf0..568e533 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java
@@ -34,6 +34,6 @@ public class DrawingPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new DrawingPreference.Factory(), DisplayPreference.class, 2);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new DrawingPreference.Factory(), DisplayPreference.class, 2);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java
index 9da541a..cd5590e 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java
@@ -34,6 +34,6 @@ public class LafPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new LafPreference.Factory(), DisplayPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new LafPreference.Factory(), DisplayPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java
index c8817d6..0b583ce 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java
@@ -34,6 +34,6 @@ public class LanguagePreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new LanguagePreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new LanguagePreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java
index deb4090..32ba9e2 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java
@@ -34,6 +34,6 @@ public class ImageryPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ImageryPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ImageryPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java
index 2875c4f..8adf9f4 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java
@@ -34,6 +34,6 @@ public class BackupPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new BackupPreference.Factory(), MapPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new BackupPreference.Factory(), MapPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java
index 597c6d3..fb32b50 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java
@@ -34,6 +34,6 @@ public class MapPaintPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new MapPaintPreference.Factory(), MapPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new MapPaintPreference.Factory(), MapPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java
index 4bcb491..2ddabd3 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java
@@ -34,6 +34,6 @@ public class MapPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new MapPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new MapPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java
index bef9583..18d86d1 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java
@@ -34,6 +34,6 @@ public class TaggingPresetPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new TaggingPresetPreference.Factory(), MapPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new TaggingPresetPreference.Factory(), MapPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
index c20b55b..6174441 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
@@ -88,6 +88,6 @@ public class PluginPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new PluginPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new PluginPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java
index 573cd48..e7e9098 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java
@@ -35,6 +35,6 @@ public class ProjectionPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ProjectionPreference.Factory(), MapPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ProjectionPreference.Factory(), MapPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java
index 4e0064c..158824a 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java
@@ -34,6 +34,6 @@ public class RemoteControlPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new RemoteControlPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new RemoteControlPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java
index ad24c5a..47a7a24 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java
@@ -34,6 +34,6 @@ public class AuthenticationPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new AuthenticationPreference.Factory(), ServerAccessPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new AuthenticationPreference.Factory(), ServerAccessPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java
index 1e76036..aacdd2e 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java
@@ -34,6 +34,6 @@ public class OverpassServerPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new OverpassServerPreference.Factory(), ServerAccessPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new OverpassServerPreference.Factory(), ServerAccessPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
index 4a40659..6ef9127 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
@@ -34,6 +34,6 @@ public class ProxyPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ProxyPreference.Factory(), ServerAccessPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ProxyPreference.Factory(), ServerAccessPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
index 34a70c7..ae7f180 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
@@ -34,6 +34,6 @@ public class ServerAccessPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ServerAccessPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ServerAccessPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java
index 2cc85b5..68e7e2c 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java
@@ -34,6 +34,6 @@ public class ShortcutPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ShortcutPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ShortcutPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java
index 7934ba5..121ec3e 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java
@@ -34,6 +34,6 @@ public class ValidatorPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ValidatorPreference.Factory(), null);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ValidatorPreference.Factory(), null);
}
}
diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java
index f5aaa4d..6c490be 100644
--- a/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java
+++ b/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java
@@ -34,6 +34,6 @@ public class ValidatorTestsPreferenceTest {
*/
@Test
public void testAddGui() {
- PreferencesTestUtils.testPreferenceSettingAddGui(new ValidatorTestsPreference.Factory(), ValidatorPreference.class);
+ PreferencesTestUtils.doTestPreferenceSettingAddGui(new ValidatorTestsPreference.Factory(), ValidatorPreference.class);
}
}
diff --git a/test/unit/org/openstreetmap/josm/tools/AudioPlayerTest.java b/test/unit/org/openstreetmap/josm/tools/AudioPlayerTest.java
index 72efa07..147c18b 100644
--- a/test/unit/org/openstreetmap/josm/tools/AudioPlayerTest.java
+++ b/test/unit/org/openstreetmap/josm/tools/AudioPlayerTest.java
@@ -18,8 +18,8 @@ import org.openstreetmap.josm.TestUtils;
*/
public class AudioPlayerTest {
- // We play wav files of about 4 seconds + pause, so define timeout at 12 seconds
- private static final long MAX_DURATION = 12000;
+ // We play wav files of about 4 seconds + pause, so define timeout at 16 seconds
+ private static final long MAX_DURATION = 16000;
/**
* Setup test.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/josm.git
More information about the Pkg-grass-devel
mailing list