Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347730 - SWT: NullPointers bei UndoRedoSupport
Summary: SWT: NullPointers bei UndoRedoSupport
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 03:18 EDT by Matthias Zimmermann CLA
Modified: 2021-08-19 11:01 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Zimmermann CLA 2011-05-31 03:18:56 EDT
1. Bug:
Precondition: Dialog with Open and Cancel Buttons and at least one textfield. 

Steps to reproduce: Change the value in the textfield, click on Cancel and then click on No. -> NullPointer

Caused by: java.lang.NullPointerException
      at org.eclipse.scout.rt.ui.swt.internal.StyledTextFieldUndoRedoSupport.dispose(StyledTextFieldUndoRedoSupport.java:141)
      at org.eclipse.scout.rt.ui.swt.form.fields.stringfield.SwtScoutStringField$1.widgetDisposed(SwtScoutStringField.java:98)


2. Bug: 
We have a custom field which overrides the String-Field. A call to super.attachScout throws a NullPointer, because we do not call super.initializeSwt before.

java.lang.NullPointerException
	at com.bsiag.scout.ui.swt.form.fields.stringfield.SwtScoutStringField.attachScout(SwtScoutStringField.java:133)
	at com.bsiag.scout.ocp.ui.swt.ext.SwtScoutHyperlinkedTextField.attachScout(SwtScoutHyperlinkedTextField.java:28)
	at com.bsiag.scout.ui.swt.basic.SwtScoutComposite.connectToScout(SwtScoutComposite.java:196)
	at com.bsiag.scout.ui.swt.basic.SwtScoutComposite.callInitializers(SwtScoutComposite.java:69)
	at com.bsiag.scout.ui.swt.basic.SwtScoutComposite.createField(SwtScoutComposite.java:55)

To avoid the nullpointer I added a not null check in the branch 2009-12-31. Either do the same or change to code in another way on trunk.
Comment 1 Matthias Zimmermann CLA 2011-05-31 03:19:18 EDT
fixed on 19.4.11, #100617
Comment 2 Matthias Zimmermann CLA 2011-06-28 08:46:14 EDT
shipped with eclipse scout 3.7.0