This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new 46ea9330b AVRO-3985: Apply trusted packages check on 
SpecificDatumReader(data) constructor (#3330)
46ea9330b is described below

commit 46ea9330b9e533aef0b14ed09e39479e1cf786c0
Author: JB Onofré <[email protected]>
AuthorDate: Sat Mar 22 02:35:33 2025 +0100

    AVRO-3985: Apply trusted packages check on SpecificDatumReader(data) 
constructor (#3330)
---
 .../avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
 
b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
index e782c58c8..29c8ac665 100644
--- 
a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
+++ 
b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
@@ -74,6 +74,7 @@ public class SpecificDatumReader<T> extends 
GenericDatumReader<T> {
   /** Construct given a {@link SpecificData}. */
   public SpecificDatumReader(SpecificData data) {
     super(data);
+    trustedPackages.addAll(Arrays.asList(SERIALIZABLE_PACKAGES));
   }
 
   /** Return the contained {@link SpecificData}. */

Reply via email to