Ignore:
Timestamp:
2015-05-02T00:55:19+02:00 (10 years ago)
Author:
Don-vip
Message:

fix potential NPEs and Sonar issues related to serialization

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

Legend:

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

    r8291 r8308  
    77import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    88import org.openstreetmap.josm.tools.CheckParameterUtil;
     9
     10import com.sun.org.apache.xerces.internal.utils.Objects;
    911
    1012/**
     
    2123    private String apiUrl;
    2224    private final AdvancedOAuthPropertiesPanel pnlAdvancedProperties;
    23     private OAuthToken accessToken;
     25    private transient OAuthToken accessToken;
    2426
    2527    protected void fireAccessTokenChanged(OAuthToken oldValue, OAuthToken newValue) {
     
    99101        } else if (oldValue == null && this.accessToken == null) {
    100102            // no change - don't fire an event
    101         } else if (! oldValue.equals(this.accessToken)) {
     103        } else if (!Objects.equals(oldValue, this.accessToken)) {
    102104            fireAccessTokenChanged(oldValue, this.accessToken);
    103105        }
  • trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java

    r8291 r8308  
    4848    private JosmTextField tfAccessTokenURL;
    4949    private JosmTextField tfAuthoriseURL;
    50     private UseDefaultItemListener ilUseDefault;
     50    private transient UseDefaultItemListener ilUseDefault;
    5151    private String apiUrl;
    5252
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r7771 r8308  
    6060    private JosmTextField tfUserName;
    6161    private JosmPasswordField tfPassword;
    62     private UserNameValidator valUserName;
    63     private PasswordValidator valPassword;
     62    private transient UserNameValidator valUserName;
     63    private transient PasswordValidator valPassword;
    6464    private AccessTokenInfoPanel pnlAccessTokenInfo;
    6565    private OsmPrivilegesPanel pnlOsmPrivileges;
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r8291 r8308  
    4242
    4343    private JosmTextField tfAccessTokenKey;
    44     private AccessTokenKeyValidator valAccessTokenKey;
     44    private transient AccessTokenKeyValidator valAccessTokenKey;
    4545    private JosmTextField tfAccessTokenSecret;
    46     private AccessTokenSecretValidator valAccessTokenSecret;
     46    private transient AccessTokenSecretValidator valAccessTokenSecret;
    4747    private JCheckBox cbSaveToPreferences;
    4848    private HtmlPanel pnlMessage;
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r8291 r8308  
    333333
    334334    class AcceptAccessTokenAction extends AbstractAction implements PropertyChangeListener {
    335         private OAuthToken token;
     335        private transient OAuthToken token;
    336336
    337337        public AcceptAccessTokenAction() {
  • trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java

    r6890 r8308  
    2828import org.openstreetmap.josm.gui.widgets.HtmlPanel;
    2929import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
     30import org.openstreetmap.josm.gui.widgets.JosmTextField;
    3031import org.openstreetmap.josm.tools.ImageProvider;
    3132import org.openstreetmap.josm.tools.OpenBrowser;
    32 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    3333
    3434/**
     
    4242public class SemiAutomaticAuthorizationUI extends AbstractAuthorizationUI {
    4343    private AccessTokenInfoPanel pnlAccessTokenInfo;
    44     private OAuthToken requestToken;
     44    private transient OAuthToken requestToken;
    4545
    4646    private RetrieveRequestTokenPanel pnlRetrieveRequestToken;
Note: See TracChangeset for help on using the changeset viewer.