Skip to content

Warnings and webserver for test and other cleanups#2838

Closed
jonahgraham wants to merge 10 commits intoeclipse-platform:masterfrom
jonahgraham:warnings-and-webserver-for-test-and-other-cleanups
Closed

Warnings and webserver for test and other cleanups#2838
jonahgraham wants to merge 10 commits intoeclipse-platform:masterfrom
jonahgraham:warnings-and-webserver-for-test-and-other-cleanups

Conversation

@jonahgraham
Copy link
Contributor

This is the follow-up for #2824 as one big PR with bug fixes, warning removals, and other cleanups all mixed together.

I will split this PR into bite-size pieces later, but I want to make sure that this PR does indeed remove the extra warnings and issues that #2824 has introduced.

This isn't marked as a draft so it runs on Jenkins too - its not really ready for review.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Test Results

  118 files  ± 0    118 suites  ±0   16m 37s ⏱️ - 2m 5s
4 665 tests +12  4 643 ✅ +7  22 💤 +5  0 ❌ ±0 
  338 runs  ± 0    334 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit 316f134. ± Comparison against base commit a845cef.

♻️ This comment has been updated with latest results.

@jonahgraham jonahgraham force-pushed the warnings-and-webserver-for-test-and-other-cleanups branch from 0862f36 to 3b2f8a7 Compare December 2, 2025 02:50
@jonahgraham
Copy link
Contributor Author

There are a couple of warnings left - I am spinning up an mac + windows machine to build and test the changes to the code.

@jonahgraham jonahgraham force-pushed the warnings-and-webserver-for-test-and-other-cleanups branch from 3b2f8a7 to cc28520 Compare December 2, 2025 14:04
For a while we have suffered with patchy tests due to limited connectivity
to external websites when running Browser tests.

This commit brings in a new Http Server based on the now available
Java 21 simple web server available in the JDK. This is sufficient
to test the various paths currently used in the browser tests, and
make them reliable (or at least more resilient against external sites
going dark)

Fixes eclipse-platform#2804

Fixes eclipse-platform#2561
The NPE was output to System.err because nothing catches it, but
its running on a thread. The code worked, but System.err would have

```
Exception in thread "Thread-2" java.lang.NullPointerException: Cannot invoke "String.indexOf(int)" because "content_type" is null
	at org.eclipse.swt.browser.WebKit.lambda$14(WebKit.java:2186)
	at java.base/java.lang.Thread.run(Thread.java:1583)
```

or similar.
Finalization is deprecated for removal in Java, as of now there is
no actual removal date planned so simply suppressing the warning
seems most suitable.
Includes adding a handful of new tests for the code that this
modifies to cover all the special cases.

The new tests are Linux only, but they could be adapted to test
these error conditions on other platforms.
These calls are covered by existing Browser test cases.
There were lots of links to the old style URLs of webkitgtk that are
updated with this commit.

Most of the udpates are fairly self-evidently correct as the URLs
are very similar.

For `Webkit2 Signal Documentation` the link was to the `title` *property*,
so the new links are to the signals section

For javadoc on `webkit_web_view_ready` the documentation was to `unstable`
for a signal called `ready` - the correct signal is `ready_to_show`
(the code used `ready_to_show`, only the link was wrong)
`Widget.removeListener(int, SWTEventListener)` is deprecated for removal,
but it references `SWTEventListener` so there was a deprecation warning.

`TypedListener(SWTEventListener)` is deprecated for removal,
but it references `SWTEventListener` so there was a deprecation warning.
@jonahgraham jonahgraham force-pushed the warnings-and-webserver-for-test-and-other-cleanups branch from 2c80235 to 316f134 Compare December 2, 2025 16:16
@jonahgraham
Copy link
Contributor Author

This PR is not for submitting - its too big and being split up as we speak.

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.

1 participant