Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [rap-dev] Is this a bug?

Hi,
 
it seems to me as if this could be a problem in the CTabFolder component. Actually I never encountered this problem before and I am not able to reproduce it. From the workbench code's point of view it's understandable that there is no null check, because after a CTabItem has been selected by a user-click, the CTabFolder#getSelection() method shouldn't return null.
 
If anybody has seen this problem before and/or knows how to reproduce it, please let us know!
 
Ciao
Frank


Von: rap-dev-bounces@xxxxxxxxxxx [mailto:rap-dev-bounces@xxxxxxxxxxx] Im Auftrag von fabian.lange@xxxxxxx
Gesendet: Mittwoch, 5. September 2007 12:33
An: rap-dev@xxxxxxxxxxx
Betreff: [rap-dev] Is this a bug?

Hi,
I have been playing around with a view and suddenly got hit by a NullPointerException:

Sep 5, 2007 11:26:01 AM org.mortbay.jetty.servlet.ServletHandler handle

SEVERE: /rap?nocache=1188984361530:

java.lang.NullPointerException

      at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:217)

      at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getSelection(DefaultTabFolder.java:232)

      at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$3.widgetSelected(DefaultTabFolder.java:155)

      at org.eclipse.swt.events.SelectionEvent.dispatchToObserver(SelectionEvent.java:174)

      at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:45)

      at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:107)

      at org.eclipse.swt.events.TypedEvent.processEventClass(TypedEvent.java:192)

      at org.eclipse.swt.events.TypedEvent.processScheduledEvents(TypedEvent.java:124)

      at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.processAction(DisplayLCA.java:265)

      at org.eclipse.rwt.internal.lifecycle.ProcessAction.execute(ProcessAction.java:26)

      at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executePhase(RWTLifeCycle.java:116)

      at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute(RWTLifeCycle.java:80)

      at org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.run(LifeCycleServiceHandler.java:62)

      at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.internalService(LifeCycleServiceHandler.java:158)

      at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.access$1(LifeCycleServiceHandler.java:148)

      at org.eclipse.rwt.internal.service.LifeCycleServiceHandler$LifeCycleServiceHandlerSync.doService(LifeCycleServiceHandler.java:138)

      at org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandlerSync.access$2(RWTLifeCycleServiceHandlerSync.java:1)

      at org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandlerSync$ServiceRunnable.run(RWTLifeCycleServiceHandlerSync.java:48)

      at java.lang.Thread.run(Unknown Source)

I had a look at the actual SWT and RWT code, and it looks the same. so there is no check for null in place.
So it looks like it is expected by contract that when the pullDownButton (DefaultTabFolder:217) recieves a widget selected event, the paneFolder it is nested in has a selection. which is read in 232 by getSelection:

return getTab(paneFolder.getSelection());

it is the getTab that here will recieve the "null" as parameter and will throw the NPE.
Has anybody seen this before? Is it a bug ? The code I looked at in swt has also no null checks in place, so it seems so that this selection has to be not null by contract.

.: Fabian


Back to the top