Changeset 7067 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2014-05-05T20:51:11+02:00 (11 years ago)
Author:
Don-vip
Message:

fix NPE seen in test if no password is set with basic auth (headless mode)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java

    r7005 r7067  
    1414    protected Map<RequestorType, PasswordAuthentication> memoryCredentialsCache = new HashMap<>();
    1515
    16     /**
    17      * @see CredentialsAgent#getCredentials
    18      */
    1916    @Override
    20     public CredentialsAgentResponse getCredentials(final RequestorType requestorType, final String host, boolean noSuccessWithLastResponse) throws CredentialsAgentException{
     17    public CredentialsAgentResponse getCredentials(final RequestorType requestorType, final String host, boolean noSuccessWithLastResponse)
     18            throws CredentialsAgentException {
    2119        if (requestorType == null)
    2220            return null;
     
    6361                }
    6462            });
    65             if (response.isCanceled()) {
     63            if (response.isCanceled() || response.getUsername() == null || response.getPassword() == null) {
    6664                return response;
    6765            }
Note: See TracChangeset for help on using the changeset viewer.