This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch camel-3.21.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.21.x by this push: new 2f93db9f720 Mapstruct: Method must be public in DefaultMapStructFinder.discoverMappings (#11261) 2f93db9f720 is described below commit 2f93db9f72004f684e72341ff7f1ceccd480fe48 Author: Giacomo <gcarnev...@imolainformatica.it> AuthorDate: Thu Aug 31 20:27:00 2023 +0200 Mapstruct: Method must be public in DefaultMapStructFinder.discoverMappings (#11261) --- .../org/apache/camel/component/mapstruct/DefaultMapStructFinder.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/camel-mapstruct/src/main/java/org/apache/camel/component/mapstruct/DefaultMapStructFinder.java b/components/camel-mapstruct/src/main/java/org/apache/camel/component/mapstruct/DefaultMapStructFinder.java index f68993ed877..4c335c8b7ad 100644 --- a/components/camel-mapstruct/src/main/java/org/apache/camel/component/mapstruct/DefaultMapStructFinder.java +++ b/components/camel-mapstruct/src/main/java/org/apache/camel/component/mapstruct/DefaultMapStructFinder.java @@ -16,6 +16,7 @@ */ package org.apache.camel.component.mapstruct; +import java.lang.reflect.Modifier; import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.CamelContext; @@ -58,6 +59,10 @@ public class DefaultMapStructFinder extends ServiceSupport implements MapStructM final Object mapper = Mappers.getMapper(clazz); if (mapper != null) { ReflectionHelper.doWithMethods(mapper.getClass(), mc -> { + // must be public + if (!Modifier.isPublic(mc.getModifiers())) { + return; + } // must not be a default method if (mc.isDefault()) { return;