Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-01-16 17:15:37 -07:00
rodzic fdd4ce0b02
commit 9ed527b36a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
5 zmienionych plików z 11 dodań i 11 usunięć

Wyświetl plik

@ -22,7 +22,7 @@ import org.openstreetmap.josm.tools.Destroyable;
*/
public final class DownloadListener implements DataSourceListener, Destroyable {
private WeakReference<DataSet> ds;
private final WeakReference<DataSet> ds;
private static final Collection<DownloadListener> LISTENERS = new HashSet<>();
public DownloadListener(DataSet dataSet) {

Wyświetl plik

@ -226,7 +226,7 @@ public class MapWithAILayer extends OsmDataLayer implements ActiveLayerChangeLis
return continuousDownload;
}
private class ContinuousDownloadAction extends AbstractAction implements LayerAction {
private static class ContinuousDownloadAction extends AbstractAction implements LayerAction {
private static final long serialVersionUID = -3528632887550700527L;
private final MapWithAILayer layer;

Wyświetl plik

@ -74,8 +74,8 @@ public class MapWithAIMoveAction extends JosmAction {
}
final Collection<OsmPrimitive> selected = limitCollection(ds, maxAddition);
final OsmDataLayer editLayer = getOsmDataLayer();
if (editLayer != null && !selected.isEmpty()
&& (MapWithAIDataUtils.getAddedObjects() < maxAddition * MAX_ADD_MULTIPLIER)
if ((editLayer != null && !selected.isEmpty()
&& (MapWithAIDataUtils.getAddedObjects() < maxAddition * MAX_ADD_MULTIPLIER))
|| (maxAddition == 0 && ExpertToggleAction.isExpert())) {
final MapWithAIAddCommand command = new MapWithAIAddCommand(mapWithAI, editLayer, selected);
UndoRedoHandler.getInstance().add(command);
@ -88,7 +88,7 @@ public class MapWithAIMoveAction extends JosmAction {
}
}
private void createTooManyAdditionsNotification(int maxAddition) {
private static void createTooManyAdditionsNotification(int maxAddition) {
Notification tooMany = new Notification();
tooMany.setIcon(JOptionPane.WARNING_MESSAGE);
tooMany.setDuration(Notification.TIME_DEFAULT);

Wyświetl plik

@ -102,8 +102,8 @@ public class RoutingIslandsTest extends Test {
errors.add(TestError.builder(this, SEVERITY_MAP.get(LONELY_WAY), LONELY_WAY).primitives(way)
.message(tr("MapWithAI (experimental)"), marktr("Routable way not connected to other ways"))
.build());
} else if (((ValidatorPrefHelper.PREF_OTHER.get() || ValidatorPrefHelper.PREF_OTHER_UPLOAD.get()
|| !Severity.OTHER.equals(SEVERITY_MAP.get(ROUTING_ISLAND)))) && !isBeforeUpload) {
} else if ((ValidatorPrefHelper.PREF_OTHER.get() || ValidatorPrefHelper.PREF_OTHER_UPLOAD.get()
|| !Severity.OTHER.equals(SEVERITY_MAP.get(ROUTING_ISLAND))) && !isBeforeUpload) {
if (way.hasKey(HIGHWAY)) {
potentialHighways.add(way);
} else if (way.hasKey(WATERWAY)) {
@ -395,7 +395,7 @@ public class RoutingIslandsTest extends Test {
*/
public static Node firstNode(Way way, String transportType) {
Integer oneway = isOneway(way, transportType);
Node node = (Integer.valueOf(-1).equals(oneway)) ? way.lastNode() : way.firstNode();
Node node = Integer.valueOf(-1).equals(oneway) ? way.lastNode() : way.firstNode();
Map<String, String> accessValues = getDefaultAccessTags(way);
boolean accessible = Access.getPositiveAccessValues()
@ -413,7 +413,7 @@ public class RoutingIslandsTest extends Test {
*/
public static Node lastNode(Way way, String transportType) {
Integer oneway = isOneway(way, transportType);
Node node = (Integer.valueOf(-1).equals(oneway)) ? way.firstNode() : way.lastNode();
Node node = Integer.valueOf(-1).equals(oneway) ? way.firstNode() : way.lastNode();
Map<String, String> accessValues = getDefaultAccessTags(way);
boolean accessible = Access.getPositiveAccessValues()
.contains(accessValues.getOrDefault(transportType, Access.AccessTags.NO.getKey()));

Wyświetl plik

@ -340,8 +340,8 @@ public class Access {
*/
TRAIN("train", RAIL_TRANSPORT_TYPE);
private String key;
private AccessTags type;
private final String key;
private final AccessTags type;
AccessTags(String key) {
this.key = key;