Changeset 5694 in josm for trunk


Ignore:
Timestamp:
2013-02-05T03:06:08+01:00 (7 years ago)
Author:
Don-vip
Message:

fix #8394 - improve javadoc + remove deprecated debug method

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

Legend:

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

    r5418 r5694  
    1010import java.util.List;
    1111import javax.swing.Icon;
    12 
    13 import javax.swing.JLabel;
    1412
    1513import org.openstreetmap.josm.data.coor.EastNorth;
     
    176174                throw new AssertionError("null detected in node list");
    177175            if (n.getEastNorth() == null)
    178                 throw new AssertionError(n.get3892DebugInfo());
     176                throw new AssertionError("null coordinates detected in node list");
    179177
    180178            n.setEastNorth(n.getEastNorth().add(x, y));
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r5410 r5694  
    189189        super.setDataset(dataSet);
    190190        if (!isIncomplete() && isVisible() && (getCoor() == null || getEastNorth() == null))
    191             throw new DataIntegrityProblemException("Complete node with null coordinates: " + toString() + get3892DebugInfo());
     191            throw new DataIntegrityProblemException("Complete node with null coordinates: " + toString());
    192192    }
    193193
     
    320320
    321321    /**
    322      * Get debug info for bug #3892.
    323      * @return debug info for bug #3892.
    324      * @deprecated This method will be remove by the end of 2012 if no report appears.
    325      */
    326     public String get3892DebugInfo() {
    327         StringBuilder builder = new StringBuilder();
    328         builder.append("Unexpected error. Please report it to http://josm.openstreetmap.de/ticket/3892\n");
    329         builder.append(toString());
    330         builder.append("\n");
    331         if (isLatLonKnown()) {
    332             builder.append("Coor is null\n");
    333         } else {
    334             builder.append(String.format("EastNorth: %s\n", getEastNorth()));
    335             builder.append(Main.getProjection());
    336             builder.append("\n");
    337         }
    338 
    339         return builder.toString();
    340     }
    341 
    342     /**
    343322     * Invoke to invalidate the internal cache of projected east/north coordinates.
    344323     * Coordinates are reprojected on demand when the {@link #getEastNorth()} is invoked
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r5552 r5694  
    584584                for (Node n: nodes) {
    585585                    if (n.isVisible() && !n.isIncomplete() && (n.getCoor() == null || n.getEastNorth() == null))
    586                         throw new DataIntegrityProblemException("Complete visible node with null coordinates: " + toString() + n.get3892DebugInfo(),
     586                        throw new DataIntegrityProblemException("Complete visible node with null coordinates: " + toString(),
    587587                                "<html>" + tr("Complete node {0} with null coordinates in way {1}",
    588588                                DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(n),
     
    690690    /**
    691691     * Replies the first node of this way, respecting or not its oneway state.
    692      * @param respectOneway If true and if this way is a oneway, replies the last node. Otherwise, replies the first node.
     692     * @param respectOneway If true and if this way is a reversed oneway, replies the last node. Otherwise, replies the first node.
    693693     * @return the first node of this way, according to {@code respectOneway} and its oneway state.
    694694     * @since 5199
     
    700700    /**
    701701     * Replies the last node of this way, respecting or not its oneway state.
    702      * @param respectOneway If true and if this way is a oneway, replies the first node. Otherwise, replies the last node.
     702     * @param respectOneway If true and if this way is a reversed oneway, replies the first node. Otherwise, replies the last node.
    703703     * @return the last node of this way, according to {@code respectOneway} and its oneway state.
    704704     * @since 5199
Note: See TracChangeset for help on using the changeset viewer.