Fix some lint issues

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head v1.1.6
Taylor Smock 2020-01-20 09:36:17 -07:00
rodzic 17bb7ed85f
commit c6576cc8be
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
3 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -26,8 +26,9 @@ public final class DownloadListener implements DataSourceListener, Destroyable {
private static final Collection<DownloadListener> LISTENERS = new HashSet<>();
public DownloadListener(DataSet dataSet) {
ds = new WeakReference<>(Objects.requireNonNull(dataSet, "DataSet cannot be null"));
ds.get().addDataSourceListener(this);
Objects.requireNonNull(dataSet, "DataSet cannot be null");
ds = new WeakReference<>(dataSet);
dataSet.addDataSourceListener(this);
LISTENERS.add(this);
}
@ -48,9 +49,10 @@ public final class DownloadListener implements DataSourceListener, Destroyable {
@Override
public void destroy() {
if (ds.get() != null) {
DataSet realDs = ds.get();
if (realDs != null) {
// Should be added, so no exception should be thrown
ds.get().removeDataSourceListener(this);
realDs.removeDataSourceListener(this);
ds.clear();
LISTENERS.remove(this);
}

Wyświetl plik

@ -231,7 +231,7 @@ public class RoutingIslandsTest extends Test {
* Not an issue -- this ensures that everything is accounted for, only triggers
* when ways removed
*/
i--; // NOSONAR
i--; // NOSONAR NOPMD
}
collected.add(connected);
}

Wyświetl plik

@ -25,7 +25,7 @@ import org.openstreetmap.josm.data.osm.OsmPrimitive;
* @author Taylor Smock
* @since xxx
*/
public class Access {
public final class Access {
/**
* Holds access tags to avoid typos
*/