Ignore:
Timestamp:
2013-10-04T03:27:01+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - Avoid commented-out lines of code, javadoc

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r6069 r6296  
    8080    protected void mergePrimitive(OsmPrimitive source, Collection<? extends OsmPrimitive> candidates) {
    8181        if (!source.isNew() ) {
    82             // try to merge onto a matching primitive with the same
    83             // defined id
     82            // try to merge onto a matching primitive with the same defined id
    8483            //
    8584            if (mergeById(source))
    8685                return;
    87             //if (!source.isVisible())
    88             // ignore it
    89             //    return;
    9086        } else {
    9187            // ignore deleted primitives from source
     
    10197                if (target.hasEqualSemanticAttributes(source)) {
    10298                    mergedMap.put(source.getPrimitiveId(), target.getPrimitiveId());
    103                     // copy the technical attributes from other
    104                     // version
     99                    // copy the technical attributes from other version
    105100                    target.setVisible(source.isVisible());
    106101                    target.setUser(source.getUser());
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r6248 r6296  
    11271127        if (!isNew() &&  id != other.id)
    11281128            return false;
    1129         //        if (isIncomplete() && ! other.isIncomplete() || !isIncomplete()  && other.isIncomplete())
    11301129        if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159)
    11311130            return false;
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r6235 r6296  
    506506            QBLevel<T> next;
    507507            next = q.nextContentNode();
    508             //if (consistency_testing && (orig == next))
    509508            if (orig == next) {
    510509                abort("got same leaf back leaf: " + q.isLeaf());
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r6084 r6296  
    249249        // equal semantics is valid for subclasses like {@link HistoryOsmNode} etc. too.
    250250        // So, don't enforce equality of class.
    251         //
    252         //        if (getClass() != obj.getClass())
    253         //            return false;
    254251        HistoryOsmPrimitive other = (HistoryOsmPrimitive) obj;
    255252        if (id != other.id)
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r6248 r6296  
    498498            } else {
    499499                TexturePaint texture = new TexturePaint(fillImage.getImage(),
    500                         //                        new Rectangle(polygon.xpoints[0], polygon.ypoints[0], fillImage.getWidth(), fillImage.getHeight()));
    501500                        new Rectangle(0, 0, fillImage.getWidth(), fillImage.getHeight()));
    502501                g.setPaint(texture);
     
    511510
    512511        if (text != null && isShowNames()) {
    513             /*
    514              * abort if we can't compose the label to be rendered
    515              */
     512            // abort if we can't compose the label to be rendered
    516513            if (text.labelCompositionStrategy == null) return;
    517514            String name = text.labelCompositionStrategy.compose(osm);
     
    522519            Rectangle2D nb = fontMetrics.getStringBounds(name, g); // if slow, approximate by strlen()*maxcharbounds(font)
    523520
    524             // Point2D c = getCentroid(polygon);
    525521            // Using the Centroid is Nicer for buildings like: +--------+
    526522            // but this needs to be fast.  As most houses are  |   42   |
     
    528524            // will have to do.                                    ++
    529525            // Centroids are not optimal either, just imagine a U-shaped house.
    530             // Point2D c = new Point2D.Double(pb.x + pb.width / 2.0, pb.y + pb.height / 2.0);
    531             // Rectangle2D.Double centeredNBounds =
    532             //     new Rectangle2D.Double(c.getX() - nb.getWidth()/2,
    533             //                            c.getY() - nb.getHeight()/2,
    534             //                            nb.getWidth(),
    535             //                            nb.getHeight());
    536526
    537527            Rectangle centeredNBounds = new Rectangle(pb.x + (int)((pb.width - nb.getWidth())/2.0),
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r6248 r6296  
    488488                        }
    489489                    }
    490                 } /* for(i = ... */
    491             } /* while(joined) */
     490                }
     491            }
    492492
    493493            if (nodes == null) {
     
    497497
    498498            result.add(new JoinedWay(nodes, wayIds, selected));
    499         } /* while(left != 0) */
     499        }
    500500
    501501        return result;
     
    575575        return innerWays;
    576576    }
    577 /*
    578     public List<PolyData> getInnerPolygons() {
    579         return innerPolygons;
    580     }
    581 
    582     public List<PolyData> getOuterPolygons() {
    583         return outerPolygons;
    584     }
    585 */
     577
    586578    public List<PolyData> getCombinedPolygons() {
    587579        return combinedPolygons;
Note: See TracChangeset for help on using the changeset viewer.