Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (10 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

Location:
trunk/src/org/openstreetmap/josm/io/auth
Files:
4 edited

Legend:

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

    r4245 r8510  
    33
    44public class CredentialsAgentException extends Exception {
    5     public CredentialsAgentException() {super();}
    6     public CredentialsAgentException(String message, Throwable cause) {super(message, cause);}
    7     public CredentialsAgentException(String message) {super(message);}
    8     public CredentialsAgentException(Throwable cause) {super(cause);}
    95
     6    /**
     7     * Constructs a new {@code CredentialsAgentException}.
     8     * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
     9     * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     10     */
     11    public CredentialsAgentException(String message, Throwable cause) {
     12        super(message, cause);
     13    }
     14
     15    /**
     16     * Constructs a new {@code CredentialsAgentException}.
     17     * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
     18     */
     19    public CredentialsAgentException(String message) {
     20        super(message);
     21    }
     22
     23    /**
     24     * Constructs a new {@code CredentialsAgentException}.
     25     * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     26     */
     27    public CredentialsAgentException(Throwable cause) {
     28        super(cause);
     29    }
    1030}
  • trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java

    r8509 r8510  
    118118        if (requestorType == RequestorType.SERVER && Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
    119119            String username = credentials.getUserName();
    120             if(username != null && !username.trim().isEmpty()) {
     120            if (username != null && !username.trim().isEmpty()) {
    121121                JosmUserIdentityManager.getInstance().setPartiallyIdentified(username);
    122122            }
  • trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java

    r8388 r8510  
    5757            credentialsTried.put(getRequestorType(), true);
    5858            return new PasswordAuthentication(response.getUsername(), response.getPassword());
    59         } catch(CredentialsAgentException e) {
     59        } catch (CredentialsAgentException e) {
    6060            Main.error(e);
    6161            return null;
  • trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java

    r8509 r8510  
    2828     */
    2929    @Override
    30     public PasswordAuthentication lookup(RequestorType requestorType, String host) throws CredentialsAgentException{
     30    public PasswordAuthentication lookup(RequestorType requestorType, String host) throws CredentialsAgentException {
    3131        if (requestorType == null)
    3232            return null;
     
    3838                user = Main.pref.get("osm-server.username", null);
    3939                password = Main.pref.get("osm-server.password", null);
    40             } else if(host != null) {
     40            } else if (host != null) {
    4141                user = Main.pref.get("server.username."+host, null);
    4242                password = Main.pref.get("server.password."+host, null);
     
    7474                    Main.pref.put("osm-server.password", String.valueOf(credentials.getPassword()));
    7575                }
    76             } else if(host != null) {
     76            } else if (host != null) {
    7777                Main.pref.put("server.username."+host, credentials.getUserName());
    7878                if (credentials.getPassword() == null) {
     
    130130    public Component getPreferencesDecorationPanel() {
    131131        HtmlPanel pnlMessage = new HtmlPanel();
    132         HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
     132        HTMLEditorKit kit = (HTMLEditorKit) pnlMessage.getEditorPane().getEditorKit();
    133133        kit.getStyleSheet().addRule(
    134                 ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
    135         pnlMessage.setText(
    136                 tr(
     134                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; " +
     135                "border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
     136        pnlMessage.setText(tr(
    137137                        "<html><body>"
    138138                        + "<p class=\"warning-body\">"
Note: See TracChangeset for help on using the changeset viewer.