Changeset 10189 in josm for trunk/src


Ignore:
Timestamp:
2016-05-11T16:38:03+02:00 (8 years ago)
Author:
Don-vip
Message:

fix coverity 1355210 - UR: Uninitialized read of field in constructor

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

Legend:

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

    r8313 r10189  
    2222
    2323    private String apiUrl;
    24     private final AdvancedOAuthPropertiesPanel pnlAdvancedProperties;
     24    private final AdvancedOAuthPropertiesPanel pnlAdvancedProperties = new AdvancedOAuthPropertiesPanel();
    2525    private transient OAuthToken accessToken;
    2626
    27     protected void fireAccessTokenChanged(OAuthToken oldValue, OAuthToken newValue) {
    28         firePropertyChange(ACCESS_TOKEN_PROP, oldValue, newValue);
     27    /**
     28     * Constructs a new {@code AbstractAuthorizationUI} without API URL.
     29     * @since 10189
     30     */
     31    public AbstractAuthorizationUI() {
    2932    }
    3033
     
    3538     */
    3639    public AbstractAuthorizationUI(String apiUrl) {
    37         pnlAdvancedProperties = new AdvancedOAuthPropertiesPanel();
    3840        setApiUrl(apiUrl);
     41    }
     42
     43    protected void fireAccessTokenChanged(OAuthToken oldValue, OAuthToken newValue) {
     44        firePropertyChange(ACCESS_TOKEN_PROP, oldValue, newValue);
    3945    }
    4046
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r10183 r10189  
    5555     */
    5656    public ManualAuthorizationUI(String apiUrl, Executor executor) {
    57         super(apiUrl);
     57        super(/* dont pass apiURL because setApiUrl is overriden and references a local field */);
     58        setApiUrl(apiUrl);
    5859        this.executor = executor;
    5960        build();
Note: See TracChangeset for help on using the changeset viewer.