This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 3c96c2597cfe15ec593c3dd3f7c0b26c9ae2f818 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Thu Jul 13 19:58:19 2023 +0200 Opens two more classes to reflection by JAXB in JPMS context. --- .../org/apache/sis/internal/jaxb/lan/LocaleAdapter.java | 4 ++-- .../internal/jaxb/referencing/CC_OperationParameter.java | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java index bd0a9f5cbf..e6ef97684c 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java @@ -47,7 +47,7 @@ public final class LocaleAdapter extends XmlAdapter<LanguageCode, Locale> { /** * Empty constructor for JAXB. */ - private LocaleAdapter() { + public LocaleAdapter() { } /** @@ -103,7 +103,7 @@ public final class LocaleAdapter extends XmlAdapter<LanguageCode, Locale> { /** * Empty constructor for JAXB. */ - private Wrapped() { + public Wrapped() { } /** diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameter.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameter.java index 9f0e93b471..62752d18d9 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameter.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameter.java @@ -78,7 +78,7 @@ public final class CC_OperationParameter extends PropertyType<CC_OperationParame } /** - * Constructor for the {@link #wrap} method only. + * Constructor for the {@link #wrap(ParameterDescriptor)} method only. */ private CC_OperationParameter(final ParameterDescriptor<?> parameter) { super(parameter); @@ -157,10 +157,10 @@ public final class CC_OperationParameter extends PropertyType<CC_OperationParame * the unit of measurement of the parameter descriptor to create. Those information will * be used by the {@link DefaultParameterDescriptor} private constructor. * - * @param unmarshaller the unmarshaller. - * @param parent the enclosing {@link ParameterValue} instance being unmarshalled. + * @param caller the unmarshaller which is calling this method. + * @param parent the enclosing {@link ParameterValue} instance being unmarshalled. */ - private void beforeUnmarshal(final Unmarshaller unmarshaller, final Object parent) { + public void beforeUnmarshal(final Unmarshaller caller, final Object parent) { if (parent instanceof ParameterValue<?>) { valueClass = valueClass ((ParameterValue<?>) parent); valueDomain = valueDomain((ParameterValue<?>) parent); @@ -171,8 +171,12 @@ public final class CC_OperationParameter extends PropertyType<CC_OperationParame /** * Clears the value class and units of measurement after {@code <gml:OperationParameter>} unmarshalling * for avoiding that those information are wrongly used for an unrelated {@link ParameterDescriptor}. + * This method is invoked automatically by JAXB. + * + * @param caller the unmarshaller which is calling this method. + * @param parent the enclosing {@link ParameterValue} instance being unmarshalled. */ - private void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + public void afterUnmarshal(final Unmarshaller caller, final Object parent) { Context.setWrapper(Context.current(), null); } }