Commit 3c8c7d01 authored by Bas Couwenberg's avatar Bas Couwenberg

Refresh patches.

parent c678d71c
......@@ -2,6 +2,7 @@ josm (0.0.svn14460+dfsg-1) UNRELEASED; urgency=medium
* New tested snapshot.
* Drop license & copyright for gnu/getopt sources, removed upstream.
* Refresh patches.
-- Bas Couwenberg <sebastic@debian.org> Wed, 28 Nov 2018 07:47:32 +0100
......
......@@ -103,8 +103,8 @@ Forwarded: not-needed
</target>
<target name="compile-cots" depends="init">
<!-- COTS -->
- <javac srcdir="${src.dir}" includes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/tukaani/**,gnu/**" nowarn="on" encoding="iso-8859-1"
+ <javac srcdir="${src.dir}" classpathref="classpath" includes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/tukaani/**,gnu/**" nowarn="on" encoding="iso-8859-1"
- <javac srcdir="${src.dir}" includes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/tukaani/**" nowarn="on" encoding="iso-8859-1"
+ <javac srcdir="${src.dir}" classpathref="classpath" includes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/tukaani/**" nowarn="on" encoding="iso-8859-1"
destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
<!-- get rid of "internal proprietary API" warning -->
<compilerarg value="-XDignore.symbol.file"/>
......@@ -148,8 +148,8 @@ Forwarded: not-needed
<target name="compile-jmapviewer" depends="init">
<!-- JMapViewer -->
- <javac sourcepath="" srcdir="${src.dir}" fork="yes"
+ <javac sourcepath="" srcdir="${src.dir}" classpathref="classpath"
excludes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/gui/jmapviewer/JMapViewerTree.java,org/openstreetmap/gui/jmapviewer/checkBoxTree/**,org/openstreetmap/josm/**,org/tukaani/**,gnu/**"
+ <javac sourcepath="" srcdir="${src.dir}" fork="yes" classpathref="classpath"
excludes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/gui/jmapviewer/JMapViewerTree.java,org/openstreetmap/gui/jmapviewer/checkBoxTree/**,org/openstreetmap/josm/**,org/tukaani/**"
destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
- <compilerarg value="-J-Xbootclasspath/p:${error_prone_javac.jar}" unless:set="isJava9"/>
- <compilerarg line="-XDcompilePolicy=simple"/>
......@@ -169,8 +169,8 @@ Forwarded: not-needed
<target name="compile" depends="init,javacc,compile-cots,compile-jmapviewer">
<!-- JOSM -->
- <javac sourcepath="" srcdir="${src.dir}" fork="yes"
+ <javac sourcepath="" srcdir="${src.dir}" classpathref="classpath"
excludes="com/**,javax/**,gnu/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/**,org/tukaani/**"
+ <javac sourcepath="" srcdir="${src.dir}" fork="yes" classpathref="classpath"
excludes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/**,org/tukaani/**"
destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
- <compilerarg value="-J-Xbootclasspath/p:${error_prone_javac.jar}" unless:set="isJava9"/>
- <compilerarg line="-XDcompilePolicy=simple"/>
......
......@@ -28,7 +28,7 @@ Forwarded: not-needed
"<p>" + tr("Java Version {0}", Utils.getSystemProperty("java.version")) + "</p>" +
--- a/src/org/openstreetmap/josm/data/Version.java
+++ b/src/org/openstreetmap/josm/data/Version.java
@@ -40,6 +40,7 @@ public class Version {
@@ -42,6 +42,7 @@ public class Version {
private int version;
private String releaseDescription;
......@@ -36,7 +36,7 @@ Forwarded: not-needed
private String time;
private String buildName;
private boolean isLocalBuild;
@@ -75,6 +76,8 @@ public class Version {
@@ -77,6 +78,8 @@ public class Version {
version = JOSM_UNKNOWN_VERSION;
}
......@@ -45,7 +45,7 @@ Forwarded: not-needed
// the last changed data
//
time = properties.getProperty("Last Changed Date");
@@ -127,6 +130,10 @@ public class Version {
@@ -142,6 +145,10 @@ public class Version {
return version == 0 ? tr("UNKNOWN") : Integer.toString(version);
}
......
......@@ -26,7 +26,7 @@ Forwarded: not-needed
import java.nio.charset.StandardCharsets;
import java.nio.file.InvalidPathException;
import java.text.MessageFormat;
@@ -315,7 +316,11 @@ public final class I18n {
@@ -325,7 +326,11 @@ public final class I18n {
}
private static URL getTranslationFile(String lang) {
......@@ -41,26 +41,47 @@ Forwarded: not-needed
/**
--- a/src/org/openstreetmap/josm/io/CachedFile.java
+++ b/src/org/openstreetmap/josm/io/CachedFile.java
@@ -225,11 +225,17 @@ public class CachedFile implements Close
File file = getFile();
@@ -226,24 +226,29 @@ public class CachedFile implements Close
if (file == null) {
if (name != null && name.startsWith("resource://")) {
- InputStream is = getClass().getResourceAsStream(
- name.substring("resource:/".length()));
- if (is == null)
- throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
- return is;
+ String path = name.substring("resource://".length());
+ File fileRes = new File("/usr/share/josm/" + path);
String resourceName = name.substring("resource:/".length());
- InputStream is = null;
- try {
- is = getClass().getResourceAsStream(resourceName);
- } catch (InvalidPathException e) {
- Logging.error("Cannot open {0}: {1}", resourceName, e.getMessage());
- Logging.trace(e);
- }
- if (is == null) {
- URL resource = getClass().getResource(resourceName);
- if (resource != null) {
- // More robust way to open stream
- is = Utils.openStream(resource);
+ File fileRes = new File("/usr/share/josm/" + resourceName);
+ if (fileRes.exists()) {
+ file = fileRes;
+ } else {
+ InputStream is = getClass().getResourceAsStream(
+ name.substring("resource:/".length()));
+ if (is == null)
+ throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
+ InputStream is = null;
+ try {
+ is = getClass().getResourceAsStream(resourceName);
+ } catch (InvalidPathException e) {
+ Logging.error("Cannot open {0}: {1}", resourceName, e.getMessage());
+ Logging.trace(e);
}
if (is == null) {
- throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
+ URL resource = getClass().getResource(resourceName);
+ if (resource != null) {
+ // More robust way to open stream
+ is = Utils.openStream(resource);
+ }
+ if (is == null) {
+ throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
+ }
}
+ return is;
+ }
}
- return is;
} else {
throw new IOException("No file found for: "+name);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment