kopia lustrzana https://github.com/JOSM/MapWithAI
Fix some lint issues
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head v1.1.6
rodzic
17bb7ed85f
commit
c6576cc8be
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Ładowanie…
Reference in New Issue