Ticket #4059: HistoryRelationMemberException.patch

File HistoryRelationMemberException.patch, 1.2 KB (added by mjulius, 16 years ago)
  • src/org/openstreetmap/josm/data/osm/history/RelationMember.java

     
    2020     *
    2121     * @param role  the role
    2222     * @param primitiveType  the type (must not be null)
    23      * @param primitiveId the id (>0 required)
     23     * @param primitiveId the id
    2424     *
    2525     * @exception IllegalArgumentException thrown, if primitiveType is null
    26      * @exception IllegalArgumentException thrown, if primitiveId <= 0
    2726     */
    2827    public RelationMember(String role, OsmPrimitiveType primitiveType, long primitiveId) {
    2928        this.role = (role == null ? "" : role);
    3029        if (primitiveType == null)
    3130            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitiveType"));
    3231        this.primitiveType = primitiveType;
    33         if (primitiveId <=0)
    34             throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "primitiveId", primitiveId));
    3532        this.primitiveId = primitiveId;
    3633    }
    3734