Changeset 509 in josm for trunk/src/org


Ignore:
Timestamp:
2008-01-03T22:35:25+01:00 (16 years ago)
Author:
gebner
Message:

Fix parsing of Plugins.xml

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r504 r509  
    5555         */
    5656        public static class PluginDescription {
     57                // Note: All the following need to be public instance variables of
     58                // type String.  (Plugin description XMLs from the server are parsed
     59                // with tools.XmlObjectParser, which uses reflection to access them.)
    5760                public String name;
    5861                public String description;
    59                 public URL resource;
     62                public String resource;
    6063                public String version;
    61                 public PluginDescription(String name, String description, URL resource, String version) {
     64                public PluginDescription(String name, String description, String resource, String version) {
    6265                        this.name = name;
    6366                        this.description = description;
     
    250253                                                                        info.name,
    251254                                                                        info.description,
    252                                                                         PluginInformation.fileToURL(f),
     255                                                                        PluginInformation.fileToURL(f).toString(),
    253256                                                                        info.version));
    254257                                                } catch (PluginException x) {
     
    273276                                                proxy.info.name,
    274277                                                proxy.info.description,
    275                                                 proxy.info.file == null ? null : PluginInformation.fileToURL(proxy.info.file),
     278                                                proxy.info.file == null ? null :
     279                                                        PluginInformation.fileToURL(proxy.info.file).toString(),
    276280                                                proxy.info.version));
    277281                return availablePlugins.values();
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloader.java

    r507 r509  
    140140        }
    141141
    142         private static boolean download(URL url, File file) {
     142        private static boolean download(String url, File file) {
    143143                try {
    144                         InputStream in = url.openStream();
     144                        InputStream in = new URL(url).openStream();
    145145                        OutputStream out = new FileOutputStream(file);
    146146                        byte[] buffer = new byte[8192];
Note: See TracChangeset for help on using the changeset viewer.