From d0ef4484a56cb1b40f902721c6b3a047819e7572 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 8 Feb 2023 05:09:48 +0100 Subject: [PATCH 1/3] #38: update to JCOBridge 2.5.2 --- .github/workflows/build.yaml | 4 ++-- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/pullrequest.yaml | 4 ++-- .github/workflows/release.yaml | 4 ++-- src/java/jnet/pom.xml | 2 +- src/net/JNet/JNet.csproj | 2 +- src/net/JNetReflector/JNetReflector.csproj | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bee797bc44..45a3315c3e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -73,7 +73,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Install local file to be used within Javadoc plugin of generated POM - run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.1 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar + run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.2 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar shell: bash - name: Create Jars @@ -136,7 +136,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Install local file to be used within Javadoc plugin of generated POM - run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.1 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar + run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.2 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar shell: bash - name: Create Jars diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e2668a5a2f..f68f95b63c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -110,7 +110,7 @@ jobs: - name: Maven preparation (step 2) if: matrix.language == 'java' - run: mvn "install:install-file" "-DgroupId=JCOBridge" "-DartifactId=JCOBridge" "-Dversion=2.5.1" "-Dpackaging=jar" "-Dfile=./bin/net6.0/JCOBridge.jar" + run: mvn "install:install-file" "-DgroupId=JCOBridge" "-DartifactId=JCOBridge" "-Dversion=2.5.2" "-Dpackaging=jar" "-Dfile=./bin/net6.0/JCOBridge.jar" - if: matrix.language == 'java' run: mvn --file ./src/java/jnet/pom.xml --no-transfer-progress package diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml index b3b0ac668c..f85f7e610f 100644 --- a/.github/workflows/pullrequest.yaml +++ b/.github/workflows/pullrequest.yaml @@ -66,7 +66,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Install local file to be used within Javadoc plugin of generated POM - run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.1 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar + run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.2 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar shell: bash - name: Create Jars @@ -117,7 +117,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Install local file to be used within Javadoc plugin of generated POM - run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.1 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar + run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.2 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar shell: bash - name: Create Jars diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f7d70d0bcc..769f3d59e8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Install local file to be used within Javadoc plugin of generated POM - run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.1 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar + run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.2 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar shell: bash - name: Create Jars @@ -102,7 +102,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Install local file to be used within Javadoc plugin of generated POM - run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.1 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar + run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.2 -Dpackaging=jar -Dfile=./bin/net6.0/JCOBridge.jar shell: bash - name: Create Jars diff --git a/src/java/jnet/pom.xml b/src/java/jnet/pom.xml index 59935dbb81..c304555362 100644 --- a/src/java/jnet/pom.xml +++ b/src/java/jnet/pom.xml @@ -41,7 +41,7 @@ 8 ${basedir}/classpathfile.classpath 1.5.0.0 - 2.5.1 + 2.5.2 diff --git a/src/net/JNet/JNet.csproj b/src/net/JNet/JNet.csproj index 12243909b6..555c745529 100644 --- a/src/net/JNet/JNet.csproj +++ b/src/net/JNet/JNet.csproj @@ -18,7 +18,7 @@ - + All None diff --git a/src/net/JNetReflector/JNetReflector.csproj b/src/net/JNetReflector/JNetReflector.csproj index f63d6e297b..bbc85f6597 100644 --- a/src/net/JNetReflector/JNetReflector.csproj +++ b/src/net/JNetReflector/JNetReflector.csproj @@ -117,7 +117,7 @@ - + All None From 222546fddc86a24fa7e3a60fce09ae9d5ed318b0 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 8 Feb 2023 15:33:56 +0100 Subject: [PATCH 2/3] Test update: to be opened an issue on Collection conversion --- tests/net/JNetTest/Program.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/net/JNetTest/Program.cs b/tests/net/JNetTest/Program.cs index cd9d596ab7..bcd1d81896 100644 --- a/tests/net/JNetTest/Program.cs +++ b/tests/net/JNetTest/Program.cs @@ -19,6 +19,7 @@ using Java.Util; using MASES.JNetTest.Common; using MASES.JNet.Extensions; +using System.Diagnostics; namespace MASES.JNetTest { @@ -59,8 +60,27 @@ static void TestExtensions() var map = dict.ToMap(); var newDict = map.ToDictiony(); - var collection = newDict.Values.ToJCollection(); - var list = collection.ToList(); + const int execution = 10000; + Stopwatch w = Stopwatch.StartNew(); + ArrayList alist = new Java.Util.ArrayList(); + for (int i = 0; i < execution; i++) + { + alist.Add(i.ToString()); + } + w.Stop(); + System.Console.WriteLine($"ArrayList Elapsed ticks: {w.ElapsedTicks}"); + w.Restart(); + System.Collections.Generic.List nlist = new System.Collections.Generic.List(); + for (int i = 0; i < execution; i++) + { + nlist.Add(i.ToString()); + } + w.Stop(); + System.Console.WriteLine($"System.Collections.Generic.List Elapsed ticks: {w.ElapsedTicks}"); + + //var collection = newDict.Values.ToJCollection(); + //var intermediate = collection.ToList>(); + var list = ((Collection)alist).ToList(); // Raise an exception because iterator returns java/util/HashMap$Node which is not convertible to string } } } From 9212629459caeda28ccf9f8afd927f8d48ef1d49 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 8 Feb 2023 15:35:44 +0100 Subject: [PATCH 3/3] Fixed template --- .../templates/jcobridgeConsoleApp/jcobridgeConsoleApp.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/templates/templates/jcobridgeConsoleApp/jcobridgeConsoleApp.csproj b/src/net/templates/templates/jcobridgeConsoleApp/jcobridgeConsoleApp.csproj index b51f58093a..20f35d1849 100644 --- a/src/net/templates/templates/jcobridgeConsoleApp/jcobridgeConsoleApp.csproj +++ b/src/net/templates/templates/jcobridgeConsoleApp/jcobridgeConsoleApp.csproj @@ -7,6 +7,6 @@ - +