directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <>
Subject [jira] [Commented] (DIRSTUDIO-1046) EntryEditorManager constructor can throw NPE
Date Wed, 27 May 2015 22:29:17 GMT


Stefan Seelmann commented on DIRSTUDIO-1046:

Thanks Paul for the updated patch, codewise it looks good, tests pass, I'd commit it.

Just some formal things to clarify:
* The new classes must have the Apache License header
* The new classes must not include name in the @author tag, but should contain Apache Directory
* We have our own code formatting
Here you can find our coding standards:

Either you update the patch. Or I can apply the changes when committing, but then please acknowledge
that you agree to those changes.

Another question: you mention you want to use the BrowserWidget and the ldapbrowser.ui plugin
is not activated. Do you need the ldapbrowser.ui at all? It should be possible to only include
the ldapbrowser.common plugin to use the BrowserWidget.


> EntryEditorManager constructor can throw NPE
> --------------------------------------------
>                 Key: DIRSTUDIO-1046
>                 URL:
>             Project: Directory Studio
>          Issue Type: Bug
>          Components: studio-ldapbrowser
>    Affects Versions: 2.0.0-M8 (2.0.0.v20130628)
>            Reporter: Paul Richardson
>         Attachments: replace-active-workbench-calls-in-EntryEditorManager-v2.diff, replace-active-workbench-calls-in-EntryEditorManager.diff
> Using the BrowserWidget in a wizard rather than the BrowserView can result in a NullPointerException
being thrown.
> The BrowseWidget is embedded in a WizardPage so the
plugin has not necessarily been activated. However, during a refresh of the BrowserWidget's
tree view, a worker-runnable calls on resources of the ldapbrowser.ui plugin and it is activated.
> The activation of the ldapbrowser.ui plugin calls
> {code}
> entryEditorManager = new EntryEditorManager();
> {code}
> The constructor of the EntryEditorManager contains
> {code}
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(
partListener );
> {code}
> This code only works if called from the UI thread. Otherwise, getActiveWorkbenchWindow()
returns null hence the NPE.
> Since a runnable is responsible for the plugin activation in this use-case then this
behaviour occurs.

This message was sent by Atlassian JIRA

View raw message