[netbeans-html4j] branch master updated: Avoid usage of ArrayList in the TCK

2022-05-13 Thread jtulach
This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git


The following commit(s) were added to refs/heads/master by this push:
 new a24e5d7a Avoid usage of ArrayList in the TCK
a24e5d7a is described below

commit a24e5d7a23a8141445e29d85f6c7c95cee127552
Author: Jaroslav Tulach 
AuthorDate: Fri May 13 20:36:15 2022 +0200

Avoid usage of ArrayList in the TCK
---
 .../src/main/java/net/java/html/json/tests/ObtainAndComputeTest.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/json-tck/src/main/java/net/java/html/json/tests/ObtainAndComputeTest.java 
b/json-tck/src/main/java/net/java/html/json/tests/ObtainAndComputeTest.java
index 76e6e019..3543c1bf 100644
--- a/json-tck/src/main/java/net/java/html/json/tests/ObtainAndComputeTest.java
+++ b/json-tck/src/main/java/net/java/html/json/tests/ObtainAndComputeTest.java
@@ -18,7 +18,6 @@
  */
 package net.java.html.json.tests;
 
-import java.util.ArrayList;
 import java.util.List;
 import net.java.html.BrwsrCtx;
 import net.java.html.json.ComputedProperty;
@@ -98,7 +97,7 @@ public class ObtainAndComputeTest {
 static final class ObtainModel {
 @ComputedProperty
 public static List filteredUsers(List users, 
String filter) {
-List res = new ArrayList<>();
+List res = Models.asList();
 for (ObtainUser user : users) {
 if (user.getEmail().contains(filter)) {
 res.add(user);


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-html4j] 02/02: Search JavaScriptTCK via ServiceProvider

2022-05-13 Thread jtulach
This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git

commit 013a118589c4cc708de48a4873e53953d0a32764
Author: Jaroslav Tulach 
AuthorDate: Fri May 13 20:27:26 2022 +0200

Search JavaScriptTCK via ServiceProvider
---
 .../main/java/net/java/html/js/tests/JsUtils.java  | 27 ++
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/json-tck/src/main/java/net/java/html/js/tests/JsUtils.java 
b/json-tck/src/main/java/net/java/html/js/tests/JsUtils.java
index 2a262480..a370f1bf 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/JsUtils.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/JsUtils.java
@@ -19,6 +19,8 @@
 package net.java.html.js.tests;
 
 import java.io.StringReader;
+import java.util.ServiceLoader;
+import net.java.html.json.Models;
 import org.netbeans.html.boot.spi.Fn;
 import org.netbeans.html.json.tck.JavaScriptTCK;
 
@@ -32,6 +34,20 @@ public class JsUtils {
 instantiatedJsTCK = tck;
 }
 
+private static Iterable tcks(Class clazz) {
+if (instantiatedJsTCK != null) {
+return Models.asList(instantiatedJsTCK);
+}
+return ServiceLoader.load(JavaScriptTCK.class, cl(clazz));
+}
+private static ClassLoader cl(Class c) {
+try {
+return c.getClassLoader();
+} catch (SecurityException ex) {
+return null;
+}
+}
+
 static void execute(Class clazz, String script) throws Exception {
 Fn.Presenter p = Fn.activePresenter();
 p.loadScript(new StringReader(script));
@@ -39,12 +55,13 @@ public class JsUtils {
 
 static boolean executeNow(Class clazz, String script) {
 try {
-if (instantiatedJsTCK != null) {
-return instantiatedJsTCK.executeNow(script);
-} else {
-execute(clazz, script);
-return true;
+for (JavaScriptTCK j : tcks(clazz)) {
+if (j.executeNow(script)) {
+return true;
+}
 }
+execute(clazz, script);
+return true;
 } catch (Exception ex) {
 throw raise(RuntimeException.class, ex);
 }


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-html4j] 01/02: Java callback can be executed immediatelly, just then has to be delayed

2022-05-13 Thread jtulach
This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git

commit a39be9d0bf05d57bcb04e61073ef3c8bd5c25db7
Author: Jaroslav Tulach 
AuthorDate: Fri May 13 20:06:05 2022 +0200

Java callback can be executed immediatelly, just then has to be delayed
---
 json-tck/src/main/java/net/java/html/js/tests/AsyncJavaTest.java | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/json-tck/src/main/java/net/java/html/js/tests/AsyncJavaTest.java 
b/json-tck/src/main/java/net/java/html/js/tests/AsyncJavaTest.java
index e3c29776..3abe6797 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/AsyncJavaTest.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/AsyncJavaTest.java
@@ -18,9 +18,7 @@
  */
 package net.java.html.js.tests;
 
-import net.java.html.js.JavaScriptBody;
 import static net.java.html.js.tests.JavaScriptBodyTest.assertEquals;
-import static net.java.html.js.tests.JavaScriptBodyTest.assertFalse;
 import net.java.html.json.tests.PhaseExecutor;
 import org.netbeans.html.json.tck.KOTest;
 
@@ -32,12 +30,10 @@ public class AsyncJavaTest {
 PhaseExecutor.schedule(phases, () -> {
 boolean[] javaExecuted = { false };
 Object objWithX = AsyncJava.computeInAsyncJava(5, (n) -> {
-javaExecuted[0] = true;
 return new Factorial().factorial(n);
 }, () -> {});
 int initialValue = Bodies.readIntX(objWithX);
-assertFalse(javaExecuted[0], "Java code shall only be called when 
the JavaScript ends");
-assertEquals(-1, initialValue, "Promise shall only be resolved 
1when the JavaScript ends");
+assertEquals(-1, initialValue, "Promise.then shall only be called 
when the code ends");
 return objWithX;
 }).then((objWithX) -> {
 int result = Bodies.readIntX(objWithX);


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-html4j] branch master updated (d9dd994e -> 013a1185)

2022-05-13 Thread jtulach
This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git


from d9dd994e Copy all the annotation attributes when patching the class 
file
 new a39be9d0 Java callback can be executed immediatelly, just then has to 
be delayed
 new 013a1185 Search JavaScriptTCK via ServiceProvider

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/net/java/html/js/tests/AsyncJavaTest.java |  6 +
 .../main/java/net/java/html/js/tests/JsUtils.java  | 27 ++
 2 files changed, 23 insertions(+), 10 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] branch master updated: Better YAML editing with auto closing quotes and mustache

2022-05-13 Thread lkishalmi
This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
 new 6543326b16 Better YAML editing with auto closing quotes and mustache
6543326b16 is described below

commit 6543326b16fdcb05092fbb7af86fe817a07586b3
Author: Laszlo Kishalmi 
AuthorDate: Mon May 9 13:36:59 2022 -0700

Better YAML editing with auto closing quotes and mustache
---
 .../netbeans/modules/csl/api/test/CslTestBase.java | 21 ++---
 .../languages/yaml/YamlKeystrokeHandler.java   | 90 +++---
 .../languages/yaml/YamlKeystrokeHandlerTest.java   | 65 
 3 files changed, 156 insertions(+), 20 deletions(-)

diff --git 
a/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java 
b/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
index 4322769943..2b4721ee61 100644
--- 
a/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
+++ 
b/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
@@ -1249,21 +1249,21 @@ public abstract class CslTestBase extends NbTestCase {
 Formatter formatter = getFormatter(null);
 
 int sourcePos = source.indexOf('^');
-assertNotNull(sourcePos);
+assertTrue("Source text must have a caret ^ marker", sourcePos != -1);
 source = source.substring(0, sourcePos) + 
source.substring(sourcePos+1);
 
 int reformattedPos = reformatted.indexOf('^');
-assertNotNull(reformattedPos);
+assertTrue("Reformatted text must have a caret ^ marker", 
reformattedPos != -1);
 reformatted = reformatted.substring(0, reformattedPos) + 
reformatted.substring(reformattedPos+1);
 
 JEditorPane ta = getPane(source);
 Caret caret = ta.getCaret();
 caret.setDot(sourcePos);
 if (selection != null) {
-int start = original.indexOf(selection);
+int start = source.indexOf(selection);
 assertTrue(start != -1);
 assertTrue("Ambiguous selection - multiple occurrences of 
selection string",
-original.indexOf(selection, start+1) == -1);
+source.indexOf(selection, start+1) == -1);
 ta.setSelectionStart(start);
 ta.setSelectionEnd(start+selection.length());
 assertEquals(selection, ta.getSelectedText());
@@ -1299,11 +1299,11 @@ public abstract class CslTestBase extends NbTestCase {
 Formatter formatter = getFormatter(null);
 
 int sourcePos = source.indexOf('^');
-assertNotNull(sourcePos);
+assertTrue("Source text must have a caret ^ marker", sourcePos != -1);
 source = source.substring(0, sourcePos) + 
source.substring(sourcePos+1);
 
 int reformattedPos = reformatted.indexOf('^');
-assertNotNull(reformattedPos);
+assertTrue("Reformatted text must have a caret ^ marker", 
reformattedPos != -1);
 reformatted = reformatted.substring(0, reformattedPos) + 
reformatted.substring(reformattedPos+1);
 
 JEditorPane ta = getPane(source);
@@ -1332,11 +1332,12 @@ public abstract class CslTestBase extends NbTestCase {
 Formatter formatter = getFormatter(null);
 
 int sourcePos = source.indexOf('^');
-assertNotNull(sourcePos);
+assertTrue("Source text must have a caret ^ marker", sourcePos != -1);
+
 source = source.substring(0, sourcePos) + 
source.substring(sourcePos+1);
 
 int reformattedPos = reformatted.indexOf('^');
-assertNotNull(reformattedPos);
+assertTrue("Reformatted text must have a caret ^ marker", 
reformattedPos != -1);
 reformatted = reformatted.substring(0, reformattedPos) + 
reformatted.substring(reformattedPos+1);
 
 JEditorPane ta = getPane(source);
@@ -2529,12 +2530,12 @@ public abstract class CslTestBase extends NbTestCase {
 
 public void insertNewline(String source, String reformatted, IndentPrefs 
preferences) throws Exception {
 int sourcePos = source.indexOf('^');
-assertNotNull(sourcePos);
+assertTrue("Source text must have a caret ^ marker", sourcePos != -1);
 source = source.substring(0, sourcePos) + 
source.substring(sourcePos+1);
 Formatter formatter = getFormatter(null);
 
 int reformattedPos = reformatted.indexOf('^');
-assertNotNull(reformattedPos);
+assertTrue("Reformatted text must have a caret ^ marker", 
reformattedPos != -1);
 reformatted = reformatted.substring(0, reformattedPos) + 
reformatted.substring(reformattedPos+1);
 
 JEditorPane ta = getPane(source);
diff --git 
a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java
 
b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java
index 

[netbeans-jenkins-lib] 01/01: job dsl to have a common way to generate base jobs

2022-05-13 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch ebarboni-patch-1
in repository https://gitbox.apache.org/repos/asf/netbeans-jenkins-lib.git

commit f43a4b64a67fa255b9eed218da5081c2b113095b
Author: Eric Barboni 
AuthorDate: Fri May 13 15:00:32 2022 +0200

job dsl to have a common way to generate base jobs

rewrite netbeans-linux,netbeans-windows,netbeans-license using job dsl
split netbeans-license to have rat and lib verif only and let's have a new 
build for signature
---
 jobs/netbeansbase.groovy | 147 +++
 1 file changed, 147 insertions(+)

diff --git a/jobs/netbeansbase.groovy b/jobs/netbeansbase.groovy
new file mode 100644
index 000..f039eeb
--- /dev/null
+++ b/jobs/netbeansbase.groovy
@@ -0,0 +1,147 @@
+#!groovy
+/*
+ * 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
+ *
+ * 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.
+ */
+// ant version
+def antversion='ant_1.10_latest'
+
+// Common job with all default
+// jdk
+// log rotation
+// wrappers
+// git clone from apache netbeans branch master
+def netbeansBaseJob(Map m, Closure c = {}) {
+freeStyleJob("NetBeans/netbeans-${m.name}") {
+logRotator {
+numToKeep(2)
+daysToKeep(7)
+}
+jdk('jdk_11_latest')
+triggers {
+scm('H/5 * * * *')
+}
+wrappers {
+xvfb('Xvfb') { }
+preBuildCleanup()
+}
+scm {
+git {
+remote {
+url('https://github.com/apache/netbeans.git')
+}
+branch('*/master')
+extensions {
+cleanBeforeCheckout()
+cleanCheckout {
+deleteUntrackedNestedRepositories(true)
+} 
+}
+}
+}
+c.delegate = delegate 
+c()
+}
+}
+
+netbeansBaseJob(name:'linux') {
+description("""Builds Apache NetBeans from https://github.com/apache/netbeans;>its Github repository
+and runs platform tests that aren't marked with @RandomlyFails 
annotation:
+
+
+\$ ant test-platform
+
+
+There is also a windows version of this job.
+There is also a JDK11 version of this 
job.
+The licenses are checked by the license job.""")
+
+label('ubuntu')
+steps {
+ant {
+targets(['build','test-platform', 'build-nbms', 
'generate-uc-catalog', 'build-source-zips'])
+props('do.build.windows.launchers': 'true')
+antInstallation(antversion)
+}
+}
+publishers {
+archiveArtifacts('nbbuild/**/*.zip,nbbuild/nbms/**')
+archiveJunit('**/test/*/results/TEST*.xml')
+} 
+}
+
+netbeansBaseJob(name:'windows') {
+description("""Builds Apache NetBeans from https://github.com/apache/netbeans;>its Github repository
+and runs platform tests (ant test-platform) that aren't marked with
+@RandomlyFails annotation.
+There is also a Linux version of this 
build.""")
+label('Window')
+steps {
+ant {
+targets(['build','test-platform'])
+props('test-unit-sys-prop.ignore.random.failures': 
'true','continue.after.failing.tests':'true')
+antInstallation(antversion+'_windows')
+}
+}
+publishers {
+archiveJunit('**/test/*/results/TEST*.xml')
+}  
+}
+
+netbeansBaseJob(name:'license') {
+description("""Checks licenses of Apache NetBeans from https://github.com/apache/netbeans;>its Github repository:
+
+
+\$ ant rat verify-libs-and-licenses
+
+
+The real code check is done by a linux 
job.""") 
+ 
+label('ubuntu')
+steps {
+ant {
+targets(['rat','verify-libs-and-licenses'])
+antInstallation(antversion)
+}
+}
+publishers {
+archiveArtifacts('nbbuild/build/rat-report.txt')
+
archiveJunit('nbbuild/build/rat/*.xml,nbbuild/build/verifylibsandlicenses.xml')
+} 
+}
+
+netbeansBaseJob(name:'apisigcheck') {
+description("""Checks sig of Apache NetBeans from https://github.com/apache/netbeans;>its Github repository:
+
+
+\$ ant build gen-sigtests-release
+
+
+The real code check is done by 

[netbeans-jenkins-lib] branch ebarboni-patch-1 created (now f43a4b6)

2022-05-13 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a change to branch ebarboni-patch-1
in repository https://gitbox.apache.org/repos/asf/netbeans-jenkins-lib.git


  at f43a4b6  job dsl to have a common way to generate base jobs

This branch includes the following new commits:

 new f43a4b6  job dsl to have a common way to generate base jobs

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-mavenutils-nbm-maven-plugin] branch master updated (6bc1ce7 -> f05cdb7)

2022-05-13 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git


from 6bc1ce7  Merge pull request #36 from 
apache/dependabot/maven/master/org.apache.maven.plugins-maven-compiler-plugin-3.10.1
 add bd60f2b  Bump plexus-io from 3.0.0 to 3.3.1
 new f05cdb7  Merge pull request #32 from 
apache/dependabot/maven/master/org.codehaus.plexus-plexus-io-3.3.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-mavenutils-nbm-maven-plugin] 01/01: Merge pull request #32 from apache/dependabot/maven/master/org.codehaus.plexus-plexus-io-3.3.1

2022-05-13 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git

commit f05cdb7c9d0f8ba5e3879f9a59bfe5a984d8caf6
Merge: 6bc1ce7 bd60f2b
Author: Eric Barboni 
AuthorDate: Fri May 13 11:27:47 2022 +0200

Merge pull request #32 from 
apache/dependabot/maven/master/org.codehaus.plexus-plexus-io-3.3.1

Bump plexus-io from 3.0.0 to 3.3.1

 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-mavenutils-nbm-maven-plugin] branch master updated (889bebf -> 6bc1ce7)

2022-05-13 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git


from 889bebf  checkstyle fix
 add 9b0f801  Bump maven-compiler-plugin from 3.9.0 to 3.10.1
 new 6bc1ce7  Merge pull request #36 from 
apache/dependabot/maven/master/org.apache.maven.plugins-maven-compiler-plugin-3.10.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans-mavenutils-nbm-maven-plugin] 01/01: Merge pull request #36 from apache/dependabot/maven/master/org.apache.maven.plugins-maven-compiler-plugin-3.10.1

2022-05-13 Thread skygo
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git

commit 6bc1ce78a7797ca1d2355aafed9009b180909656
Merge: 889bebf 9b0f801
Author: Eric Barboni 
AuthorDate: Fri May 13 10:47:35 2022 +0200

Merge pull request #36 from 
apache/dependabot/maven/master/org.apache.maven.plugins-maven-compiler-plugin-3.10.1

Bump maven-compiler-plugin from 3.9.0 to 3.10.1

 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists