From 4fd23d1c4cb7f5415ce2eedbed49a89b5722fa66 Mon Sep 17 00:00:00 2001 From: Sven Keidel Date: Tue, 12 May 2026 11:39:04 +0200 Subject: [PATCH 1/4] Implement ConfigReader[EntryPointContainer] manually to avoid issue with scala-reflect: https://github.com/opalj/JCG/issues/17 --- .../scala/org/opalj/br/analyses/cg/EntryPointFinder.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala index 650faf87ad..f19021ea78 100644 --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala @@ -376,7 +376,11 @@ trait ConfigurationEntryPointsFinder extends EntryPointFinder { declaringClass: String, name: String, descriptor: Option[String] - ) derives ConfigReader + ) + + // Implement ConfigReader manually to avoid issue with scala-reflect: https://github.com/opalj/JCG/issues/17 + implicit private val entryPointContainerReader: ConfigReader[EntryPointContainer] = + ConfigReader.forProduct3("declaringClass", "name", "descriptor")(new EntryPointContainer(_,_,_)) } /** From 7c50e9c15aee8124f3c86de0b754541a0142cc37 Mon Sep 17 00:00:00 2001 From: Sven Keidel Date: Tue, 12 May 2026 13:06:09 +0200 Subject: [PATCH 2/4] Accept EntryPointContainer "declaring-class" and "declaringClass" keys --- .../main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala index f19021ea78..5e1fbb02a6 100644 --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala @@ -380,7 +380,8 @@ trait ConfigurationEntryPointsFinder extends EntryPointFinder { // Implement ConfigReader manually to avoid issue with scala-reflect: https://github.com/opalj/JCG/issues/17 implicit private val entryPointContainerReader: ConfigReader[EntryPointContainer] = - ConfigReader.forProduct3("declaringClass", "name", "descriptor")(new EntryPointContainer(_,_,_)) + ConfigReader.forProduct3("declaring-class", "name", "descriptor")(EntryPointContainer.apply) + .orElse(ConfigReader.forProduct3("declaringClass", "name", "descriptor")(EntryPointContainer.apply)) } /** From 2a613d691a70fbd01ab7cc5e9fc329b60bbde02f Mon Sep 17 00:00:00 2001 From: Sven Keidel Date: Tue, 12 May 2026 13:46:29 +0200 Subject: [PATCH 3/4] Only accept EntryPointContainer.declaring-class keys --- .../main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala index 5e1fbb02a6..513c341f5d 100644 --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala @@ -379,9 +379,8 @@ trait ConfigurationEntryPointsFinder extends EntryPointFinder { ) // Implement ConfigReader manually to avoid issue with scala-reflect: https://github.com/opalj/JCG/issues/17 - implicit private val entryPointContainerReader: ConfigReader[EntryPointContainer] = + private implicit val entryPointContainerReader: ConfigReader[EntryPointContainer] = ConfigReader.forProduct3("declaring-class", "name", "descriptor")(EntryPointContainer.apply) - .orElse(ConfigReader.forProduct3("declaringClass", "name", "descriptor")(EntryPointContainer.apply)) } /** From 4607733afde7bc70f25ce746e19f6e24a0ef8b31 Mon Sep 17 00:00:00 2001 From: Sven Keidel Date: Tue, 12 May 2026 13:48:34 +0200 Subject: [PATCH 4/4] Fix documentation --- .../scala/org/opalj/br/analyses/cg/EntryPointFinder.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala index 513c341f5d..eb4068f2b2 100644 --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala @@ -235,8 +235,8 @@ trait LibraryEntryPointsFinder extends EntryPointFinder { * InitialEntryPointKey { * analysis = "org.opalj.br.analyses.cg.ConfigurationEntryPointsFinder" * entryPoints = [ - * {declaringClass = "java/util/List+", name = "add"}, - * {declaringClass = "java/util/List", name = "remove", descriptor = "(I)Z"} + * {declaring-class = "java/util/List+", name = "add"}, + * {declaring-class = "java/util/List", name = "remove", descriptor = "(I)Z"} * ] * } * } @@ -245,7 +245,7 @@ trait LibraryEntryPointsFinder extends EntryPointFinder { * Please note that the first entry point, by adding the "+" to the declaring class' name, considers * all "add" methods from all subtypes independently of the respective method's descriptor. In * contrast, the second entry does specify a descriptor and does not consider List's subtypes (by - * not suffixing a plus to the declaringClass) which implies that only the remove method with this + * not suffixing a plus to the declaring-class) which implies that only the remove method with this * descriptor is considered as entry point. * * @author Michael Reif