Changeset 36091 in osm


Ignore:
Timestamp:
2023-05-30T21:32:07+02:00 (14 months ago)
Author:
stoecker
Message:

fix warnings

Location:
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java

    r32519 r36091  
    3030     * See also {@link #getPrimitiveIds()} and {@link #getAsString()}
    3131     */
    32     public static final DataFlavor[] SUPPORTED_FLAVORS = new DataFlavor[] {
     32    private static final DataFlavor[] SUPPORTED_FLAVORS = new DataFlavor[] {
    3333        PRIMITIVE_ID_LIST_FLAVOR,
    3434        DataFlavor.stringFlavor
     
    4949
    5050    /**
    51      * <p>If flavor is {@link #PRIMITIVE_ID_SET_FLAVOR}, replies a the list of
     51     * <p>If flavor is {@link #PRIMITIVE_ID_LIST_FLAVOR}, replies a the list of
    5252     * transferred {@link PrimitiveId}s</p>
    5353     *
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java

    r32519 r36091  
    130130     * model.
    131131     *
    132      * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
     132     * @param vehicleType one of the standard vehicle types from {@link #STANDARD_VEHICLE_EXCEPTION_VALUES}
    133133     * @return true if {@code vehicleType} is currently set as exception in this
    134134     * model.
     
    147147     * Sets the {@code vehicleType} as exception in this turn restriction.
    148148     *
    149      * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
     149     * @param vehicleType one of the standard vehicle types from {@link #STANDARD_VEHICLE_EXCEPTION_VALUES}
    150150     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
    151151     */
     
    162162     * on whether {@code setOrRemove} is true or false, respectively.
    163163     *
    164      * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
     164     * @param vehicleType one of the standard vehicle types from {@link #STANDARD_VEHICLE_EXCEPTION_VALUES}
    165165     * @param setOrRemove if true, the exception is set; otherwise, it is removed
    166166     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
     
    177177     * Removes the {@code vehicleType} as exception in this turn restriction
    178178     *
    179      * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
     179     * @param vehicleType one of the standard vehicle types from {@link #STANDARD_VEHICLE_EXCEPTION_VALUES}
    180180     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
    181181     */
     
    199199        if (this == obj)
    200200            return true;
    201         if (obj == null)
    202             return false;
    203         if (getClass() != obj.getClass())
     201        if (!(obj instanceof ExceptValueModel))
    204202            return false;
    205203        ExceptValueModel other = (ExceptValueModel) obj;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java

    r34567 r36091  
    4646     * Constructor
    4747     *
    48      * @param selectionModel the selection model used in the list. Must not be null.
    4948     * @param layer the layer this model is displaying the selection from. Must not be null.
    5049     * @throws IllegalArgumentException thrown if {@code layer} is null
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberModel.java

    r32519 r36091  
    9696        if (this == obj)
    9797            return true;
    98         if (obj == null)
    99             return false;
    100         if (getClass() != obj.getClass())
     98        if (!(obj instanceof RelationMemberModel))
    10199            return false;
    102100        RelationMemberModel other = (RelationMemberModel) obj;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r36009 r36091  
    6161public class TurnRestrictionEditor extends JDialog implements NavigationControler {
    6262
    63     /** the property name for the current turn restriction
    64      * @link #setRelation(Relation)
    65      * @link #getRelation()
    66      */
    67     public static final String TURN_RESTRICION_PROP = RelationEditor.class.getName() + ".turnRestriction";
    68 
    69     /** the property name for the current relation snapshot
    70      * @link #getRelationSnapshot()
    71      */
    72     public static final String TURN_RESTRICION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".turnRestrictionSnapshot";
     63    /** The property name for the current turn restriction, see {@link #setTurnRestriction(Relation)} and
     64     * {@link #getTurnRestriction()}
     65     */
     66    public static final String TURN_RESTRICTION_PROP = RelationEditor.class.getName() + ".turnRestriction";
     67
     68    /** the property name for the current relation snapshot, see {@link #getTurnRestrictionSnapshot()}
     69     */
     70    public static final String TURN_RESTRICTION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".turnRestrictionSnapshot";
    7371
    7472    /**
     
    192190
    193191    /**
    194      * builds the UI
     192     * Builds the UI
    195193     */
    196194    protected void build() {
     
    265263        setTurnRestrictionSnapshot(turnRestriction == null ? null : new Relation(turnRestriction));
    266264        this.turnRestriction = turnRestriction;
    267         support.firePropertyChange(TURN_RESTRICION_PROP, null, this.turnRestriction);
     265        support.firePropertyChange(TURN_RESTRICTION_PROP, null, this.turnRestriction);
    268266        updateTitle();
    269267    }
     
    309307    protected void setTurnRestrictionSnapshot(Relation snapshot) {
    310308        turnRestrictionSnapshot = snapshot;
    311         support.firePropertyChange(TURN_RESTRICION_SNAPSHOT_PROP, null, turnRestrictionSnapshot);
     309        support.firePropertyChange(TURN_RESTRICTION_SNAPSHOT_PROP, null, turnRestrictionSnapshot);
    312310    }
    313311
     
    779777        @Override
    780778        public void propertyChange(PropertyChangeEvent evt) {
    781             if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)) {
     779            if (evt.getPropertyName().equals(TURN_RESTRICTION_PROP)) {
    782780                updateEnabledState();
    783781            }
     
    807805        @Override
    808806        public void propertyChange(PropertyChangeEvent evt) {
    809             if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)) {
     807            if (evt.getPropertyName().equals(TURN_RESTRICTION_PROP)) {
    810808                updateEnabledState();
    811809            }
     
    839837        @Override
    840838        public void propertyChange(PropertyChangeEvent evt) {
    841             if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)) {
     839            if (evt.getPropertyName().equals(TURN_RESTRICTION_PROP)) {
    842840                updateEnabledState();
    843841            }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java

    r33537 r36091  
    7171            if (this == obj)
    7272                return true;
    73             if (obj == null)
    74                 return false;
    75             if (getClass() != obj.getClass())
     73            if (!(obj instanceof DialogContext))
    7674                return false;
    7775            DialogContext other = (DialogContext) obj;
     
    175173     * is currently open. Returns null, if relation is null.
    176174     *
     175     * See also {@link #isOpenInEditor(OsmDataLayer, Relation)}
     176     *
    177177     * @param layer the layer
    178178     * @param relation the relation
    179179     * @return the editor for the turn restriction managed by layer. Null, if no such editor
    180180     * is currently open.
    181      *
    182      * @link #isOpenInEditor(OsmDataLayer, Relation)
    183181     */
    184182    public TurnRestrictionEditor getEditorForRelation(OsmDataLayer layer, Relation relation) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java

    r32519 r36091  
    274274     * <p>If {@code vias} is null, all vias are removed. All primitives
    275275     * in {@code vias} must be assigned to a dataset and the dataset
    276      * must be equal to the dataset of this editor model, see {@link #getDataSet()}</p>
    277      *
    278      * <p>null values in {@link vias} are skipped.</p>
     276     * must be equal to the dataset of this editor model, see {@link OsmPrimitive#getDataSet()}</p>
     277     *
     278     * <p>null values in {@code vias} are skipped.</p>
    279279     *
    280280     * @param vias the list of vias
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java

    r33537 r36091  
    185185     * @throws IllegalArgumentException thrown if {@code layer} is null
    186186     */
    187     public TurnRestrictionSelectionPopupPanel(OsmDataLayer layer, Collection<Relation> editCandiates) {
     187    public TurnRestrictionSelectionPopupPanel(OsmDataLayer layer, Collection<Relation> editCandidates) {
    188188        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
    189189        this.layer = layer;
    190         build(editCandiates);
     190        build(editCandidates);
    191191    }
    192192
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java

    r33537 r36091  
    209209     * Sets the selected turn restrictions
    210210     *
    211      * @return sel the list of selected turn restrictions
     211     * @param sel the list of selected turn restrictions
    212212     */
    213213    public void setSelectedTurnRestrictions(List<Relation> sel) {
     
    227227     * Returns the index of a turn restriction
    228228     *
     229     * @param tr Turn restriction relation to check
    229230     * @return index of relation (-1, if not found)
    230231     */
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java

    r32519 r36091  
    1313 * An issue represents a data integrity violation in a turn restriction.
    1414 *
    15  * The issue has a {@see Severity}. It is described to the user with a HTML formatted
    16  * text (see {@see #getText()}) and it suggests a list of possible actions to fix
    17  * the issue (see {@see #getActions()}).
     15 * The issue has a {@link Severity}. It is described to the user with a HTML formatted
     16 * text (see {@link #getText()}) and it suggests a list of possible actions to fix
     17 * the issue (see {@link #getActions()}).
    1818 *
    1919 */
     
    2626    /**
    2727     * Creates a new issue associated with a parent model. Severity is
    28      * initialized to {@see Severity#WARNING}.
     28     * initialized to {@link Severity#WARNING}.
    2929     *
    3030     * @param parent the parent model. Must not be null.
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssueView.java

    r32519 r36091  
    2323
    2424/**
    25  * An IssueView is a view on an individual {@see Issue}.
     25 * An IssueView is a view on an individual {@link Issue}.
    2626 */
    2727public class IssueView extends JPanel {
     
    3535     * Builds the style sheet used in the internal help browser
    3636     *
    37      * @return the style sheet
     37     * @param view the {@code HtmlPanel} where the {@link StyleSheet} should be adapted
    3838     */
    3939    protected void initStyleSheet(HtmlPanel view) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java

    r32519 r36091  
    8484     * turn restriction editor model. If {@code editorModel} is null, the
    8585     * list of issues is cleared.
    86      *
    87      * @param editorModel the editor model.
    8886     */
    8987    public void populate() {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesView.java

    r32519 r36091  
    1414
    1515/**
    16  * IssuesView provides a view on a {@see IssuesModel}.
     16 * IssuesView provides a view on a {@link IssuesModel}.
    1717 */
    1818public class IssuesView extends VerticallyScrollablePanel implements Observer {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java

    r34567 r36091  
    4040     * @param from the way with role "from"
    4141     * @param to the way with role "to"
    42      * @param intersect the intersection node
    4342     */
    4443    public TurnRestrictionLegSplitRequiredError(IssuesModel parent, Way from, Way to) {
Note: See TracChangeset for help on using the changeset viewer.