gnodet commented on code in PR #24588: URL: https://github.com/apache/camel/pull/24588#discussion_r3559459439
########## core/camel-support/src/main/java/org/apache/camel/support/DeserializationFilterHelper.java: ########## @@ -0,0 +1,143 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.support; + +import java.io.ObjectInputFilter; +import java.io.ObjectInputStream; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Helper for resolving the JEP-290 {@link ObjectInputFilter} that components apply when deserializing Java objects from + * potentially untrusted input (message payloads, persisted exchange state, and so on). + * + * <p> + * The resolution order is the same for every component: + * <ol> + * <li>an explicitly configured filter pattern (typically a {@code deserializationFilter} endpoint or component + * option);</li> + * <li>the JVM-wide filter configured via the {@code jdk.serialFilter} system property or + * {@link ObjectInputFilter.Config#setSerialFilter(ObjectInputFilter)};</li> + * <li>a conservative Camel default.</li> + * </ol> + * + * @since 4.22.0 + */ +public final class DeserializationFilterHelper { Review Comment: Minor: `@since 4.22.0` uses the patch version format while adjacent files in `camel-support` (`EndpointSizeStatistics`, `OAuthHelper`, `GroupVariableRepository`) use `@since 4.22`. Consider aligning for consistency. ```suggestion * @since 4.22 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
