Changeset 11510 in josm


Ignore:
Timestamp:
2017-01-29T23:58:49+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib:ACEM_ABSTRACT_CLASS_EMPTY_METHODS

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r11374 r11510  
    580580     * Should set {@link #menu}
    581581     */
    582     protected void initializeMainWindow() {
    583         // can be implementd by subclasses
    584     }
     582    protected abstract void initializeMainWindow();
    585583
    586584    private static class InitializationTask implements Callable<Void> {
  • trunk/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java

    r11288 r11510  
    44import java.io.IOException;
    55import java.io.StringReader;
     6import java.net.MalformedURLException;
    67import java.net.URL;
    78import java.util.List;
     
    1415import org.openstreetmap.josm.gui.util.GuiHelper;
    1516import org.openstreetmap.josm.io.CacheCustomContent;
     17import org.openstreetmap.josm.io.OnlineResource;
    1618import org.openstreetmap.josm.tools.HttpClient;
    1719import org.xml.sax.InputSource;
     
    5860            return r.getBytes("UTF-8");
    5961        }
     62
     63        @Override
     64        protected void checkOfflineAccess() {
     65            try {
     66                String attributionUrl = getAttributionUrl().toExternalForm();
     67                OnlineResource.ALL.checkOfflineAccess(attributionUrl, attributionUrl);
     68            } catch (MalformedURLException e) {
     69                Main.error(e);
     70            }
     71        }
    6072    }
    6173
  • trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java

    r11223 r11510  
    214214        }
    215215
    216         protected void applyValueToLayer(T layer) {
    217         }
     216        abstract void applyValueToLayer(T layer);
    218217
    219218        protected double getRealValue() {
  • trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java

    r11288 r11510  
    103103    }
    104104
    105     protected void checkOfflineAccess() {
    106         // To be overriden by subclasses
    107     }
     105    /**
     106     * Ensures underlying resource is not accessed in offline mode.
     107     * @throws OfflineAccessException if resource is accessed in offline mode
     108     */
     109    protected abstract void checkOfflineAccess();
    108110
    109111    /**
Note: See TracChangeset for help on using the changeset viewer.