Changeset 17573 in josm


Ignore:
Timestamp:
2021-03-16T23:16:53+01:00 (4 years ago)
Author:
simon04
Message:

see #20563 - Fix PluginHandler, PluginInformation

Regression of r17571.

Location:
trunk
Files:
3 edited

Legend:

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

    r17571 r17573  
    3535import java.util.Objects;
    3636import java.util.Set;
     37import java.util.TreeMap;
    3738import java.util.TreeSet;
    3839import java.util.concurrent.CopyOnWriteArrayList;
     
    185186        public String getText() {
    186187            StringBuilder b = new StringBuilder();
    187             for (Entry<Object, Object> e : info.attr.entrySet()) {
     188            Map<Object, Object> sorted = new TreeMap<>(Comparator.comparing(String::valueOf));
     189            sorted.putAll(info.attr);
     190            for (Entry<Object, Object> e : sorted.entrySet()) {
    188191                b.append(e.getKey());
    189192                b.append(": ");
  • trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java

    r17571 r17573  
    150150     */
    151151    public PluginInformation(InputStream manifestStream, String name, String url) throws PluginException {
     152        this.name = name;
    152153        try {
    153154            Manifest manifest = new Manifest();
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java

    r17571 r17573  
    154154    void testPluginInformationAction() throws PluginException {
    155155        TestUtils.assumeWorkingJMockit();
    156         final String expectedText = "Manifest-Version: 1.0\n" +
    157                 "Ant-Version: Apache Ant 1.9.6\n" +
     156        final String expectedText = "Ant-Version: Apache Ant 1.9.6\n" +
     157                "Author: Don-vip\n" +
    158158                "Created-By: 1.7.0_91-b02 (Oracle Corporation)\n" +
     159                "Manifest-Version: 1.0\n" +
     160                "Plugin-Canloadatruntime: true\n" +
     161                "Plugin-Class: org.openstreetmap.josm.plugins.fr.epci.EpciPlugin\n" +
     162                "Plugin-Date: 2015-11-19T08:21:07.645033Z\n" +
     163                "Plugin-Description: Handling of French EPCIs (boundary=local_authority)\n" +
     164                "Plugin-Early: true\n" +
     165                "Plugin-Link: http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/EPCI-fr\n" +
    159166                "Plugin-Mainversion: 7001\n" +
    160                 "Plugin-Version: 31772\n" +
    161                 "Plugin-Class: org.openstreetmap.josm.plugins.fr.epci.EpciPlugin\n" +
    162                 "Plugin-Description: Handling of French EPCIs (boundary=local_authority)\n" +
    163                 "Plugin-Date: 2015-11-19T08:21:07.645033Z\n" +
    164                 "Author: Don-vip\n" +
    165                 "Plugin-Link: http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/EPCI-fr\n" +
    166                 "Plugin-Early: true\n" +
    167                 "Plugin-Canloadatruntime: true\n";
     167                "Plugin-Version: 31772\n";
    168168        final JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker() {
    169169            @Override
Note: See TracChangeset for help on using the changeset viewer.