Changeset 8905 in josm for trunk


Ignore:
Timestamp:
2015-10-19T13:14:06+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar minor fixes

Location:
trunk
Files:
4 edited

Legend:

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

    r8870 r8905  
    181181             */
    182182            List<Relation> relLst = new ArrayList<>(relSet);
    183             for (int i = 0; i < relLst.size(); ++i) {
    184                 for (OsmPrimitive parent : relLst.get(i).getReferrers()) {
     183            for (Relation r : relLst) {
     184                for (OsmPrimitive parent : r.getReferrers()) {
    185185                    if (!(toPurgeChecked.contains(parent))
    186186                            && hasOnlyIncompleteMembers((Relation) parent, toPurgeChecked, relLst)) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java

    r8840 r8905  
    5151        Main.debug("Load Thumbnails");
    5252        tracker = new MediaTracker(Main.map.mapView);
    53         for (int i = 0; i < data.size(); i++) {
     53        for (ImageEntry entry : data) {
    5454            if (stop) return;
    5555
    5656            // Do not load thumbnails that were loaded before.
    57             if (data.get(i).thumbnail == null) {
    58                 data.get(i).thumbnail = loadThumb(data.get(i));
     57            if (entry.thumbnail == null) {
     58                entry.thumbnail = loadThumb(entry);
    5959
    6060                if (Main.isDisplayingMapView()) {
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r8644 r8905  
    360360            Object key = keys.nextElement();
    361361            Object value = UIManager.get(key);
    362             if (value != null && value instanceof FontUIResource) {
     362            if (value instanceof FontUIResource) {
    363363                FontUIResource fui = (FontUIResource) value;
    364364                UIManager.put(key, new FontUIResource(name, fui.getStyle(), fui.getSize()));
  • trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java

    r8857 r8905  
    3535     */
    3636    @BeforeClass
    37     public static void setUp() {
     37    public static void setUpBeforeClass() {
    3838        JOSMFixture.createUnitTestFixture().init();
    3939    }
     
    4343     */
    4444    @Before
    45     public void setup() {
     45    public void setUp() {
    4646        component = new NavigatableComponent();
    4747        component.setBounds(new Rectangle(WIDTH, HEIGHT));
Note: See TracChangeset for help on using the changeset viewer.