This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 0e31422e33e CAMEL-19090: Remove deprecated apis in core 0e31422e33e is described below commit 0e31422e33eae0657afd64afeba7b41d94488874 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Mar 2 15:31:35 2023 +0100 CAMEL-19090: Remove deprecated apis in core --- .../camel/impl/engine/DefaultBeanIntrospection.java | 1 - .../camel/impl/engine}/IntrospectionSupport.java | 13 ++++++++----- .../engine}/IntrospectionSupportTest.java | 21 ++++++++++----------- .../modules/ROOT/pages/camel-4-migration-guide.adoc | 1 + 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultBeanIntrospection.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultBeanIntrospection.java index 0d605aaa0fb..e3fe55b9ca7 100644 --- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultBeanIntrospection.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultBeanIntrospection.java @@ -32,7 +32,6 @@ import org.apache.camel.StartupListener; import org.apache.camel.TypeConverter; import org.apache.camel.spi.BeanIntrospection; import org.apache.camel.spi.CamelLogger; -import org.apache.camel.support.IntrospectionSupport; import org.apache.camel.support.service.ServiceSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java similarity index 99% rename from core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java rename to core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java index d5cd062c6c6..5217e6c509c 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/IntrospectionSupport.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.support; +package org.apache.camel.impl.engine; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; @@ -41,6 +41,10 @@ import org.apache.camel.NoTypeConversionAvailableException; import org.apache.camel.TypeConverter; import org.apache.camel.spi.BeanIntrospection; import org.apache.camel.spi.PropertiesComponent; +import org.apache.camel.support.CamelContextHelper; +import org.apache.camel.support.LRUCache; +import org.apache.camel.support.LRUCacheFactory; +import org.apache.camel.support.PropertyBindingSupport; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.StringHelper; import org.slf4j.Logger; @@ -59,11 +63,10 @@ import static org.apache.camel.util.ObjectHelper.isNotEmpty; * <p/> * This implementation will use a cache when the {@link #getProperties(Object, java.util.Map, String)} method is being * used. Also the {@link #cacheClass(Class)} method gives access to the introspect cache. - * - * @deprecated use {@link org.apache.camel.spi.BeanIntrospection} + * <p/> + * This class is only for internal use by Camel - not for end users; use {@link BeanIntrospection} instead. */ -@Deprecated -public final class IntrospectionSupport { +final class IntrospectionSupport { private static final Logger LOG = LoggerFactory.getLogger(IntrospectionSupport.class); private static final List<Method> EXCLUDED_METHODS = new ArrayList<>(); diff --git a/core/camel-core/src/test/java/org/apache/camel/support/IntrospectionSupportTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/engine/IntrospectionSupportTest.java similarity index 96% rename from core/camel-core/src/test/java/org/apache/camel/support/IntrospectionSupportTest.java rename to core/camel-core/src/test/java/org/apache/camel/impl/engine/IntrospectionSupportTest.java index 177f2d79b6e..2082a0ee525 100644 --- a/core/camel-core/src/test/java/org/apache/camel/support/IntrospectionSupportTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/impl/engine/IntrospectionSupportTest.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.support; +package org.apache.camel.impl.engine; import java.lang.reflect.Method; import java.util.ArrayList; @@ -32,15 +32,15 @@ import org.apache.camel.util.AnotherExampleBean; import org.apache.camel.util.OtherExampleBean; import org.junit.jupiter.api.Test; -import static org.apache.camel.support.IntrospectionSupport.extractProperties; -import static org.apache.camel.support.IntrospectionSupport.findSetterMethodsOrderedByParameterType; -import static org.apache.camel.support.IntrospectionSupport.getProperties; -import static org.apache.camel.support.IntrospectionSupport.getProperty; -import static org.apache.camel.support.IntrospectionSupport.getPropertyGetter; -import static org.apache.camel.support.IntrospectionSupport.getPropertySetter; -import static org.apache.camel.support.IntrospectionSupport.isGetter; -import static org.apache.camel.support.IntrospectionSupport.isSetter; -import static org.apache.camel.support.IntrospectionSupport.setProperty; +import static org.apache.camel.impl.engine.IntrospectionSupport.extractProperties; +import static org.apache.camel.impl.engine.IntrospectionSupport.findSetterMethodsOrderedByParameterType; +import static org.apache.camel.impl.engine.IntrospectionSupport.getProperties; +import static org.apache.camel.impl.engine.IntrospectionSupport.getProperty; +import static org.apache.camel.impl.engine.IntrospectionSupport.getPropertyGetter; +import static org.apache.camel.impl.engine.IntrospectionSupport.getPropertySetter; +import static org.apache.camel.impl.engine.IntrospectionSupport.isGetter; +import static org.apache.camel.impl.engine.IntrospectionSupport.isSetter; +import static org.apache.camel.impl.engine.IntrospectionSupport.setProperty; import static org.junit.jupiter.api.Assertions.*; /** @@ -49,7 +49,6 @@ import static org.junit.jupiter.api.Assertions.*; * The deprecation warnings are a false positive here because this class test IntrospectionSupport (which is, indeed, * deprecated) */ - public class IntrospectionSupportTest extends ContextTestSupport { @Test diff --git a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc index 3dde1b074f4..98ac18aa79b 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc @@ -79,6 +79,7 @@ We have removed deprecated APIs such as the following: - Exchange failure handling status has moved from being a property defined as `ExchangePropertyKey.FAILURE_HANDLED` to a member of the ExtendedExchange, accessible via `isFailureHandled()`method. - Removed `Discard` and `DiscardOldest` from `org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy`. - Removed `org.apache.camel.builder.SimpleBuilder`. Was mostly used internally in Camel with the Java DSL in some situations. +- Moved `org.apache.camel.support.IntrospectionSupport` to `camel-core-engine` for internal use only. End users should use `org.apache.camel.spi.BeanInspection` instead. == EIP Changes