From 275b5518284930b7bdd4b704d570705b529d3fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sat, 30 May 2026 17:48:30 +0200 Subject: [PATCH] fix: guard pluginXml (not its never-null entries list) in CompareFragment2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit generate() guarded `if (projectConfig.eclipsePlugin.pluginXml.entries !== null)`, but `entries` is a final, never-null list, so the guard is always true and never protects the null-pluginXml case it intends to — and it NPEs on `.entries` when pluginXml itself is null. Guard the container `pluginXml`, matching the adjacent manifest guard (line 67) and the superclass ResourceFactoryFragment2. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tools/ddk/xtext/generator/ui/compare/CompareFragment2.xtend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/ui/compare/CompareFragment2.xtend b/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/ui/compare/CompareFragment2.xtend index bb2979840..3ac0b7f97 100644 --- a/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/ui/compare/CompareFragment2.xtend +++ b/com.avaloq.tools.ddk.xtext.generator/src/com/avaloq/tools/ddk/xtext/generator/ui/compare/CompareFragment2.xtend @@ -67,7 +67,7 @@ class CompareFragment2 extends ResourceFactoryFragment2 { if (projectConfig.eclipsePlugin.manifest !== null) { projectConfig.eclipsePlugin.manifest.requiredBundles += bundleName } - if (projectConfig.eclipsePlugin.pluginXml.entries !== null) { + if (projectConfig.eclipsePlugin.pluginXml !== null) { projectConfig.eclipsePlugin.pluginXml.entries += eclipsePluginXmlContribution() } }