Modify ↓
Opened 16 years ago
Closed 16 years ago
#3486 closed defect (worksforme)
[Patch] JOSM isn't compilable with Java 6
| Reported by: | PetrDlouhy | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description
JOSM, when compiled with Java 6 gives 5 errors and 6 warnings:
init:
[mkdir] Created dir: /home/petr/soubory/nezarazeno/josm/core/build
[mkdir] Created dir: /home/petr/soubory/nezarazeno/josm/core/dist
compile:
[javac] Compiling 532 source files to /home/petr/soubory/nezarazeno/josm/core/build
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/data/osm/DataSet.java:527: warning: [unchecked] unchecked cast
[javac] found : java.util.Collection<capture#585 of ? extends org.openstreetmap.josm.data.osm.OsmPrimitive>
[javac] required: java.util.Set<? extends org.openstreetmap.josm.data.osm.OsmPrimitive>
[javac] referred = (Set<? extends OsmPrimitive>)primitives;
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/data/osm/DataSetUtils.java:22: deleted has private access in org.openstreetmap.josm.data.osm.OsmPrimitive
[javac] if (w.deleted || w.incomplete)
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/data/osm/DataSetUtils.java:24: nodes has private access in org.openstreetmap.josm.data.osm.Way
[javac] int i = w.nodes.indexOf(n);
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/data/osm/DataSetUtils.java:27: nodes has private access in org.openstreetmap.josm.data.osm.Way
[javac] adjacent.add(w.nodes.get(i - 1));
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/data/osm/DataSetUtils.java:28: nodes has private access in org.openstreetmap.josm.data.osm.Way
[javac] if (i < w.nodes.size() - 1)
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/data/osm/DataSetUtils.java:29: nodes has private access in org.openstreetmap.josm.data.osm.Way
[javac] adjacent.add(w.nodes.get(i + 1));
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java:312: warning: [unchecked] unchecked cast
[javac] found : java.lang.Object
[javac] required: java.util.Collection<org.openstreetmap.josm.data.osm.RelationMember>
[javac] (Collection<RelationMember>) membershipData.getValueAt(row, 1) ).setVisible(true);
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/io/GpxReader.java:244: warning: [unchecked] unchecked cast
[javac] found : java.lang.Object
[javac] required: java.util.Collection<org.openstreetmap.josm.data.gpx.GpxLink>
[javac] ((Collection<GpxLink>) attr.get(GpxData.META_LINKS)).add(currentLink);
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/tools/PlatformHookOsx.java:32: warning: [unchecked] unchecked call to getConstructor(java.lang.Class<?>...) as a member of the raw type java.lang.Class
[javac] Object Ocom_apple_eawt_Application = Ccom_apple_eawt_Application.getConstructor((Class[])null).newInstance((Object[])null);
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/tools/PlatformHookOsx.java:34: warning: [unchecked] unchecked call to getDeclaredMethod(java.lang.String,java.lang.Class<?>...) as a member of the raw type java.lang.Class
[javac] Method MaddApplicationListener = Ccom_apple_eawt_Application.getDeclaredMethod("addApplicationListener", new Class[] { Ccom_apple_eawt_ApplicationListener });
[javac] ^
[javac] /home/petr/soubory/nezarazeno/josm/core/src/org/openstreetmap/josm/tools/PlatformHookOsx.java:37: warning: [unchecked] unchecked call to getDeclaredMethod(java.lang.String,java.lang.Class<?>...) as a member of the raw type java.lang.Class
[javac] Method MsetEnabledPreferencesMenu = Ccom_apple_eawt_Application.getDeclaredMethod("setEnabledPreferencesMenu", new Class[] { boolean.class });
[javac] ^
[javac] 5 errors
[javac] 6 warnings
Attachments (0)
Note:
See TracTickets
for help on using tickets.



Sorry, I realized, that it is because of old file, that remain in my repositary.