Changeset 13019 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-10-18T12:21:41+02:00 (7 years ago)
Author:
bastiK
Message:

fixed #15449 - JOSM version checker is broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/bugreport/JosmUpdatePanel.java

    r12918 r13019  
    66import java.awt.GridBagLayout;
    77import java.io.IOException;
     8import java.nio.charset.StandardCharsets;
    89
    910import javax.swing.JButton;
     
    1516import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    1617import org.openstreetmap.josm.gui.widgets.UrlLabel;
     18import org.openstreetmap.josm.io.CachedFile;
    1719import org.openstreetmap.josm.tools.GBC;
    1820import org.openstreetmap.josm.tools.ImageProvider;
    1921import org.openstreetmap.josm.tools.Logging;
    20 import org.openstreetmap.josm.tools.WikiReader;
    2122
    2223/**
     
    6162    private static int getTestedVersion() {
    6263        try {
    63             String testedString = new WikiReader().read(Main.getJOSMWebsite() + "/tested");
     64            CachedFile testedVersion = new CachedFile(Main.getJOSMWebsite() + "/tested");
     65            testedVersion.setMaxAge(60 * 15); // 15 Minutes
     66            String testedString = new String(testedVersion.getByteContent(), StandardCharsets.ISO_8859_1);
    6467            return Integer.parseInt(testedString.trim());
    6568        } catch (NumberFormatException | IOException e) {
Note: See TracChangeset for help on using the changeset viewer.