Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget.getData: fix NPE #1522

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

jukzi
Copy link
Contributor

@jukzi jukzi commented Oct 9, 2024

fix java.lang.NullPointerException: Cannot read the array length because "table" is null

As Widget.setData(Object) can be called with null argument even if KEYED_DATA is set.

fix java.lang.NullPointerException: Cannot read the array length because
"table" is null

As Widget.setData(Object) can be called with null argument even if
KEYED_DATA is set.
@jukzi
Copy link
Contributor Author

jukzi commented Oct 9, 2024

NPE logged during teardown in https://download.eclipse.org/eclipse/downloads/drops4/I20241008-1810/testresults/ep434I-unit-win32-java17_win32.win32.x86_64_17/org.eclipse.ui.tests.UiTestSuite.txt

!ENTRY org.eclipse.ui 4 0 2024-10-09 09:20:24.654
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException: Cannot read the array length because "table" is null
	at org.eclipse.swt.widgets.Widget.getData(Widget.java:598)
	at org.eclipse.e4.ui.css.swt.engine.AbstractCSSSWTEngineImpl.isStylable(AbstractCSSSWTEngineImpl.java:117)
	at org.eclipse.e4.ui.css.swt.engine.AbstractCSSSWTEngineImpl.getElement(AbstractCSSSWTEngineImpl.java:96)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:374)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:369)
	at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener.lambda$0(CSSSWTApplyStylesListener.java:31)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4389)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4381)
	at org.eclipse.swt.widgets.Display.runSkin(Display.java:4265)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3767)
	at org.eclipse.ui.tests.harness.util.UITestCase.processEvents(UITestCase.java:245)
	at org.eclipse.ui.tests.harness.util.CloseTestWindowsRule.after(CloseTestWindowsRule.java:46)
	at org.eclipse.ui.tests.harness.util.UITestCase.doTearDown(UITestCase.java:239)
	at org.eclipse.ui.tests.harness.util.UITestCase.tearDown(UITestCase.java:214)

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Test Results

   486 files  ±0     486 suites  ±0   7m 43s ⏱️ -22s
 4 159 tests ±0   4 151 ✅ ±0   8 💤 ±0  0 ❌ ±0 
16 390 runs  ±0  16 298 ✅ ±0  92 💤 ±0  0 ❌ ±0 

Results for commit 3051a6e. ± Comparison against base commit bb0f8dd.

@jukzi
Copy link
Contributor Author

jukzi commented Oct 9, 2024

ignoring random fail #1523

@jukzi jukzi merged commit 4cf611f into eclipse-platform:master Oct 9, 2024
10 of 14 checks passed
@jukzi jukzi deleted the Widget.getData branch October 9, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants