This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit 865d8c744f489a2e4f415bfcdd59f281d7c7e1e2
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Fri Apr 25 13:01:10 2025 +0100

    One source of exception in assertThrows
---
 .../geometry/euclidean/threed/VertexListConvexPolygon3DTest.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/VertexListConvexPolygon3DTest.java
 
b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/VertexListConvexPolygon3DTest.java
index 50bf67ee..37c4b4d2 100644
--- 
a/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/VertexListConvexPolygon3DTest.java
+++ 
b/commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/threed/VertexListConvexPolygon3DTest.java
@@ -87,7 +87,9 @@ class VertexListConvexPolygon3DTest {
         final VertexListConvexPolygon3D p = new 
VertexListConvexPolygon3D(XY_PLANE_Z1, vertices);
 
         // act/assert
-        Assertions.assertThrows(UnsupportedOperationException.class, () -> 
p.getVertices().add(Vector3D.of(-1, 0, 1)));
+        final List<Vector3D> vertices2 = p.getVertices();
+        final Vector3D v = Vector3D.of(-1, 0, 1);
+        Assertions.assertThrows(UnsupportedOperationException.class, () -> 
vertices2.add(v));
     }
 
     @Test

Reply via email to