Commit 9c814500 authored by Bas Couwenberg's avatar Bas Couwenberg

Refresh patches.

parent 60764cfd
......@@ -2,6 +2,7 @@ josm (0.0.svn14620+dfsg-1) UNRELEASED; urgency=medium
* New tested snapshot.
* Bump Standards-Version to 4.3.0, no changes.
* Refresh patches.
-- Bas Couwenberg <sebastic@debian.org> Tue, 01 Jan 2019 10:21:47 +0100
......
......@@ -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
@@ -42,6 +42,7 @@ public class Version {
@@ -40,6 +40,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;
@@ -77,6 +78,8 @@ public class Version {
@@ -75,6 +76,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");
@@ -142,6 +145,10 @@ public class Version {
@@ -127,6 +130,10 @@ public class Version {
return version == 0 ? tr("UNKNOWN") : Integer.toString(version);
}
......
......@@ -41,44 +41,21 @@ Forwarded: not-needed
/**
--- a/src/org/openstreetmap/josm/io/CachedFile.java
+++ b/src/org/openstreetmap/josm/io/CachedFile.java
@@ -226,24 +226,29 @@ public class CachedFile implements Close
@@ -225,11 +225,16 @@ public class CachedFile implements Close
if (file == null) {
if (name != null && name.startsWith("resource://")) {
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);
- }
- InputStream is = Utils.getResourceAsStream(getClass(), resourceName);
- if (is == null) {
- URL resource = getClass().getResource(resourceName);
- if (resource != null) {
- // More robust way to open stream
- is = Utils.openStream(resource);
- throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
+ File fileRes = new File("/usr/share/josm/" + resourceName);
+ if (fileRes.exists()) {
+ file = fileRes;
+ } else {
+ 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));
+ }
}
+ InputStream is = Utils.getResourceAsStream(getClass(), resourceName);
+ if (is == null) {
+ throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
+ }
+ return is;
}
- return is;
......
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