[jbosstools-issues] [JBoss JIRA] (JBIDE-23312) When an OS certificate is accepted, the preference is not always saved

Viacheslav Kabanovich (JIRA) issues at jboss.org
Tue Oct 11 13:15:02 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-23312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13305710#comment-13305710 ] 

Viacheslav Kabanovich commented on JBIDE-23312:
-----------------------------------------------

I noticed that when we set a value to a preference store, we rely on Eclipse saving it automatically. Maybe that is not safe. This change in SSLCertificatesPreference may help.
{code}
	private void saveItemsToPreference(List<Item> items) {
		StringBuilder sb = new StringBuilder();
		items.stream().forEach(i->sb.append(i.toPreferenceValue()));
		getPreferenceStore().setValue(ALLOWED_CERTIFICATES, sb.toString());
		if(getPreferenceStore() instanceof IPersistentPreferenceStore) {
			try {
				((IPersistentPreferenceStore)getPreferenceStore()).save();
			} catch (IOException e) {
				///ignore
			}
		}
	}
{code}
[~jeffmaury], if you reproduce the issue, please try it.

> When an OS certificate is accepted, the preference is not always saved
> ----------------------------------------------------------------------
>
>                 Key: JBIDE-23312
>                 URL: https://issues.jboss.org/browse/JBIDE-23312
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.4.2.AM1
>            Reporter: Jeff MAURY
>              Labels: openshift, openshift_v3, preferences
>             Fix For: 4.4.2.AM3
>
>
> EXEC: clean up Openshift V3 SSL certificates
> EXEC: connect to Openshift
> ASSERT: the certificate dialog should pop up
> EXEC:accept the cerificate and select remember
> EXEC: stop Eclipse
> EXEC: start Eclipse
> EXEC: connect to Openshift
> ASSERT: the certificate dialog popups again



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list