diff --git a/avroparquet/src/test/java/docs/javadsl/AvroParquetSinkTest.java b/avroparquet/src/test/java/docs/javadsl/AvroParquetSinkTest.java index f82a69ba4..5aed60b12 100644 --- a/avroparquet/src/test/java/docs/javadsl/AvroParquetSinkTest.java +++ b/avroparquet/src/test/java/docs/javadsl/AvroParquetSinkTest.java @@ -76,6 +76,7 @@ public void setup() { records.add(new GenericRecordBuilder(schema).set("id", "3").set("body", "body13").build()); } + @SuppressWarnings("msg=deprecated") @Test public void createNewParquetFile() throws InterruptedException, IOException, TimeoutException, ExecutionException { @@ -83,7 +84,6 @@ public void createNewParquetFile() Configuration conf = new Configuration(); conf.setBoolean(AvroReadSupport.AVRO_COMPATIBILITY, true); - @SuppressWarnings("msg=deprecated") ParquetWriter writer = AvroParquetWriter.builder(new Path(file)) .withConf(conf) diff --git a/avroparquet/src/test/java/docs/javadsl/Examples.java b/avroparquet/src/test/java/docs/javadsl/Examples.java index f6cffa8a4..10974163c 100644 --- a/avroparquet/src/test/java/docs/javadsl/Examples.java +++ b/avroparquet/src/test/java/docs/javadsl/Examples.java @@ -58,10 +58,10 @@ public class Examples { Source source = AvroParquetSource.create(reader); // #init-source + @SuppressWarnings("msg=deprecated") public Examples() throws IOException { // #init-flow - @SuppressWarnings("msg=deprecated") ParquetWriter writer = AvroParquetWriter.builder(new Path("./test.parquet")) .withConf(conf) diff --git a/avroparquet/src/test/scala/docs/scaladsl/AbstractAvroParquetBase.scala b/avroparquet/src/test/scala/docs/scaladsl/AbstractAvroParquetBase.scala index 97a4052f8..970e07ad5 100644 --- a/avroparquet/src/test/scala/docs/scaladsl/AbstractAvroParquetBase.scala +++ b/avroparquet/src/test/scala/docs/scaladsl/AbstractAvroParquetBase.scala @@ -47,6 +47,7 @@ trait AbstractAvroParquetBase { val conf: Configuration = new Configuration() conf.setBoolean(AvroReadSupport.AVRO_COMPATIBILITY, true) + @SuppressWarnings(Array("msg=deprecated")) def parquetWriter[T <: GenericRecord](file: String, conf: Configuration, schema: Schema): ParquetWriter[T] = AvroParquetWriter.builder[T](new Path(file)).withConf(conf).withSchema(schema).build() @@ -80,6 +81,7 @@ trait AbstractAvroParquetBase { // #prepare-source } + @SuppressWarnings(Array("msg=deprecated")) def sinkDocumentation(): Unit = { // #prepare-sink import com.sksamuel.avro4s.Record @@ -97,6 +99,7 @@ trait AbstractAvroParquetBase { } } + @SuppressWarnings(Array("msg=deprecated")) def initWriterDocumentation(): Unit = { // #init-writer import org.apache.avro.generic.GenericRecord