File tree 2 files changed +9
-5
lines changed
plugin/src/main/java/io/snyk/eclipse/plugin
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,10 @@ public String getCliPath() {
144
144
public boolean isInsecure () {
145
145
return store .getBoolean (INSECURE_KEY , false );
146
146
}
147
+
148
+ public void setIsInsecure (boolean isInsecure ) {
149
+ store .put (INSECURE_KEY , Boolean .toString (isInsecure ));
150
+ }
147
151
148
152
149
153
public boolean isManagedBinaries () {
Original file line number Diff line number Diff line change 5
5
6
6
public class SnykWizardModel {
7
7
private String initialEndpoint ;
8
- private String initialUnknownCerts ;
8
+ private boolean initialUnknownCerts ;
9
9
private String initialAuthToken ;
10
10
11
11
public SnykWizardModel () {
12
- this .initialEndpoint = Preferences .getInstance ().getPref (Preferences .ENDPOINT_KEY );
13
- this .initialUnknownCerts = Preferences .getInstance ().getPref ( Preferences . INSECURE_KEY );
14
- this .initialAuthToken = Preferences .getInstance ().getPref ( Preferences . AUTH_TOKEN_KEY );
12
+ this .initialEndpoint = Preferences .getInstance ().getPref (Preferences .ENDPOINT_KEY , "" );
13
+ this .initialUnknownCerts = Preferences .getInstance ().isInsecure ( );
14
+ this .initialAuthToken = Preferences .getInstance ().getAuthToken ( );
15
15
}
16
16
17
17
public void resetPreferences () {
18
18
Preferences .getInstance ().store (Preferences .ENDPOINT_KEY , initialEndpoint );
19
- Preferences .getInstance ().store ( Preferences . INSECURE_KEY , initialUnknownCerts );
19
+ Preferences .getInstance ().setIsInsecure ( initialUnknownCerts );
20
20
Preferences .getInstance ().store (Preferences .AUTH_TOKEN_KEY , initialAuthToken );
21
21
22
22
new LsConfigurationUpdater ().configurationChanged ();
You can’t perform that action at this time.
0 commit comments