Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
8f24b7e
AVRO-3670: Add NET 7.0 support (#1956)
zcsizmadia Dec 7, 2022
2cd7093
AVRO-3715: [Java] plugin-tools-javadoc 3.7.0 does not exist.
nielsbasjes Feb 16, 2023
d678eea
AVRO-3715: [Python] Fix lint issues (reformat code).
nielsbasjes Feb 17, 2023
792efa4
AVRO-3715: [Python] Fix type issues
nielsbasjes Feb 17, 2023
4a3a42f
Add NET 7 SDK to Dockerfile (#2193)
zcsizmadia Apr 20, 2023
c9ec83c
AVRO-3737: fix memcheck test (#2213)
clesaec May 5, 2023
eb8fe6a
AVRO-3736: [Ruby] Preinstall gems in ubertool docker (#2191)
RyanSkraba May 25, 2023
072d885
Revert "AVRO-3001 AVRO-3274 AVRO-3568 AVRO-3613: Add JSON encoder/dec…
RyanSkraba Jun 13, 2023
9053820
[hotfix] Add public modifier for JUnit4 test
RyanSkraba Jun 13, 2023
96a61cc
AVRO-3639: Add fleet.toml and .cargo/config.toml to gitignore
martin-g Oct 14, 2022
a16d554
Bump jackson-bom from 2.12.7.20221012 to 2.14.0 in /lang/java (#1944)
dependabot[bot] Nov 8, 2022
af65b86
Bump Maven plugin versions and maven version for the docker based bui…
iemejia Nov 25, 2022
cc92834
Bump jackson-bom from 2.14.0 to 2.14.1 in /lang/java (#1987)
dependabot[bot] Nov 28, 2022
7b141c6
[AVRO-3701] Add github action to validate maven 4 build compatibility…
iemejia Jan 5, 2023
110c093
AVRO-3700: Publish Java SBOM artifacts with CycloneDX
dongjoon-hyun Jan 6, 2023
0df62f2
AVRO-3700: Move CycloneDX configuration to Java specific project (#2049)
iemejia Jan 6, 2023
ba99b53
Bump cyclonedx-maven-plugin from 2.7.3 to 2.7.4 in /lang/java (#2051)
dependabot[bot] Jan 9, 2023
80308fb
Bump jackson-bom from 2.14.1 to 2.14.2 in /lang/java (#2069)
dependabot[bot] Jan 30, 2023
f3f80e0
AVRO-3712: Fix build by initializing union (#2079)
jmccl Feb 7, 2023
c8a0065
Bump maven-enforcer-plugin from 3.1.0 to 3.2.1 in /lang/java
dependabot[bot] Feb 16, 2023
81bd07f
Bump zstd-jni from 1.5.2-5 to 1.5.4-1 in /lang/java
dependabot[bot] Feb 16, 2023
f13bc87
Bump snappy-java from 1.1.9.0 to 1.1.9.1 in /lang/java
dependabot[bot] Feb 16, 2023
5d18b74
Bump grpc.version from 1.52.1 to 1.53.0 in /lang/java
dependabot[bot] Feb 16, 2023
76143d1
[C++] Fix compiler warnings
GerritNG Feb 7, 2023
f315963
Bump cyclonedx-maven-plugin from 2.7.4 to 2.7.5 in /lang/java (#2112)
dependabot[bot] Feb 20, 2023
43a2ddd
AVRO-2404: Remove now obsolete Apache Rat workaround (#2119)
nielsbasjes Feb 26, 2023
17f17e9
Bump maven-plugin-plugin from 3.7.1 to 3.8.1 in /lang/java (#2127)
dependabot[bot] Mar 6, 2023
e45f64e
Bump zstd-jni from 1.5.4-1 to 1.5.4-2 in /lang/java (#2126)
dependabot[bot] Mar 6, 2023
b9a5232
Bump plexus-utils from 3.5.0 to 3.5.1 in /lang/java (#2125)
dependabot[bot] Mar 6, 2023
a94f4a5
Bump jetty.version in /lang/java (#2122)
dependabot[bot] Mar 6, 2023
910ad9d
AVRO-2943 improve GenericRecord MAP type comparison
frankgrimes97 Nov 3, 2020
a560ba6
[AVRO-2943] Add new GenericData String/Utf8 ARRAY comparison test (#2…
frankgrimes97 Mar 13, 2023
a26c29f
Bump grpc.version from 1.53.0 to 1.54.0 in /lang/java
dependabot[bot] Mar 26, 2023
65ba277
Bump hadoop-client from 3.3.4 to 3.3.5 in /lang/java
dependabot[bot] Mar 26, 2023
de9e6c0
Bump netty-bom from 4.1.89.Final to 4.1.90.Final in /lang/java
dependabot[bot] Mar 19, 2023
5437a44
Bump reload4j from 1.2.24 to 1.2.25 in /lang/java
dependabot[bot] Mar 26, 2023
31c3c3c
Bump maven-enforcer-plugin from 3.2.1 to 3.3.0 in /lang/java
dependabot[bot] Apr 9, 2023
26727f1
Bump netty-bom from 4.1.90.Final to 4.1.91.Final in /lang/java
dependabot[bot] Apr 9, 2023
cd24301
Bump cyclonedx-maven-plugin from 2.7.5 to 2.7.6 in /lang/java
dependabot[bot] Apr 2, 2023
8340f43
Bump extra-enforcer-rules from 1.6.1 to 1.6.2 in /lang/java
dependabot[bot] Apr 13, 2023
2f70480
Bump maven-plugin-plugin from 3.8.1 to 3.8.2 in /lang/java
dependabot[bot] Apr 23, 2023
aef6ec3
Bump maven-checkstyle-plugin from 3.2.1 to 3.2.2 in /lang/java
dependabot[bot] Apr 23, 2023
399a1b8
Bump zstd-jni from 1.5.4-2 to 1.5.5-2 in /lang/java
dependabot[bot] Apr 23, 2023
ee4b670
Bump cyclonedx-maven-plugin from 2.7.6 to 2.7.7 in /lang/java
dependabot[bot] Apr 23, 2023
14e1fef
Bump cyclonedx-maven-plugin from 2.7.7 to 2.7.8 in /lang/java
dependabot[bot] Apr 30, 2023
068d484
Bump junit5.version from 5.9.2 to 5.9.3 in /lang/java
dependabot[bot] Apr 30, 2023
f6e4a7f
Bump netty-bom from 4.1.91.Final to 4.1.92.Final in /lang/java
dependabot[bot] May 4, 2023
9e4d489
Bump grpc.version from 1.54.0 to 1.54.1 in /lang/java
dependabot[bot] Apr 25, 2023
221dc2e
Bump protobuf-java from 3.22.2 to 3.22.3 in /lang/java
dependabot[bot] May 4, 2023
60979bb
Bump maven-surefire-plugin from 3.0.0 to 3.1.0 in /lang/java
dependabot[bot] May 7, 2023
e67c0e8
Bump protobuf-java from 3.22.3 to 3.22.4 in /lang/java
dependabot[bot] May 7, 2023
ed6eefa
Bump protobuf-java from 3.22.4 to 3.23.1 in /lang/java (#2246)
dependabot[bot] May 25, 2023
06800c4
Bump zstd-jni from 1.5.5-2 to 1.5.5-3 in /lang/java (#2244)
dependabot[bot] May 25, 2023
8155e28
Bump maven-gpg-plugin from 3.0.1 to 3.1.0 in /lang/java (#2218)
dependabot[bot] May 25, 2023
10d3ea2
Bump grpc.version from 1.54.1 to 1.55.1 in /lang/java (#2229)
dependabot[bot] May 25, 2023
d6d3f3e
Bump protobuf-java from 3.23.1 to 3.23.2 in /lang/java (#2259)
dependabot[bot] Jun 13, 2023
3f183c7
Bump extra-enforcer-rules from 1.6.2 to 1.7.0 in /lang/java (#2267)
dependabot[bot] Jun 13, 2023
4fffd31
Bump zstd-jni from 1.5.5-3 to 1.5.5-4 in /lang/java (#2279)
dependabot[bot] Jun 13, 2023
058458e
Bump snappy-java from 1.1.9.1 to 1.1.10.0 in /lang/java (#2255)
dependabot[bot] Jun 13, 2023
91ab17f
Bump cyclonedx-maven-plugin from 2.7.8 to 2.7.9 in /lang/java (#2243)
dependabot[bot] Jun 13, 2023
47df57d
Bump build-helper-maven-plugin from 3.3.0 to 3.4.0 in /lang/java (#2233)
dependabot[bot] Jun 13, 2023
b7d24e5
Bump netty-bom from 4.1.92.Final to 4.1.93.Final in /lang/java (#2256)
dependabot[bot] Jun 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeql-csharp-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
3.1.x
5.0.x
6.0.x
7.0.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/maven4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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
#
# https://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.

name: 'Maven 4'
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths:
- .github/workflows/maven4.yml
- lang/java/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
maven4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Cache Local Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Cache Maven 4 Build Cache
uses: actions/cache@v3
with:
path: ~/.m2/build-cache
key: ${{ runner.os }}-maven-build-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-build-cache

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Setup Maven 4
uses: stCarolas/[email protected]
with:
maven-version: 4.0.0-alpha-3

- name: Test
run: mvn clean package
27 changes: 8 additions & 19 deletions .github/workflows/test-lang-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,22 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Add libzstd
shell: bash
run: sudo apt-get install -y libzstd-dev

- name: Install .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
Expand All @@ -63,38 +64,26 @@ jobs:
- name: Test
run: ./build.sh test

# Build and test against .NET 7
# .NET 7 is not released yet, however this is a good way to test if the project is ready for the release
# Once .NET 7 is officially released, this can be removed and 7.0.x can be used instead above
- name: Install .NET SDK 7.0 (pre-release)
uses: actions/setup-dotnet@v1
with:
include-prerelease: true
dotnet-version: |
7.0.x

- name: Test .NET 7.0 (pre-release)
run: ./build.sh test

interop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Add libzstd
shell: bash
run: sudo apt-get install -y libzstd-dev

- name: Install .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x

- name: Cache Local Maven Repository
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-lang-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
3.1.x
5.0.x
6.0.x
7.0.x

- name: Install Java Avro for Interop Test
working-directory: .
Expand Down
25 changes: 25 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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

https://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.
-->
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>org.apache.maven.extensions</groupId>
<artifactId>maven-build-cache-extension</artifactId>
<version>1.0.0</version>
</extension>
</extensions>
8 changes: 6 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ DOCKER_BUILD_XTRA_ARGS=${DOCKER_BUILD_XTRA_ARGS-}
# Override the docker image name used.
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME-}

# When building a docker container, these are the files that will sent and available.
DOCKER_EXTRA_CONTEXT="lang/ruby/Gemfile lang/ruby/avro.gemspec lang/ruby/Manifest share/VERSION.txt"

usage() {
echo "Usage: $0 {lint|test|dist|sign|clean|veryclean|docker [--args \"docker-args\"]|rat|githooks|docker-test}"
exit 1
Expand Down Expand Up @@ -300,8 +303,9 @@ do
echo "RUN getent group $GROUP_ID || groupadd -g $GROUP_ID $USER_NAME"
echo "RUN getent passwd $USER_ID || useradd -g $GROUP_ID -u $USER_ID -k /root -m $USER_NAME"
} > Dockerfile
# Include the ruby gemspec for preinstallation.
# shellcheck disable=SC2086
tar -cf- lang/ruby/Gemfile Dockerfile | docker build $DOCKER_BUILD_XTRA_ARGS -t "$DOCKER_IMAGE_NAME" -
tar -cf- Dockerfile $DOCKER_EXTRA_CONTEXT | docker build $DOCKER_BUILD_XTRA_ARGS -t "$DOCKER_IMAGE_NAME" -
rm Dockerfile
# By mapping the .m2 directory you can do an mvn install from
# within the container and use the result on your normal
Expand Down Expand Up @@ -336,7 +340,7 @@ do
;;

docker-test)
tar -cf- share/docker/Dockerfile lang/ruby/Gemfile |
tar -cf- share/docker/Dockerfile $DOCKER_EXTRA_CONTEXT |
docker build -t avro-test -f share/docker/Dockerfile -
docker run --rm -v "${PWD}:/avro${DOCKER_MOUNT_FLAG}" --env "JAVA=${JAVA:-8}" avro-test /avro/share/docker/run-tests.sh
;;
Expand Down
2 changes: 1 addition & 1 deletion lang/c++/api/Reader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public:
union {
double d;
uint64_t i;
} v;
} v = { 0 };
reader_.read(v.i);
val = v.d;
}
Expand Down
2 changes: 1 addition & 1 deletion lang/c++/api/buffer/Buffer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public:
**/

size_type wroteTo(size_type size) {
int wrote = 0;
size_type wrote = 0;
if (size) {
if (size > freeSpace()) {
throw std::length_error("Impossible to write more data than free space");
Expand Down
3 changes: 3 additions & 0 deletions lang/c/tests/test_avro_commons_schema.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,16 @@ static void read_data(const char *dirpath, avro_schema_t schema) {
fprintf(stdout, "\nExit run test OK => %d records", records_read);
remove("./copy.avro");
fflush(stdout);
avro_file_reader_close(reader);
avro_file_writer_close(writer);
}

static void run_tests(const char *dirpath)
{
fprintf(stdout, "\nRun test for path '%s'", dirpath);
avro_schema_t schema = read_common_schema_test(dirpath);
read_data(dirpath, schema);
avro_schema_decref(schema);
}


Expand Down
28 changes: 14 additions & 14 deletions lang/csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ Install-Package Apache.Avro

## Project Target Frameworks

| Project | Published to nuget.org | Type | .NET Standard 2.0 | .NET Standard 2.1 | .NET Core 3.1 | .NET 5.0 | .NET 6.0 |
|:-------------------:|:--------------------------:|:----------:|:------------------:|:-----------------:|:-------------:|:---------:|:---------:|
| Avro.main | Apache.Avro | Library | ✔️ | ✔️ | | | |
| Avro.File.Snappy | Apache.Avro.File.Snappy | Library | ✔️ | ✔️ | | | |
| Avro.File.BZip2 | Apache.Avro.File.BZip2 | Library | ✔️ | ✔️ | | | |
| Avro.File.XZ | Apache.Avro.File.XZ | Library | ✔️ | ✔️ | | | |
| Avro.File.Zstandard | Apache.Avro.File.Zstandard | Library | ✔️ | ✔️ | | | |
| Avro.codegen | Apache.Avro.Tools | Exe | | | ✔️ |✔️ |✔️ |
| Avro.ipc | | Library | ✔️ | ✔️ | | | |
| Avro.ipc.test | | Unit Tests | | | ✔️ |✔️ |✔️ |
| Avro.msbuild | | Library | ✔️ | ✔️ | | | |
| Avro.perf | | Exe | | | ✔️ |✔️ |✔️ |
| Avro.test | | Unit Tests | | | ✔️ |✔️ |✔️ |
| Avro.benchmark | | Exe | | | ✔️ |✔️ |✔️ |
| Project | Published to nuget.org | Type | .NET Standard 2.0 | .NET Standard 2.1 | .NET Core 3.1 | .NET 5.0 | .NET 6.0 | .NET 7.0 |
|:-------------------:|:--------------------------:|:----------:|:------------------:|:-----------------:|:-------------:|:---------:|:---------:|:---------:|
| Avro.main | Apache.Avro | Library | ✔️ | ✔️ | | | | |
| Avro.File.Snappy | Apache.Avro.File.Snappy | Library | ✔️ | ✔️ | | | | |
| Avro.File.BZip2 | Apache.Avro.File.BZip2 | Library | ✔️ | ✔️ | | | | |
| Avro.File.XZ | Apache.Avro.File.XZ | Library | ✔️ | ✔️ | | | | |
| Avro.File.Zstandard | Apache.Avro.File.Zstandard | Library | ✔️ | ✔️ | | | | |
| Avro.codegen | Apache.Avro.Tools | Exe | | | ✔️ |✔️ |✔️ |✔️ |
| Avro.ipc | | Library | ✔️ | ✔️ | | | | |
| Avro.ipc.test | | Unit Tests | | | ✔️ |✔️ |✔️ |✔️ |
| Avro.msbuild | | Library | ✔️ | ✔️ | | | | |
| Avro.perf | | Exe | | | ✔️ |✔️ |✔️ |✔️ |
| Avro.test | | Unit Tests | | | ✔️ |✔️ |✔️ |✔️ |
| Avro.benchmark | | Exe | | | ✔️ |✔️ |✔️ |✔️ |

## Dependency package version strategy

Expand Down
4 changes: 2 additions & 2 deletions lang/csharp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ do

perf)
pushd ./src/apache/perf/
dotnet run --configuration Release --framework net6.0
dotnet run --configuration Release --framework net7.0
;;

dist)
Expand Down Expand Up @@ -77,7 +77,7 @@ do
;;

interop-data-generate)
dotnet run --project src/apache/test/Avro.test.csproj --framework net6.0 ../../share/test/schemas/interop.avsc ../../build/interop/data
dotnet run --project src/apache/test/Avro.test.csproj --framework net7.0 ../../share/test/schemas/interop.avsc ../../build/interop/data
;;

interop-data-test)
Expand Down
10 changes: 7 additions & 3 deletions lang/csharp/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@

<PropertyGroup Label="Target Frameworks">
<!-- Exe -->
<!-- NOTE: .NET 7 is still in preview state, use it only if it is available to make sure the project is ready for it. When .NET 7 SDK is released preview, update this -->
<DefaultExeTargetFrameworks Condition="'$(NETCoreAppMaximumVersion)' != '7.0' or '$(_NETCoreSdkIsPreview)' == 'false'">netcoreapp3.1;net5.0;net6.0</DefaultExeTargetFrameworks>
<DefaultExeTargetFrameworks Condition="'$(NETCoreAppMaximumVersion)' == '7.0' and '$(_NETCoreSdkIsPreview)' == 'true'">net7.0</DefaultExeTargetFrameworks>
<DefaultExeTargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</DefaultExeTargetFrameworks>
<!-- Library -->
<DefaultLibraryTargetFrameworks>netstandard2.0;netstandard2.1</DefaultLibraryTargetFrameworks>
<!-- Unit Tests -->
Expand All @@ -61,6 +59,12 @@
<None Include="$(MSBuildThisFileDirectory)\..\..\doc\assets\icons\logo.png" Pack="true" Visible="false" PackagePath=""/>
</ItemGroup>

<PropertyGroup>
<!-- Disable warning for EOL target frameworks -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<PropertyGroup>
<IsTestProject Condition="'$(IsTestProject)' == ''">false</IsTestProject>
<IsTestProject Condition="$(MSBuildProjectName.ToLower().EndsWith('.test')) or $(MSBuildProjectName.ToLower().StartsWith('.test'))">true</IsTestProject>
Expand Down
6 changes: 6 additions & 0 deletions lang/csharp/src/apache/benchmark/Avro.benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<!-- Some schemas use lower cased names, which causes some class names being lower case only -->
<!-- e.g. The type name 'test' only contains lower-cased ascii characters. Such names may become reserved for the language. -->
<NoWarn>$(NoWarn);CS8981</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions lang/csharp/src/apache/benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace Avro.Benchmark
{
public class Program
{
// dotnet run -c Release -f net6.0
// dotnet run -c Release -f net6.0 --runtimes netcoreapp3.1 net5.0 net6.0
// dotnet run -c Release -f net7.0
// dotnet run -c Release -f net7.0 --runtimes netcoreapp3.1 net5.0 net6.0 net7.0
public static void Main(string[] args)
{
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
Expand Down
5 changes: 5 additions & 0 deletions lang/csharp/src/apache/main/IO/Encoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,10 @@ public interface Encoder
/// <param name="start">Position within data where the contents start.</param>
/// <param name="len">Number of bytes to write.</param>
void WriteFixed(byte[] data, int start, int len);

/// <summary>
/// Flushes the encoder.
/// </summary>
void Flush();
}
}
2 changes: 1 addition & 1 deletion lang/csharp/src/apache/main/IO/JsonEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Avro.IO
/// An <see cref="Encoder"/> for Avro's JSON data encoding.
///
/// JsonEncoder buffers output, and data may not appear on the output until
/// <see cref="Flush()"/> is called.
/// <see cref="Encoder.Flush()"/> is called.
///
/// JsonEncoder is not thread-safe.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions lang/csharp/src/apache/test/IO/JsonCodecTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ private byte[] fromJsonToAvro(string json, Schema schema)
GenericDatumWriter<object> writer = new GenericDatumWriter<object>(schema);
MemoryStream output = new MemoryStream();

JsonDecoder decoder = new JsonDecoder(schema, json);
BinaryEncoder encoder = new BinaryEncoder(output);
Decoder decoder = new JsonDecoder(schema, json);
Encoder encoder = new BinaryEncoder(output);

object datum = reader.Read(null, decoder);

Expand Down
Loading