Changeset 19235 in josm for trunk


Ignore:
Timestamp:
2024-10-08T14:39:56+02:00 (6 weeks ago)
Author:
taylor.smock
Message:

Fix #23956: JsonParsingException when the destination server returns 200 and a malformed document

In this case, the destination server performed a redirect via javascript in the
response.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java

    r19008 r19235  
    1010import java.util.Map;
    1111
     12import jakarta.json.stream.JsonParsingException;
    1213import org.openstreetmap.josm.io.NetworkManager;
    1314import org.openstreetmap.josm.io.OsmApi;
     
    9596                }
    9697            }
    97         } catch (URISyntaxException | IOException e) {
     98        } catch (JsonParsingException | URISyntaxException | IOException e) {
    9899            throw new JosmRuntimeException(e);
    99100        } finally {
     
    158159            }
    159160        } catch (JosmRuntimeException e) {
    160             if (e.getCause() instanceof URISyntaxException || e.getCause() instanceof IOException) {
     161            if (e.getCause() instanceof URISyntaxException || e.getCause() instanceof IOException
     162                    || e.getCause() instanceof JsonParsingException) {
    161163                Logging.trace(e);
    162164            } else {
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r19050 r19235  
    176176        JMultilineLabel lbl = new JMultilineLabel(AuthorizationProcedure.FULLY_AUTOMATIC.getDescription());
    177177        lbl.setFont(lbl.getFont().deriveFont(Font.PLAIN));
    178         pnl.add(lbl, GBC.std());
     178        pnl.add(lbl, GBC.eol());
    179179
    180180        if (!Config.getUrls().getDefaultOsmApiUrl().equals(apiUrl)) {
Note: See TracChangeset for help on using the changeset viewer.