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


Ignore:
Timestamp:
2014-03-21T17:31:18+01:00 (11 years ago)
Author:
Don-vip
Message:

fix #9778, fix #9806 - access OSM API and JOSM website in HTTPS by default + other HTTPS links where applicable + update CONTRIBUTION

Location:
trunk/src/org/openstreetmap/josm
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r6901 r6920  
    112112     * @since 6897 (was public from 6143 to 6896)
    113113     */
    114     private static final String JOSM_WEBSITE = "http://josm.openstreetmap.de";
     114    private static final String JOSM_WEBSITE = "https://josm.openstreetmap.de";
    115115
    116116    /**
     
    118118     * @since 6897 (was public from 6453 to 6896)
    119119     */
    120     private static final String OSM_WEBSITE = "http://www.openstreetmap.org";
     120    private static final String OSM_WEBSITE = "https://www.openstreetmap.org";
    121121
    122122    /**
     
    987987     */
    988988    private static DownloadParamType paramType(String s) {
    989         if(s.startsWith("http:")) return DownloadParamType.httpUrl;
     989        if(s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl;
    990990        if(s.startsWith("file:")) return DownloadParamType.fileUrl;
    991991        String coorPattern = "\\s*[+-]?[0-9]+(\\.[0-9]+)?\\s*";
     
    14911491     */
    14921492    public static String getJOSMWebsite() {
    1493         if(Main.pref != null)
     1493        if (Main.pref != null)
    14941494            return Main.pref.get("josm.url", JOSM_WEBSITE);
    14951495        return JOSM_WEBSITE;
     
    15021502     */
    15031503    public static String getXMLBase() {
     1504        // Always return HTTP (issues reported with HTTPS)
    15041505        return "http://josm.openstreetmap.de";
    15051506    }
     
    15111512     */
    15121513    public static String getOSMWebsite() {
    1513         if(Main.pref != null)
     1514        if (Main.pref != null)
    15141515            return Main.pref.get("osm.url", OSM_WEBSITE);
    15151516        return OSM_WEBSITE;
  • trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java

    r6897 r6920  
    3535
    3636    /**
    37      * replies the base URL for browsing information about about a primitive
     37     * Replies the base URL for browsing information about about a primitive.
    3838     *
    39      * @return the base URL, i.e. http://api.openstreetmap.org/browse
     39     * @return the base URL, i.e. https://www.openstreetmap.org
    4040     */
    4141    public static String getBaseBrowseUrl() {
    4242        String baseUrl = Main.pref.get("osm-server.url", OsmApi.DEFAULT_API_URL);
    4343        Pattern pattern = Pattern.compile("/api/?$");
    44         String ret =  pattern.matcher(baseUrl).replaceAll("/browse");
     44        String ret = pattern.matcher(baseUrl).replaceAll("");
    4545        if (ret.equals(baseUrl)) {
    4646            Main.warn(tr("Unexpected format of API base URL. Redirection to info or history page for OSM object will probably fail. API base URL is: ''{0}''",baseUrl));
    4747        }
    48         if (ret.startsWith("http://api.openstreetmap.org/")) {
    49             ret = ret.substring("http://api.openstreetmap.org/".length());
    50             ret = Main.getOSMWebsite() + "/" + ret;
     48        for (String prefix : new String[]{"http://api.openstreetmap.org/", "https://api.openstreetmap.org/"}) {
     49            if (ret.startsWith(prefix)) {
     50                ret = Main.getOSMWebsite() + "/" + ret.substring(prefix.length());
     51                break;
     52            }
    5153        }
    5254        return ret;
     
    5456
    5557    /**
    56      * replies the base URL for browsing information about a user
     58     * Replies the base URL for browsing information about a user.
    5759     *
    58      * @return the base URL, i.e. http://www.openstreetmap.org/user
     60     * @return the base URL, i.e. https://www.openstreetmap.org/user
    5961     */
    6062    public static String getBaseUserUrl() {
     
    6567            Main.warn(tr("Unexpected format of API base URL. Redirection to user page for OSM user will probably fail. API base URL is: ''{0}''",baseUrl));
    6668        }
    67         if (ret.startsWith("http://api.openstreetmap.org/")) {
    68             ret = ret.substring("http://api.openstreetmap.org/".length());
    69             ret = Main.getOSMWebsite() + "/" + ret;
     69        for (String prefix : new String[]{"http://api.openstreetmap.org/", "https://api.openstreetmap.org/"}) {
     70            if (ret.startsWith(prefix)) {
     71                ret = Main.getOSMWebsite() + "/" + ret.substring(prefix.length());
     72                break;
     73            }
    7074        }
    7175        return ret;
  • trunk/src/org/openstreetmap/josm/actions/CopyAction.java

    r6451 r6920  
    2424 */
    2525public final class CopyAction extends JosmAction {
    26    
     26
    2727    // regular expression that matches text clipboard contents after copying
    2828    public static final String CLIPBOARD_REGEXP = "((node|way|relation)\\s\\d+,)*(node|way|relation)\\s\\d+";
     
    3636                Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.CTRL), true);
    3737        putValue("help", ht("/Action/Copy"));
    38         // CUA shortcut for copy (http://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
     38        // CUA shortcut for copy (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
    3939        Main.registerActionShortcut(this,
    4040                Shortcut.registerShortcut("system:copy:cua", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_INSERT, Shortcut.CTRL));
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r6889 r6920  
    295295                        String line;
    296296                        while ((line = reader.readLine()) != null) {
    297                             Matcher m = Pattern.compile(".*(http://.*)").matcher(line);
     297                            Matcher m = Pattern.compile(".*(https?://.*)").matcher(line);
    298298                            if (m.matches()) {
    299299                                String url = m.group(1);
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r6451 r6920  
    4343                Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.CTRL), true);
    4444        putValue("help", ht("/Action/Paste"));
    45         // CUA shortcut for paste (http://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
     45        // CUA shortcut for paste (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
    4646        Main.registerActionShortcut(this,
    4747                Shortcut.registerShortcut("system:paste:cua", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_INSERT, Shortcut.SHIFT));
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java

    r6803 r6920  
    3737    private DownloadTask downloadTask;
    3838
    39     private static final String PATTERN_TRACE_ID = "http://.*(osm|openstreetmap).org/trace/\\p{Digit}+/data";
    40 
    41     private static final String PATTERN_TRACKPOINTS_BBOX = "http://.*/api/0.6/trackpoints\\?bbox=.*,.*,.*,.*";
     39    private static final String PATTERN_TRACE_ID = "https?://.*(osm|openstreetmap).org/trace/\\p{Digit}+/data";
     40
     41    private static final String PATTERN_TRACKPOINTS_BBOX = "https?://.*/api/0.6/trackpoints\\?bbox=.*,.*,.*,.*";
    4242
    4343    private static final String PATTERN_EXTERNAL_GPX_SCRIPT = "https?://.*exportgpx.*";
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java

    r6248 r6920  
    4444    @Override
    4545    public String[] getPatterns() {
    46         return new String[]{"http://.*/api/0.6/changeset/\\p{Digit}+/download", // OSM API 0.6 changesets
     46        return new String[]{"https?://.*/api/0.6/changeset/\\p{Digit}+/download", // OSM API 0.6 changesets
    4747            "https?://.*/.*\\.osc" // Remote .osc files
    4848        };
     
    5353        return tr("Download OSM Change");
    5454    }
    55        
     55
    5656    /* (non-Javadoc)
    5757     * @see org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask#download(boolean, org.openstreetmap.josm.data.Bounds, org.openstreetmap.josm.gui.progress.ProgressMonitor)
     
    125125        }
    126126    }
    127    
     127
    128128    /**
    129129     * Loads history and updates incomplete primitives.
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r6830 r6920  
    3737public class DownloadOsmTask extends AbstractDownloadTask {
    3838
    39     protected static final String PATTERN_OSM_API_URL           = "http://.*/api/0.6/(map|nodes?|ways?|relations?|\\*).*";
     39    protected static final String PATTERN_OSM_API_URL           = "https?://.*/api/0.6/(map|nodes?|ways?|relations?|\\*).*";
    4040    protected static final String PATTERN_OVERPASS_API_URL      = "http://.*/interpreter\\?data=.*";
    4141    protected static final String PATTERN_OVERPASS_API_XAPI_URL = "http://.*/xapi(\\?.*\\[@meta\\]|_meta\\?).*";
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmUrlTask.java

    r6244 r6920  
    22package org.openstreetmap.josm.actions.downloadtasks;
    33
     4import static org.openstreetmap.josm.tools.I18n.tr;
     5
    46import java.util.concurrent.Future;
    5 
    6 import static org.openstreetmap.josm.tools.I18n.tr;
    77
    88import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    1919        return download(newLayer, OsmUrlToBounds.parse(url), null);
    2020    }
    21    
     21
    2222    @Override
    2323    public String[] getPatterns() {
    2424        return new String[]{
    25                 "http://www\\.(osm|openstreetmap)\\.org/\\?lat=.*&lon=.*",
    26                 "http://www\\.(osm|openstreetmap)\\.org/#map=\\p{Digit}+/.*/.*"};
     25                "https?://www\\.(osm|openstreetmap)\\.org/\\?lat=.*&lon=.*",
     26                "https?://www\\.(osm|openstreetmap)\\.org/#map=\\p{Digit}+/.*/.*"};
    2727    }
    2828
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r6889 r6920  
    306306
    307307    // events for crossplatform key holding processing
    308     // thanks to http://www.arco.in-berlin.de/keyevent.html
    309308    private final Set<Integer> set = new TreeSet<Integer>();
    310309    private KeyEvent releaseEvent;
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r6906 r6920  
    284284
    285285    /**
    286      * Returns the heading, in radians, that you have to use to get from
    287      * this lat/lon to another.
     286     * Returns the heading, in radians, that you have to use to get from this lat/lon to another.
    288287     *
    289288     * (I don't know the original source of this formula, but see
    290      * http://math.stackexchange.com/questions/720/how-to-calculate-a-heading-on-the-earths-surface
     289     * <a href="https://math.stackexchange.com/questions/720/how-to-calculate-a-heading-on-the-earths-surface">this question</a>
    291290     * for some hints how it is derived.)
    292291     *
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r6886 r6920  
    801801        if (result == null) {
    802802            Main.warn(tr("JOSM expected to find primitive [{0} {1}] in dataset but it is not there. Please report this "
    803                     + "at http://josm.openstreetmap.de/. This is not a critical error, it should be safe to continue in your work.",
    804                     primitiveId.getType(), Long.toString(primitiveId.getUniqueId())));
     803                    + "at {2}. This is not a critical error, it should be safe to continue in your work.",
     804                    primitiveId.getType(), Long.toString(primitiveId.getUniqueId()), Main.getJOSMWebsite()));
    805805            Main.error(new Exception());
    806806        }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/PrimitiveVisitor.java

    r6069 r6920  
    77
    88/**
    9  * OSM primitives interfaces visitor, following conventional <a href="http://en.wikipedia.org/wiki/Visitor_pattern">visitor design pattern</a>.
     9 * OSM primitives interfaces visitor, following conventional <a href="https://en.wikipedia.org/wiki/Visitor_pattern">visitor design pattern</a>.
    1010 * @since 4100
    1111 */
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java

    r3857 r6920  
    22package org.openstreetmap.josm.data.osm.visitor.paint;
    33
     4import static java.awt.geom.Rectangle2D.OUT_BOTTOM;
    45import static java.awt.geom.Rectangle2D.OUT_LEFT;
    56import static java.awt.geom.Rectangle2D.OUT_RIGHT;
    67import static java.awt.geom.Rectangle2D.OUT_TOP;
    7 import static java.awt.geom.Rectangle2D.OUT_BOTTOM;
     8
    89import java.awt.Point;
    910import java.awt.Rectangle;
     
    4243     * @return end point of the clipped line
    4344     */
    44     public Point getP2()
    45     {
     45    public Point getP2() {
    4646        return p2;
    4747    }
    4848
    4949    /**
    50      * see http://en.wikipedia.org/wiki/Cohen-Sutherland
     50     * Cohen–Sutherland algorithm.
     51     * See <a href="https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm">Wikipedia article</a>
    5152     * @return true, if line is visible in the given clip region
    5253     */
    53     private boolean cohenSutherland( long x1, long y1, long x2, long y2, long xmin, long ymin, long xmax, long ymax)
    54     {
     54    private boolean cohenSutherland( long x1, long y1, long x2, long y2, long xmin, long ymin, long xmax, long ymax) {
    5555        int outcode0, outcode1, outcodeOut;
    5656        boolean accept = false;
  • trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java

    r6830 r6920  
    11/*
    22 * Import from fr.geo.convert package, a geographic coordinates converter.
    3  * (http://www.i3s.unice.fr/~johan/gps/)
     3 * (https://www.i3s.unice.fr/~johan/gps/)
    44 * License: GPL. For details, see LICENSE file.
    55 * Copyright (C) 2002 Johan Montagnat (johan@creatis.insa-lyon.fr)
  • trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java

    r6135 r6920  
    2121
    2222/**
    23  * Projection for the SwissGrid CH1903 / L03, see http://en.wikipedia.org/wiki/Swiss_coordinate_system.
     23 * Projection for the SwissGrid CH1903 / L03, see <a href="https://en.wikipedia.org/wiki/Swiss_coordinate_system">Wikipedia article</a>.<br>
    2424 *
    25  * Calculations were originally based on simple formula from
    26  * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf
     25 * Calculations were originally based on <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf">
     26 * simple formula</a>.<br>
    2727 *
    28  * August 2010 update to this formula (rigorous formulas)
    29  * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf
     28 * August 2010 update to <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf">
     29 * this formula (rigorous formulas)</a>.
    3030 */
    3131public class SwissObliqueMercator implements Proj {
     
    109109        return new double[] { phi, lambda };
    110110    }
    111 
    112111}
  • trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java

    r6104 r6920  
    77 * the License.  You may obtain a copy of the License at
    88 *
    9  *      http://www.apache.org/licenses/LICENSE-2.0
     9 *      https://www.apache.org/licenses/LICENSE-2.0
    1010 *
    1111 * Unless required by applicable law or agreed to in writing, software
     
    2626 * Provides HTML and XML entity utilities.
    2727 * </p>
    28  * @see <a href="http://hotwired.lycos.com/webmonkey/reference/special_characters/">ISO Entities</a>
    2928 * @see <a href="http://www.w3.org/TR/REC-html32#latin1">HTML 3.2 Character Entities for ISO Latin-1</a>
    3029 * @see <a href="http://www.w3.org/TR/REC-html40/sgml/entities.html">HTML 4.0 Character entity references</a>
  • trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java

    r6643 r6920  
    279279        String msg;
    280280        String url = e.getAccessedUrl();
    281         Pattern p = Pattern.compile("http://.*/api/0.6/(node|way|relation)/(\\d+)/(\\d+)");
     281        Pattern p = Pattern.compile("https?://.*/api/0.6/(node|way|relation)/(\\d+)/(\\d+)");
    282282
    283283        // Special case for individual access to redacted versions
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r6889 r6920  
    3939        // Hide default constructor for utils classes
    4040    }
    41    
     41
    4242    public static class ButtonSpec {
    4343        public final String text;
     
    190190     *
    191191     * <code>helpTopic</code> is the trailing part of a JOSM online help URL, i.e. the part after the leading
    192      * <code>http://josm.openstreetmap.de/wiki/Help</code>. It should start with a leading '/' and it
     192     * <code>https://josm.openstreetmap.de/wiki/Help</code>. It should start with a leading '/' and it
    193193     * may include an anchor after a '#'.
    194194     *
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r6866 r6920  
    143143    /**
    144144     * JOSM command line options.
    145      * @see <a href="http://josm.openstreetmap.de/wiki/Help/CommandLineOptions">Help/CommandLineOptions</a>
     145     * @see <a href="https://josm.openstreetmap.de/wiki/Help/CommandLineOptions">Help/CommandLineOptions</a>
    146146     * @since 5279
    147147     */
     
    304304
    305305        Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());
    306         // http://stackoverflow.com/q/75218/2257172
     306        // https://stackoverflow.com/q/75218/2257172
    307307        // To be replaced with official API when switching to Java 7: https://bugs.openjdk.java.net/browse/JDK-4714232
    308308        Preferences.updateSystemProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());
  • trunk/src/org/openstreetmap/josm/gui/MenuScroller.java

    r6296 r6920  
    11/**
    22 * MenuScroller.java    1.5.0 04/02/12
    3  * License: use / modify without restrictions (see http://tips4java.wordpress.com/about/)
     3 * License: use / modify without restrictions (see https://tips4java.wordpress.com/about/)
    44 */
    55package org.openstreetmap.josm.gui;
     
    3434 * at a time is 15, and the default scrolling interval is 125 milliseconds.
    3535 * <P>
    36  * @author Darryl, http://tips4java.wordpress.com/2009/02/01/menu-scroller/
     36 * @author Darryl, https://tips4java.wordpress.com/2009/02/01/menu-scroller/
    3737 */
    3838public class MenuScroller {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java

    r6426 r6920  
    627627            StringBuilder text = new StringBuilder("<table cellpadding=3>");
    628628            text.append(tableRow(tr("Title:"), s.getDisplayString()));
    629             if (s.url.startsWith("http://")) {
     629            if (s.url.startsWith("http://") || s.url.startsWith("https://")) {
    630630                text.append(tableRow(tr("URL:"), s.url));
    631631            } else if (s.url.startsWith("resource://")) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java

    r6897 r6920  
    6666
    6767    protected JPanel buildHelpPanel() {
     68        String apiUrl = OsmApi.getOsmApi().getBaseUrl();
    6869        HtmlPanel pnl = new HtmlPanel();
    6970        pnl.setText(
     
    7273                + "<p><strong>" + tr("Examples") + "</strong></p>"
    7374                + "<ul>"
    74                 + "<li><a href=\""+Main.getOSMWebsite()+"/browse/changesets?open=true\">"+Main.getOSMWebsite()+"/browse/changesets?open=true</a></li>"
    75                 + "<li><a href=\"http://api.openstreetmap.org/api/0.6/changesets?open=true\">http://api.openstreetmap.org/api/0.6/changesets?open=true</a></li>"
     75                + "<li><a href=\""+Main.getOSMWebsite()+"/history?open=true\">"+Main.getOSMWebsite()+"/history?open=true</a></li>"
     76                + "<li><a href=\""+apiUrl+"/changesets?open=true\">"+apiUrl+"/changesets?open=true</a></li>"
    7677                + "</ul>"
    7778                + tr("Note that changeset queries are currently always submitted to ''{0}'', regardless of the "
    78                         + "host, port and path of the URL entered below.", OsmApi.getOsmApi().getBaseUrl())
     79                        + "host, port and path of the URL entered below.", apiUrl)
    7980                        + "</body></html>"
    8081        );
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r6890 r6920  
    7171    private DownloadDialog parent;
    7272    private static final Server[] SERVERS = new Server[] {
    73         new Server("Nominatim","http://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds"))
     73        new Server("Nominatim","https://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds"))
    7474    };
    7575    private final JosmComboBox server = new JosmComboBox(SERVERS);
  • trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java

    r6552 r6920  
    2525
    2626    /**
    27      * constructor
     27     * Constructs a new {@code HelpContentReader}.
    2828     *
    29      * @param baseUrl the base url of the JOSM help wiki, i.e. http://josm.openstreetmap.org
     29     * @param baseUrl the base url of the JOSM help wiki, i.e. https://josm.openstreetmap.org
    3030     */
    3131    public HelpContentReader(String baseUrl) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java

    r6830 r6920  
    143143
    144144    public boolean isLocal() {
    145         if (url.startsWith("http://") || url.startsWith("resource://"))
     145        if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("resource://"))
    146146            return false;
    147147        return true;
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java

    r6883 r6920  
    5050        LanguageComboBoxModel model = new LanguageComboBoxModel();
    5151        // Selecting the language BEFORE the JComboBox listens to model changes speed up initialization by ~35ms (see #7386)
    52         // See http://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui
     52        // See https://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui
    5353        model.selectLanguage(Main.pref.get("language"));
    5454        langCombo = new JosmComboBox(model);
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r6889 r6920  
    9090         *
    9191         * See also USGS Bulletin 1532
    92          * (http://egsc.usgs.gov/isb/pubs/factsheets/fs08799.html)
     92         * (http://pubs.usgs.gov/bul/1532/report.pdf)
    9393         * initially EPSG used 3785 but that has been superseded by 3857,
    94          * see http://www.epsg-registry.org/
     94         * see https://www.epsg-registry.org/
    9595         */
    9696        mercator = registerProjectionChoice(tr("Mercator"), "core:mercator", 3857);
     
    114114         */
    115115        registerProjectionChoice(tr("Belgian Lambert 1972"), "core:belgianLambert1972", 31370);     // BE
     116
    116117        /**
    117118         * Belgian Lambert 2008 projection.
     
    125126
    126127        /**
    127          * SwissGrid CH1903 / L03, see http://de.wikipedia.org/wiki/Swiss_Grid.
     128         * SwissGrid CH1903 / L03, see https://en.wikipedia.org/wiki/Swiss_coordinate_system.
    128129         *
    129130         * Actually, what we have here, is CH1903+ (EPSG:2056), but without
     
    141142         *
    142143         * Thanks to Johan Montagnat and its geoconv java converter application
    143          * (http://www.i3s.unice.fr/~johan/gps/ , published under GPL license)
     144         * (https://www.i3s.unice.fr/~johan/gps/ , published under GPL license)
    144145         * from which some code and constants have been reused here.
    145146         */
     
    152153         * (RGF93 is the French geodetic system similar to WGS84 but not mathematically equal)
    153154         *
    154          * Source: http://professionnels.ign.fr/DISPLAY/000/526/700/5267002/transformation.pdf
     155         * Source: http://geodesie.ign.fr/contenu/fichiers/Changement_systeme_geodesique.pdf
    155156         * @author Pieren
    156157         */
    157158        registerProjectionChoice(lambert = new LambertProjectionChoice());                          // FR
     159
    158160        /**
    159161         * Lambert 93 projection.
    160162         *
    161163         * As specified by the IGN in this document
    162          * http://professionnels.ign.fr/DISPLAY/000/526/702/5267026/NTG_87.pdf
     164         * http://geodesie.ign.fr/contenu/fichiers/documentation/rgf93/Lambert-93.pdf
    163165         * @author Don-vip
    164166         */
    165167        registerProjectionChoice(tr("Lambert 93 (France)"), "core:lambert93", 2154);                // FR
     168
    166169        /**
    167170         * Lambert Conic Conform 9 Zones projection.
    168171         *
    169172         * As specified by the IGN in this document
    170          * http://professionnels.ign.fr/DISPLAY/000/526/700/5267002/transformation.pdf
     173         * http://geodesie.ign.fr/contenu/fichiers/documentation/rgf93/cc9zones.pdf
    171174         * @author Pieren
    172175         */
    173         registerProjectionChoice(lambert_cc9 = new LambertCC9ZonesProjectionChoice());                            // FR
     176        registerProjectionChoice(lambert_cc9 = new LambertCC9ZonesProjectionChoice());              // FR
     177
    174178        /**
    175179         * French departements in the Caribbean Sea and Indian Ocean.
     
    177181         * Using the UTM transvers Mercator projection and specific geodesic settings.
    178182         */
    179         registerProjectionChoice(utm_france_dom = new UTMFranceDOMProjectionChoice());                            // FR
     183        registerProjectionChoice(utm_france_dom = new UTMFranceDOMProjectionChoice());              // FR
    180184
    181185        /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java

    r6643 r6920  
    2929 *
    3030 * Note: it fetches a list of changesets instead of the much smaller capabilities because - strangely enough -
    31  * an OSM server "http://x.y.y/api/0.6" not only responds to  "http://x.y.y/api/0.6/capabilities" but also
    32  * to "http://x.y.y/api/0/capabilities" or "http://x.y.y/a/capabilities" with valid capabilities. If we get
     31 * an OSM server "https://x.y.y/api/0.6" not only responds to  "https://x.y.y/api/0.6/capabilities" but also
     32 * to "https://x.y.y/api/0/capabilities" or "https://x.y.y/a/capabilities" with valid capabilities. If we get
    3333 * valid capabilities with an URL we therefore can't be sure that the base URL is valid API URL.
    3434 *
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r6830 r6920  
    235235        List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
    236236        // Helvetica is the preferred choice but is not available by default on Windows
    237         // (http://www.microsoft.com/typography/fonts/product.aspx?pid=161)
     237        // (https://www.microsoft.com/typography/fonts/product.aspx?pid=161)
    238238        if (fonts.contains("Helvetica")) {
    239239            return new Font("Helvetica", Font.BOLD, 20);
  • trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java

    r5094 r6920  
    1414 * An extension of JCheckBoxMenuItem that doesn't close the menu when selected.
    1515 *
    16  * @author Darryl http://tips4java.wordpress.com/2010/09/12/keeping-menus-open/
     16 * @author Darryl https://tips4java.wordpress.com/2010/09/12/keeping-menus-open/
    1717 */
    1818public class StayOpenCheckBoxMenuItem extends JCheckBoxMenuItem {
  • trunk/src/org/openstreetmap/josm/gui/util/StayOpenMenuItem.java

    r5094 r6920  
    1313 * An extension of JMenuItem that doesn't close the menu when selected.
    1414 *
    15  * @author Darryl http://tips4java.wordpress.com/2010/09/12/keeping-menus-open/
     15 * @author Darryl https://tips4java.wordpress.com/2010/09/12/keeping-menus-open/
    1616 */
    1717public class StayOpenMenuItem extends JMenuItem {
  • trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java

    r6361 r6920  
    1313 * An extension of JRadioButtonMenuItem that doesn't close the menu when selected.
    1414 *
    15  * @author Darryl http://tips4java.wordpress.com/2010/09/12/keeping-menus-open/
     15 * @author Darryl https://tips4java.wordpress.com/2010/09/12/keeping-menus-open/
    1616 */
    1717public class StayOpenRadioButtonMenuItem extends JRadioButtonMenuItem {
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java

    r6830 r6920  
    1919 *
    2020 * @since 5752
    21  * @see <a href="http://josm.openstreetmap.de/ticket/8404">http://josm.openstreetmap.de/ticket/8404</a>
    22  * @see <a href="http://hg.netbeans.org/main/rev/33cb2e81b640">http://hg.netbeans.org/main/rev/33cb2e81b640</a>
     21 * @see <a href="https://josm.openstreetmap.de/ticket/8404">https://josm.openstreetmap.de/ticket/8404</a>
     22 * @see <a href="https://hg.netbeans.org/main/rev/33cb2e81b640">https://hg.netbeans.org/main/rev/33cb2e81b640</a>
    2323 */
    2424public class JosmPasswordField extends JPasswordField {
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r6889 r6920  
    211211                String sCopyright = (String) data.attr.get(META_COPYRIGHT_LICENSE);
    212212                if (sCopyright == null) {
    213                     sCopyright = Main.pref.get("lastCopyright", "http://creativecommons.org/licenses/by-sa/2.5");
     213                    sCopyright = Main.pref.get("lastCopyright", "https://creativecommons.org/licenses/by-sa/2.5");
    214214                }
    215215                copyright.setText(sCopyright);
     
    303303                    return;
    304304                final String[] urls = {
    305                         "http://creativecommons.org/licenses/by-sa/2.5",
     305                        "https://creativecommons.org/licenses/by-sa/2.5",
    306306                        "http://opendatacommons.org/licenses/odbl/1.0",
    307307                        "public domain",
    308                         "http://www.gnu.org/copyleft/lesser.html",
     308                        "https://www.gnu.org/copyleft/lesser.html",
    309309                        "http://www.opensource.org/licenses/bsd-license.php"};
    310310                String license = "";
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r6906 r6920  
    7474     * @since 5422
    7575     */
    76     public static final String DEFAULT_API_URL = "http://api.openstreetmap.org/api";
     76    public static final String DEFAULT_API_URL = "https://api.openstreetmap.org/api";
    7777
    7878    // The collection of instantiated OSM APIs
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java

    r6643 r6920  
    110110        //          E.g. [1] lists lat as first coordinate axis and lot as second, so it is switched for EPSG:4326.
    111111        //          For most other EPSG code there seems to be no difference.
    112         // [1] http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326
     112        // [1] https://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326
    113113        boolean switchLatLon = false;
    114114        if (baseURL.toLowerCase().contains("crs=epsg:4326")) {
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java

    r6902 r6920  
    3535        return new String[]{"url"};
    3636    }
    37    
     37
    3838    @Override
    3939    public String[] getOptionalParams() {
     
    112112        this.args = args;
    113113    }
    114    
     114
    115115    @Override
    116116    protected void validateRequest() throws RequestHandlerBadRequestException {
     
    137137            }
    138138        }));
    139         return new String[] { "/imagery?title=osm&type=tms&url=http://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png",
     139        return new String[] { "/imagery?title=osm&type=tms&url=https://a.tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png",
    140140            "/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D",
    141141            "/imagery?title=...&type={"+types+"}&url=....[&cookies=...][&min_zoom=...][&max_zoom=...]"};
  • trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java

    r6643 r6920  
    1818 * A parser for the plugin list provided by a JOSM Plugin Download Site.
    1919 *
    20  * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a>
     20 * See <a href="https://josm.openstreetmap.de/plugin">https://josm.openstreetmap.de/plugin</a>
    2121 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style
    2222 * name/value-pairs.
     
    4949     * Parses a plugin information document and replies a list of plugin information objects.
    5050     *
    51      * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a>
     51     * See <a href="https://josm.openstreetmap.de/plugin">https://josm.openstreetmap.de/plugin</a>
    5252     * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style
    5353     * name/value-pairs.
  • trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java

    r6906 r6920  
    3232 *   <li>.jar.new files, assuming that these are downloaded but not yet installed plugins</li>
    3333 *   <li>cached lists of available plugins, downloaded for instance from
    34  *   <a href="http://josm.openstreetmap.de/plugins">http://josm.openstreetmap.de/plugins</a></li>
     34 *   <a href="https://josm.openstreetmap.de/plugin">https://josm.openstreetmap.de/plugin</a></li>
    3535 * </ul>
    3636 *
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r6869 r6920  
    695695        BigDecimal east = BigDecimal.ZERO;
    696696
    697         // See http://en.wikipedia.org/w/index.php?title=Centroid&oldid=294224857#Centroid_of_polygon for the equation used here
     697        // See https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon for the equation used here
    698698        for (int i = 0; i < nodes.size(); i++) {
    699699            EastNorth n0 = nodes.get(i).getEastNorth();
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r6889 r6920  
    417417            ImageType type = name.toLowerCase().endsWith(".svg") ? ImageType.SVG : ImageType.OTHER;
    418418
    419             if (name.startsWith("http://")) {
     419            if (name.startsWith("http://") || name.startsWith("https://")) {
    420420                String url = name;
    421421                ImageResource ir = cache.get(url);
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r6897 r6920  
    8585     * Openstreetmap.org changed it's URL scheme in August 2013, which breaks the URL parsing.
    8686     * The following function, called by the old parse function if necessary, provides parsing new URLs
    87      * the new URLs follow the scheme http://www.openstreetmap.org/#map=18/51.71873/8.76164&amp;layers=CN
     87     * the new URLs follow the scheme https://www.openstreetmap.org/#map=18/51.71873/8.76164&amp;layers=CN
    8888     * @param url string for parsing
    8989     * @return Bounds if hashurl, {@code null} otherwise
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r6850 r6920  
    7272        Shortcut.registerSystemShortcut("system:resetX", tr("reserved"), KeyEvent.VK_BACK_SPACE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
    7373    }
    74    
     74
    7575    /**
    7676     * This should work for all platforms. Yeah, should.
     
    122122        }
    123123    }
    124    
     124
    125125    /**
    126126     * Get the package name including detailed version.
     
    137137        }
    138138    }
    139    
     139
    140140    /**
    141141     * Get the Java package name including detailed version.
     
    166166        return null;
    167167    }
    168    
     168
    169169    /**
    170170     * Get the Web Start package name including detailed version.
    171171     *
    172      * Debian and Ubuntu OpenJDK packages are shipped with icedtea-web package, 
     172     * Debian and Ubuntu OpenJDK packages are shipped with icedtea-web package,
    173173     * but its version does not match main java package version.
    174      * 
     174     *
    175175     * Only Debian based distributions are covered at the moment.
    176176     * This can be extended to other distributions if needed.
    177      * 
     177     *
    178178     * Simply return {@code null} if there's no separate package for Java WebStart.
    179179     *
     
    323323        }
    324324    }
    325    
     325
    326326    protected void askUpdateJava(String version) {
    327327        try {
     
    339339                        "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+
    340340                        tr("Would you like to update now ?"));
    341    
     341
    342342                if (ed.showDialog().getValue() == 1) {
    343                     openUrl("http://www.java.com/download");
     343                    openUrl("https://www.java.com/download");
    344344                }
    345345            }
Note: See TracChangeset for help on using the changeset viewer.