Invalid geometry when previewing postresql layers at smaller scales with Java 11

Description

Opening issue as per suggestion on geoserver-users. Unclear whether issue is tied to this particular database's data but it affects all tables and views in it that I've tested with so far, regardless of their geometry type.

Attempt to reproduce: Use Red Hat's OpenJDK 11 (or any other perhaps, have also tried Amazon's Corretto) to run Jetty 9.4.19, with Geoserver 2.15.2. Create a Postgresql geometry table via the scripts attached (MultiPoint, one point). Establish a Geoserver data store pointing to the Postgresql instance and publish this layer with the default point style (calculate its bounding box from its contents). Choose to preview it and zoom out to 1:2M and beyond.

Expected result: the red point symbol remains, layer preview OK. This is what happens when this same setup is used except for an OpenJDK 8 instead of 11. With java 11 I get a picture with

"code="internalError"Rendering process failed Java.ioIOExceptionorg.postgresql.util.PSQLException:FELarse error - invalid geometry
Hint: "POLYGON ((?" <--- parse error at position 12 within geometry"

(same error for every layer in this database)

postgresql's log says:
2019-07-04 08:49:30.910 CEST [3392] FEL: parse error - invalid geometry
2019-07-04 08:49:30.910 CEST [3392] TIPS: "POLYGON ((âˆ" <-- parse error at position 12 within geometry
2019-07-04 08:49:30.910 CEST [3392] SATS: SELECT encode(ST_AsBinary(ST_Force2D("geom")),'base64') as "geom" FROM "public"."Hallbara_vatten_hall_vatt_arter_ny" WHERE "geom" && ST_GeomFromText('POLYGON ((−823374.154554292 5656116.224905597, −823374.154554292 7552075.702454945, 1072585.3229950569 7552075.702454945, 1072585.3229950569 5656116.224905597, −823374.154554292 5656116.224905597))', 3010)

select ST_IsValid(geom) from "Hallbara_vatten_hall_vatt_arter_ny"; says
true

Find sample create table and insert into attached

Environment

Windows Server 2019, openjdk 11 (Red Hat 11.0.3.7-1), Jetty 9.4.19, postgresql 11 (and 9.1.4)

Status

Assignee

Unassigned

Reporter

David Persson

Triage

Fix versions

None

Affects versions

Priority

Medium
Configure