From d1c89aed055a3d91fcbc511ce5fffaf512c9813d Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Thu, 2 May 2024 11:09:47 -0400 Subject: [PATCH] Fix dom part of testBug527749_001 Signed-off-by: Rob Stryker --- .../org/eclipse/jdt/core/dom/JavacConverter.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index ed50aa1f16d..d89974d13c6 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -222,6 +222,14 @@ private ExportsDirective convert(JCExports javac) { ExportsDirective res = this.ast.newExportsStatement(); res.setName(toName(javac.getPackageName())); commonSettings(res, javac); + List mods = javac.getModuleNames(); + Iterator it = mods.iterator(); + while(it.hasNext()) { + JCExpression jcpe = it.next(); + Expression e = convertExpression(jcpe); + if( e != null ) + res.modules().add(e); + } return res; } @@ -229,6 +237,14 @@ private OpensDirective convert(JCOpens javac) { OpensDirective res = this.ast.newOpensDirective(); res.setName(toName(javac.getPackageName())); commonSettings(res, javac); + List mods = javac.getModuleNames(); + Iterator it = mods.iterator(); + while(it.hasNext()) { + JCExpression jcpe = it.next(); + Expression e = convertExpression(jcpe); + if( e != null ) + res.modules().add(e); + } return res; }