Changeset 5929 in josm


Ignore:
Timestamp:
2013-05-06T00:45:32+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #8677 - NPE in VersionHistoryPanel when undoing/redoing changeset revert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r5926 r5929  
    9494                    );
    9595        } else {
     96            String date = "?";
     97            if (primitive.getTimestamp() != null) {
     98                date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(primitive.getTimestamp());
     99            }
    96100            text = tr(
    97101                    "<html>Version <strong>{0}</strong> created on <strong>{1}</strong></html>",
    98                     Long.toString(primitive.getVersion()),
    99                     DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(primitive.getTimestamp())
    100                     );
     102                    Long.toString(primitive.getVersion()), date);
    101103        }
    102104        return text;
    103105    }
    104106
     107    /**
     108     * Constructs a new {@code VersionInfoPanel}.
     109     */
    105110    public VersionInfoPanel() {
    106111        pointInTimeType = null;
Note: See TracChangeset for help on using the changeset viewer.