blankensteiner commented on code in PR #253:
URL: https://github.com/apache/pulsar-dotpulsar/pull/253#discussion_r1958052644


##########
src/DotPulsar/Schemas/AvroISpecificRecordSchema.cs:
##########
@@ -0,0 +1,67 @@
+namespace DotPulsar.Schemas;
+
+using Avro.Generic;
+using Avro.IO;
+using Avro.Reflect;
+using Avro.Specific;
+/*

Review Comment:
   Move license header to the top of the file



##########
src/DotPulsar/Schemas/AvroISpecificRecordSchema.cs:
##########
@@ -0,0 +1,67 @@
+namespace DotPulsar.Schemas;
+
+using Avro.Generic;
+using Avro.IO;
+using Avro.Reflect;
+using Avro.Specific;
+/*
+ * Licensed 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.
+ */
+using DotPulsar.Abstractions;
+using DotPulsar.Exceptions;
+using System.Buffers;
+using System.Collections.Generic;
+using System.Text;
+
+public sealed class AvroISpecificRecordSchema<T> : ISchema<T> where T : 
ISpecificRecord
+{
+    private Avro.Schema? avroSchema;

Review Comment:
   Use "_" as postfix for private fields (and make them readyonly if possible)



##########
src/DotPulsar/DotPulsar.csproj:
##########
@@ -24,6 +24,7 @@
   </PropertyGroup>
  
   <ItemGroup>
+    <PackageReference Include="Apache.Avro" Version="1.12.0" />

Review Comment:
   Let's see if we can avoid adding Apache.Avro as a dependency. Either by 
doing reflection like we do for 
[compression](https://github.com/apache/pulsar-dotpulsar/wiki/Compression#why-doesnt-dotpulsar-just-include-them-by-default)
 or creating this as a separate package (e.g. DotPulsar.Extensions.Avro). 



##########
src/DotPulsar/Exceptions/AvroISpecificRecordSchemaException.cs:
##########
@@ -0,0 +1,31 @@
+/*
+ * Licensed 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.
+ */
+
+namespace DotPulsar.Exceptions;
+
+using System;
+
+/// <summary>
+/// Any error related to AvroISpecificSchema
+/// </summary>
+public sealed class AvroISpecificRecordSchemaException : DotPulsarException

Review Comment:
   Could this be named something more generic like "SchemaException" or using 
the existing SchemaSerializationException?



-- 
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]

Reply via email to