Ignore:
Timestamp:
2013-11-17T10:21:17+01:00 (11 years ago)
Author:
belecker
Message:

JOSM/tracer2: Change server version format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/server/GetVersion.java

    r30047 r30053  
    2323    public int m_nVersionMajor = -1;
    2424    public int m_nVersionMinor = -1;
     25    public int m_nVersionBuild = -1;
     26    public int m_nVersionRevision = -1;
    2527   
    2628    /**
     
    4648           
    4749            String[] astrParts = strResponse.split(":");
    48             if (astrParts.length != 2) {
     50            if (astrParts.length < 2) {
    4951                return;
    5052            }
    51             int nMajor = Integer.parseInt(astrParts[0]);
    52             int nMinor = Integer.parseInt(astrParts[1]);
    53             m_nVersionMajor = nMajor;
    54             m_nVersionMinor = nMinor;
     53            if (astrParts.length > 0) m_nVersionMajor = Integer.parseInt(astrParts[0]);
     54            if (astrParts.length > 1) m_nVersionMinor = Integer.parseInt(astrParts[1]);
     55            if (astrParts.length > 2) m_nVersionBuild = Integer.parseInt(astrParts[2]);
     56            if (astrParts.length > 3) m_nVersionMinor = Integer.parseInt(astrParts[3]);
    5557        } catch (Exception e) {
    5658        }
Note: See TracChangeset for help on using the changeset viewer.