Ignore:
Timestamp:
2015-06-20T14:36:00+02:00 (10 years ago)
Author:
Don-vip
Message:

fix many checkstyle violations

Location:
trunk/src/org/openstreetmap/josm/gui/oauth
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r8461 r8509  
    9494        HtmlPanel pnlMessage = new HtmlPanel();
    9595        HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
    96         kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
     96        kit.getStyleSheet().addRule(
     97                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
    9798        kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
    9899        pnlMessage.setText("<html><body><p class=\"warning-body\">"
     
    143144        pnlMessage = new HtmlPanel();
    144145        kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
    145         kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
     146        kit.getStyleSheet().addRule(
     147                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
    146148        kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
    147149        pnlMessage.setText("<html><body>"
  • TabularUnified trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r8444 r8509  
    427427    }
    428428
    429     protected void sendAuthorisationRequest(SessionId sessionId, OAuthToken requestToken, OsmPrivileges privileges) throws OsmOAuthAuthorizationException {
     429    protected void sendAuthorisationRequest(SessionId sessionId, OAuthToken requestToken, OsmPrivileges privileges)
     430            throws OsmOAuthAuthorizationException {
    430431        Map<String, String> parameters = new HashMap<>();
    431432        fetchOAuthToken(sessionId, requestToken);
     
    492493     *
    493494     * @param requestToken the request token. Must not be null.
    494      * @param osmUserName the OSM user name. Must not be null.
    495      * @param osmPassword the OSM password. Must not be null.
     495     * @param userName the OSM user name. Must not be null.
     496     * @param password the OSM password. Must not be null.
    496497     * @param privileges the set of privileges. Must not be null.
    497498     * @param monitor a progress monitor. Defaults to {@link NullProgressMonitor#INSTANCE} if null
     
    503504     * @throws OsmTransferCanceledException if the task is canceled by the user
    504505     */
    505     public void authorise(OAuthToken requestToken, String osmUserName, String osmPassword, OsmPrivileges privileges, ProgressMonitor monitor) throws OsmOAuthAuthorizationException, OsmTransferCanceledException{
     506    public void authorise(OAuthToken requestToken, String userName, String password, OsmPrivileges privileges, ProgressMonitor monitor)
     507            throws OsmOAuthAuthorizationException, OsmTransferCanceledException {
    506508        CheckParameterUtil.ensureParameterNotNull(requestToken, "requestToken");
    507         CheckParameterUtil.ensureParameterNotNull(osmUserName, "osmUserName");
    508         CheckParameterUtil.ensureParameterNotNull(osmPassword, "osmPassword");
     509        CheckParameterUtil.ensureParameterNotNull(userName, "userName");
     510        CheckParameterUtil.ensureParameterNotNull(password, "password");
    509511        CheckParameterUtil.ensureParameterNotNull(privileges, "privileges");
    510512
     
    517519            monitor.indeterminateSubTask(tr("Initializing a session at the OSM website..."));
    518520            SessionId sessionId = fetchOsmWebsiteSessionId();
    519             sessionId.userName = osmUserName;
     521            sessionId.userName = userName;
    520522            if (canceled)
    521523                throw new OsmTransferCanceledException("Authorization canceled");
    522524            monitor.worked(1);
    523525
    524             monitor.indeterminateSubTask(tr("Authenticating the session for user ''{0}''...", osmUserName));
    525             authenticateOsmSession(sessionId, osmUserName, osmPassword);
     526            monitor.indeterminateSubTask(tr("Authenticating the session for user ''{0}''...", userName));
     527            authenticateOsmSession(sessionId, userName, password);
    526528            if (canceled)
    527529                throw new OsmTransferCanceledException("Authorization canceled");
  • TabularUnified trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java

    r7004 r8509  
    113113
    114114            if (connection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
    115                 throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED, tr("Retrieving user details with Access Token Key ''{0}'' was rejected.", token.getKey()), null);
     115                throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED,
     116                        tr("Retrieving user details with Access Token Key ''{0}'' was rejected.", token.getKey()), null);
    116117
    117118            if (connection.getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN)
    118                 throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", token.getKey()), null);
     119                throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN,
     120                        tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", token.getKey()), null);
    119121
    120122            if (connection.getResponseCode() != HttpURLConnection.HTTP_OK)
Note: See TracChangeset for help on using the changeset viewer.