Consider the following envelope in UTM 30N (EPSG code 32630). Note that the longitude range crosses the limit of the CRS domain of validity, which is -6° to 0°:
Transformation to WGS84 (EPSG code 4326) should give something close to:
but we get:
The longitude range (-6.6° to -5.2°) has been expanded to ±180°. This is because the Envelopes.transform(…) method verifies if the given envelope contains a "singularity" (typically a pole), and the ±180° longitude are wrongly identified as contained singularities in this particular case.