Bug 505719 - Do not log "No password provided." as an error
Summary: Do not log "No password provided." as an error
Status: NEW
Alias: None
Product: USSSDK
Classification: Technology
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 10:00 EDT by Wayne Beaton CLA
Modified: 2016-10-14 01:14 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Beaton CLA 2016-10-11 10:00:48 EDT
By logging this event as an error, AERI is invoked prompting the user to file an error report. Not providing a password is a user-caused event that does not represent an error in the code and so should be logged at either a warning or info level (if at all).

For completeness...

--
Exception:org.eclipse.equinox.security.storage.StorageException: No password provided.
	 at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:264)
	 at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106)
	 at org.eclipse.userstorage.internal.StorageService.getCredentials(StorageService.java:129)
	 at org.eclipse.userstorage.ui.internal.CredentialsComposite.setService(CredentialsComposite.java:160)
	 at org.eclipse.userstorage.ui.internal.CredentialsDialog.createDialogArea(CredentialsDialog.java:109)
	 at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:158)
	 at org.eclipse.jface.window.Window.create(Window.java:426)
	 at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1103)
	 at org.eclipse.jface.window.Window.open(Window.java:783)
	 at org.eclipse.userstorage.ui.internal.DialogCredentialsProvider$1.run(DialogCredentialsProvider.java:40)
	 at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)
	 at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154)
	 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4507)
	 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4129)
	 at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:165)
	 at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:369)
	 at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:481)
	 at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerManager$SynchronizationController$1.run(SynchronizerManager.java:660)
	 at org.eclipse.oomph.ui.UIUtil.syncExec(UIUtil.java:571)
	 at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerManager$SynchronizationController.await(SynchronizerManager.java:651)
	 at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerManager.synchronize(SynchronizerManager.java:191)
	 at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerManager.performFullSynchronization(SynchronizerManager.java:301)
	 at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerPreferencePage$3$2.run(SynchronizerPreferencePage.java:161)
	 at org.eclipse.oomph.ui.UIUtil$5.run(UIUtil.java:541)
	 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4507)
	 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4129)
	 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	 at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	 at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:692)
	 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
	 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	 at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
	 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	 at java.lang.reflect.Method.invoke(Method.java:498)
	 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	 at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	 at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
--
Comment 1 Wayne Beaton CLA 2016-10-11 10:05:00 EDT
Sorry... the error is being reported by the secure storage in Equinox. Moving...
Comment 2 Thomas Watson CLA 2016-10-11 10:43:46 EDT
I think somewhere in the following methods is logging the error, equinox security is only throwing the exception, not logging it:

at org.eclipse.userstorage.internal.StorageService.getCredentials(StorageService.java:129)
at org.eclipse.userstorage.ui.internal.CredentialsComposite.setService(CredentialsComposite.java:160)
at org.eclipse.userstorage.ui.internal.CredentialsDialog.createDialogArea(CredentialsDialog.java:109)
Comment 3 Wayne Beaton CLA 2016-10-11 16:11:13 EDT
(In reply to Thomas Watson from comment #2)
> I think somewhere in the following methods is logging the error, equinox
> security is only throwing the exception, not logging it:

My mistake. Moving back...
Comment 4 Eike Stepper CLA 2016-10-14 01:14:43 EDT
In org.eclipse.userstorage.internal.StorageService there's this method:

  private static void logSecureStorageProblem(Exception ex)
  {
    if (QUIET_SECURE_STORAGE_EXCEPTION && ex instanceof StorageException)
    {
      return;
    }

    Activator.log(ex);
  }

I suggest that the status severity is reduced to WARNING, like so:

    Activator.log(ex, IStatus.WARNING);