Ignore:
Timestamp:
2006-04-03T22:25:02+02:00 (18 years ago)
Author:
imi
Message:
  • fixed bug in osm import (now reject id=0)
  • added WMS server layer (not finished)
  • added save state for dialogs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/io/OsmReader.java

    r72 r79  
    7474                                        throw new SAXException("Unknown version.");
    7575                                if (!"0.3".equals(atts.getValue("version")))
    76                                         throw new SAXException("Unknown version: "+atts.getValue("version"));
     76                                        throw new SAXException("Unknown version "+atts.getValue("version"));
    7777                        } else if (qName.equals("node")) {
    7878                                Node n = new Node(new LatLon(getDouble(atts, "lat"), getDouble(atts, "lon")));
     
    9393                                if (current instanceof Way) {
    9494                                        long id = getLong(atts, "id");
     95                                        if (id == 0)
     96                                                throw new SAXException("Incomplete line segment with id=0");
    9597                                        LineSegment ls = lineSegments.get(id);
    9698                                        if (ls == null) {
     
    105107                        }
    106108                } catch (NumberFormatException x) {
     109            x.printStackTrace(); // SAXException does not chain correctly
    107110                        throw new SAXException(x.getMessage(), x);
    108111                } catch (NullPointerException x) {
     
    122125         * Read out the common attributes from atts and put them into this.current.
    123126         */
    124         private void readCommon(Attributes atts) {
     127        private void readCommon(Attributes atts) throws SAXException {
    125128                current.id = getLong(atts, "id");
     129                if (current.id == 0)
     130                        throw new SAXException("Illegal object with id=0");
    126131                String action = atts.getValue("action");
    127132                if ("delete".equals(action))
Note: See TracChangeset for help on using the changeset viewer.