[josm] 01/02: Backport fixed failed authorisation dialog from 4021, gives more verbose message of why the authorisation process failed. (needed for OSM License Change Phase III) (LP: #762634)

Bas Couwenberg sebastic at xs4all.nl
Sat Oct 18 12:08:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to annotated tag ubuntu/0.0.svn3751-2ubuntu1
in repository josm.

commit e8b6f0b167292fec7b6d0b6ee8a2e1d8abde2b6a
Author: David Paleino <dapal at debian.org>
Date:   Sat Apr 16 12:13:48 2011 +0200

    Backport fixed failed authorisation dialog from 4021, gives more verbose message of why the authorisation process failed. (needed for OSM License Change Phase III) (LP: #762634)
---
 debian/changelog                                   |  8 +++
 .../100-backport_failedauth_explaination.patch     | 57 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 66 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 346ae7e..2bb1fa3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+josm (0.0.svn3751-2ubuntu1) UNRELEASED; urgency=low
+
+  * Backport fixed failed authorisation dialog from 4021, gives
+    more verbose message of why the authorisation process failed.
+    (needed for OSM License Change Phase III) (LP: #762634)
+
+ -- David Paleino <dapal at debian.org>  Sat, 16 Apr 2011 12:31:26 +0200
+
 josm (0.0.svn3751-2) unstable; urgency=low
 
   * Added recommends to webkit-image-gtk | webkit-image-qt
diff --git a/debian/patches/100-backport_failedauth_explaination.patch b/debian/patches/100-backport_failedauth_explaination.patch
new file mode 100644
index 0000000..d1ccec5
--- /dev/null
+++ b/debian/patches/100-backport_failedauth_explaination.patch
@@ -0,0 +1,57 @@
+From: David Paleino <dapal at debian.org>
+Subject: backport fixed failed authorisation dialog from 4021
+Origin: vendor
+Forwarded: not-needed
+
+---
+ src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java |    3 +-
+ src/org/openstreetmap/josm/tools/ExceptionUtil.java     |   24 ++++++++++++++++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+--- josm.orig/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
++++ josm/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
+@@ -271,9 +271,10 @@ public class ExceptionDialogUtil {
+      * @param e the exception
+      */
+     public static void explainAuthorizationFailed(OsmApiException e) {
++        // Fixme: add special handling that calls ExceptionUtil.explainFailedOAuthAuthorisation(e)
+         HelpAwareOptionPane.showOptionDialog(
+                 Main.parent,
+-                ExceptionUtil.explainFailedOAuthAuthorisation(e),
++                ExceptionUtil.explainFailedAuthorisation(e),
+                 tr("Authorisation Failed"),
+                 JOptionPane.ERROR_MESSAGE,
+                 ht("/ErrorMessages#AuthenticationFailed")
+--- josm.orig/src/org/openstreetmap/josm/tools/ExceptionUtil.java
++++ josm/src/org/openstreetmap/josm/tools/ExceptionUtil.java
+@@ -128,6 +128,30 @@ public class ExceptionUtil {
+         );
+     }
+ 
++   public static String explainFailedAuthorisation(OsmApiException e) {
++        e.printStackTrace();
++        String header = e.getErrorHeader();
++        String body = e.getErrorBody();
++        String msg = null;
++        if (header != null) {
++            if (body != null && !header.equals(body)) {
++                msg = header + " (" + body + ")";
++            } else {
++                msg = header;
++            }
++        } else {
++            msg = body;
++        }
++
++        return tr("<html>"
++                + "Authorisation at the OSM server failed.<br>"
++                + "The server reported the following error:<br>"
++                + "''{0}''"
++                + "</html>",
++                msg
++        );
++    }
++
+     public static String explainFailedOAuthAuthorisation(OsmApiException e) {
+         e.printStackTrace();
+         return tr("<html>"
diff --git a/debian/patches/series b/debian/patches/series
index f6aacf6..01e3792 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 70-default_look_and_feel.patch
 80-fix_images.patch
 90-fix_version.patch
+100-backport_failedauth_explaination.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/josm.git



More information about the Pkg-grass-devel mailing list