From f1249170ebd9e353ddb6c79182655979c26070ad Mon Sep 17 00:00:00 2001
From: Luc Maisonobe <luc@orekit.org>
Date: Thu, 20 Nov 2014 13:20:36 +0100
Subject: [PATCH] Fixed test failure with maven and openJDK7

---
 .../intersection/duvenhage/DuvenhageAlgorithmTest.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java b/core/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java
index f57b0751..0ccac1f7 100644
--- a/core/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java
+++ b/core/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java
@@ -202,7 +202,12 @@ public class DuvenhageAlgorithmTest extends AbstractAlgorithmTest {
                                                                          Vector3D.class, Vector3D.class);
             findExit.setAccessible(true);
             Object limitPoint = findExit.invoke(algorithm, tile, earth, position, los);
-            Class<?> limitPointCls = DuvenhageAlgorithm.class.getDeclaredClasses()[0];
+            Class<?> limitPointCls = null;
+            for (Class<?> c : DuvenhageAlgorithm.class.getDeclaredClasses()) {
+                if (c.getName().endsWith("LimitPoint")) {
+                    limitPointCls = c;
+                }
+            }
             Field pointField = limitPointCls.getDeclaredField("point");
             pointField.setAccessible(true);
             return (NormalizedGeodeticPoint) pointField.get(limitPoint);
-- 
GitLab