Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] Resolved Bugzilla Bug 110372 EditorService throws an assertion when given a bad IEditorInput


GMF Runtime Updates:  

Editor Service has the method:

                public IEditorPart openEditor(IEditorInput editorInput) {
                                 assert null != editorInput;

                                 IEditorPart editor = (IEditorPart) execute(new OpenEditorOperation(
                                                  editorInput));
                                 assert null != editor;
                                 return editor;
                }

A downstream client is writing JUnit tests and the
                                 assert null != editor;
Is causing difficulties.

If an editor cannot be found for a bad IEditorInput, null should be returned to
the client, but the assert should not be thrown.
It should be up to the client to handle the null and perform his own error checking.


Contribution by:  Michael Hanner

Reviewed and Committed By : Anthony Hunter


Cheers...
Anthony
--
Anthony Hunter mailto:anthonyh@xxxxxxxxxx
Manager - Software Developer,
IBM Rational Software: Aurora Core Common / Modeling Tools
Phone: 613-591-7037

Back to the top