Skip to content

Bump MASES.JCOBridge from 2.6.9-rc6 to 2.6.9-rc8 - #1014

Merged
masesdevelopers merged 6 commits into
masterfrom
dependabot/nuget/src/net/JNet/multi-d5360e4135
Apr 29, 2026
Merged

masesdevelopers merged 6 commits into
masterfrom
dependabot/nuget/src/net/JNet/multi-d5360e4135

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 29, 2026

Copy link
Copy Markdown
Contributor

Updated MASES.JCOBridge from 2.6.9-rc6 to 2.6.9-rc8.

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: MASES.JCOBridge
  dependency-version: 2.6.9-rc8
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: MASES.JCOBridge
  dependency-version: 2.6.9-rc8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .net code dependencies Pull requests that update a dependency file labels Apr 29, 2026
Enforce unmanaged type constraints and improve docs for JVM-CLR primitive mappings; remove an unused field; add ByteBuffer usage/performance tests.

- JNetCoreExtensions.cs: expanded XML docs describing .NET↔JVM primitive type mappings and added `where TData : unmanaged` to DirectBufferWithWrap to restrict element types to unmanaged primitives.
- JNetHelper.cs: added the same primitive mapping docs and added `where T : unmanaged` to ListFrom to ensure only supported primitive types are used.
- Java.Awt.Container.cs: removed an unused `_disposed` field.
- tests/net/JNetByteBufferTest/Program.cs: added `using MASES.JCOBridge.C2JBridge;`, a new TestGetByteBuffersDataUsage() method that benchmarks and verifies ToArray/ToStream/AsSpan paths for ByteBuffer, and invoked it across multiple sizes.
- tests/net/JNetTest/Program.cs: changed a silent IsDirect() call to a Console.WriteLine for visibility and added TestByteBuffersUsage() with additional direct buffer manipulation checks.

These changes tighten type-safety for native buffer operations and add tests to validate and measure ByteBuffer data access paths.
Stopwatch watcher2 = Stopwatch.StartNew();
for (iteration = 0; iteration < requestedIterations; iteration++)
{
using (JCOBridgeDirectBuffer<byte> db = res.ToDirectBuffer())
Stopwatch watcher3 = Stopwatch.StartNew();
for (iteration = 0; iteration < requestedIterations; iteration++)
{
using (JCOBridgeDirectBuffer<byte> db = res.ToDirectBuffer())
}
var jClass = JNetTestCore.GlobalInstance.JVM.New("org.mases.jnet.TestArrayAndByteBuffer", length) as IJavaObject;

System.GC.Collect();

Console.WriteLine($"End getArray -> Invoke<byte[]> -> SequenceEqual Elapsed {watcher1.Elapsed} - Mean {TimeSpan.FromTicks(watcher1.Elapsed.Ticks / iteration)}");

System.GC.Collect();

Console.WriteLine($"End getArray -> AreEqualChunked Elapsed {watcher2.Elapsed} - Mean {TimeSpan.FromTicks(watcher2.Elapsed.Ticks / iteration)}");

System.GC.Collect();
}
var jClass = JNetTestCore.GlobalInstance.JVM.New("org.mases.jnet.TestArrayAndByteBuffer", length) as IJavaObject;

System.GC.Collect();

Console.WriteLine($"Created TestArrayAndByteBuffer");

System.GC.Collect();

Console.WriteLine($"End getByteBuffer -> ToArray -> SequenceEqual Elapsed {watcher1.Elapsed} - Mean {TimeSpan.FromTicks(watcher1.Elapsed.Ticks / iteration)}");

System.GC.Collect();

Console.WriteLine($"End getByteBuffer -> ToStream -> AreEqualNaive Elapsed {watcher2.Elapsed} - Mean {TimeSpan.FromTicks(watcher2.Elapsed.Ticks / iteration)}");

System.GC.Collect();

Console.WriteLine($"End getByteBuffer -> ToStream -> AreEqualChunked Elapsed {watcher3.Elapsed} - Mean {TimeSpan.FromTicks(watcher3.Elapsed.Ticks / iteration)}");

System.GC.Collect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant