From 24e0b7e710ed8041b9252df244c2572e0ff72476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Fri, 8 Nov 2024 13:12:19 +0100 Subject: [PATCH] JavaLeakTests: workaround for error in JDK #1664 https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/1664 --- .../eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java index cf8ac221d6c..49daa9fd2b3 100644 --- a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java +++ b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java @@ -81,6 +81,11 @@ private void followFieldReference(ReferencedObject ref, Object curr, Field fld) if (fieldVal != null) { fQueue.add(new ReferencedFieldElement(ref, fld, fieldVal)); } + } catch (IllegalArgumentException e) { + // XXX workaround for error in JDK: https://bugs.openjdk.org/browse/JDK-8337622 + if (!"Can not get final java.lang.Class field java.lang.Class.componentType on java.lang.Class".equals(e.getMessage())) { + throw e; + } } catch (IllegalAccessException e) { handleError(e, fld); }