mbien commented on code in PR #6617:
URL: https://github.com/apache/netbeans/pull/6617#discussion_r1372277253
##########
platform/favorites/src/org/netbeans/modules/favorites/Actions.java:
##########
@@ -414,23 +414,24 @@ private static DataShadow findShadow (DataFolder f,
DataObject dobj) {
return null;
}
+ // what order is this? requires comment
public static void reorderAfterAddition(final DataFolder favourities,
final DataObject[] children, final List<? extends DataObject> listAdd) {
List<DataObject> listDest = new ArrayList<>();
if (listAdd.size() > 0) {
//Insert new nodes just before last (root) node
DataObject root = null;
//Find root
- for (DataObject children1 : children) {
- FileObject fo = children1.getPrimaryFile();
- if ("Favorites/Root.instance".equals(fo.getPath())) {
- //NOI18N
- root = children1;
+ for (DataObject child : children) {
+ FileObject fo = child.getPrimaryFile();
+ if ("Favorites/Root.instance".equals(fo.getPath())) {
//NOI18N
+ root = child;
+ break;
}
}
Review Comment:
exits the loop now when root is found as the comment says.
##########
platform/openide.util.lookup/test/unit/src/org/openide/util/test/AnnotationProcessorTestUtils.java:
##########
@@ -149,25 +142,4 @@ private static void scan(List<String> names, File f,
String includes) {
}
}
- /**
- * Checks whether the version of javac in use suffers from #6929404.
- * If so, calls to {@code LayerBuilder.validateResource(..., true)} will
return normally
- * even if the resource path does not exist, so tests must be more lenient.
- */
- public static boolean searchClasspathBroken() {
- // Cannot just check for e.g. SourceVersion.RELEASE_7 because we might
be running JDK 6 javac w/ JDK 7 boot CP, and that is in JRE.
- // (Anyway libs.javacapi/external/nb-javac-api.jar, in the test's
normal boot CP, has this!)
- // Filter.class added in 7ae4016c5938, not long after f3323b1c65ee
which we rely on for this to work.
- // Also cannot just check Class.forName(...) since tools.jar not in CP
but ToolProvider loads it specially - not true anymore since JDK 9 ToolProvider
does not look for tools.jar.
- final String res = "com/sun/tools/javac/util/Filter.class"; //NOI18N
- final CodeSource codeSource =
ToolProvider.getSystemJavaCompiler().getClass().getProtectionDomain().getCodeSource();
- if (codeSource != null) {
- //Compiler from URLClassLoader - JDK7, JDK8 javac
- return new URLClassLoader(new URL[]
{codeSource.getLocation()}).findResource(res) == null;
- } else {
- //Compiler from Boot, Ext, System ClassLoader - JDK9 javac
- return ClassLoader.getSystemClassLoader().getResource(res) == null;
- }
- }
-
Review Comment:
- https://bz.apache.org/netbeans/show_bug.cgi?id=196452
- https://bugs.openjdk.org/browse/JDK-6929404
if I understand this correctly, this shouldn't be relevant anymore and can
be simply removed
##########
.github/workflows/main.yml:
##########
@@ -903,6 +893,24 @@ jobs:
# - name: java/ant.grammar
# run: ant $OPTS -f java/ant.grammar test
+ - name: Set up JDK 17 for JDK 21 incompatible tests
+ if: ${{ matrix.java == '21' }}
+ uses: actions/setup-java@v3
+ with:
+ java-version: 17
+ distribution: ${{ env.default_java_distribution }}
+
+ # TODO fix JDK 21 incompatibilites
+ - name: java/java.mx.project
+ continue-on-error: ${{ github.event_name != 'pull_request' }}
+ run: .github/retry.sh ant $OPTS -f java/java.mx.project test
+
+ - name: java/gradle.java
+ run: .github/retry.sh ant $OPTS -f java/gradle.java test
+
+ - name: extide/gradle
+ run: ant $OPTS -f extide/gradle test
+
- name: extide/o.apache.tools.ant.module
run: ant $OPTS -f extide/o.apache.tools.ant.module test
Review Comment:
gradle should fix itself automatically once it is actually compatible with
JDK 21
`java.mx.project` and `o.apache.tools.ant.module` failed on JDK 21
##########
.github/workflows/main.yml:
##########
@@ -945,123 +953,136 @@ jobs:
run: tar --zstd -xf build.tar.zst
- name: platform/api.htmlui
- run: .github/retry.sh ant $OPTS -Dvanilla.javac.exists=true -f
platform/api.htmlui test
+ run: .github/retry.sh ant $OPTS -f platform/api.htmlui test
- name: platform/htmlui
- run: .github/retry.sh ant $OPTS -Dvanilla.javac.exists=true -f
platform/htmlui test
+ run: .github/retry.sh ant $OPTS -f platform/htmlui test
- name: platform/api.intent
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.intent test
+ run: ant $OPTS -f platform/api.intent test
- name: platform/api.io
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.io test
+ run: ant $OPTS -f platform/api.io test
- name: platform/api.progress
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.progress
test
+ run: ant $OPTS -f platform/api.progress test
- name: platform/api.progress.nb
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.progress.nb
test
+ run: ant $OPTS -f platform/api.progress.nb test
- name: platform/api.scripting
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.scripting
test
+ run: ant $OPTS -f platform/api.scripting test
- name: platform/api.search
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.search test
+ run: ant $OPTS -f platform/api.search test
- name: platform/api.templates
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.templates
test
+ run: ant $OPTS -f platform/api.templates test
- name: platform/api.visual
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/api.visual test
+ run: ant $OPTS -f platform/api.visual test
- name: platform/applemenu
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/applemenu test
+ run: ant $OPTS -f platform/applemenu test
- name: platform/autoupdate.cli
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/autoupdate.cli
test
+ run: ant $OPTS -f platform/autoupdate.cli test
- name: platform/autoupdate.services
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/autoupdate.services test
+ run: ant $OPTS -f platform/autoupdate.services test
- name: platform/autoupdate.ui
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/autoupdate.ui
test
+ run: ant $OPTS -f platform/autoupdate.ui test
- name: platform/core.execution
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.execution
test
+ run: ant $OPTS -f platform/core.execution test
- name: platform/core.io.ui
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.io.ui test
+ run: ant $OPTS -f platform/core.io.ui test
- name: platform/core.kit
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.kit test
+ run: ant $OPTS -f platform/core.kit test
- name: platform/core.multiview
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.multiview
test
+ run: ant $OPTS -f platform/core.multiview test
- name: platform/core.netigso
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.netigso
test
+ run: ant $OPTS -f platform/core.netigso test
- name: platform/core.osgi
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.osgi test
+ run: ant $OPTS -f platform/core.osgi test
- name: platform/core.output2
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.output2
test
+ run: ant $OPTS -f platform/core.output2 test
- name: platform/core.startup
- run: .github/retry.sh ant $OPTS -Dvanilla.javac.exists=true -f
platform/core.startup test
+ run: .github/retry.sh ant $OPTS -f platform/core.startup test
- name: platform/core.startup.base
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/core.startup.base test
+ run: ant $OPTS -f platform/core.startup.base test
- name: platform/core.ui
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/core.ui test
+ run: ant $OPTS -f platform/core.ui test
- name: platform/core.windows
- run: .github/retry.sh ant $OPTS -Dvanilla.javac.exists=true -f
platform/core.windows test
+ run: .github/retry.sh ant $OPTS -f platform/core.windows test
- name: platform/editor.mimelookup
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/editor.mimelookup test
+ run: ant $OPTS -f platform/editor.mimelookup test
- name: platform/editor.mimelookup.impl
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/editor.mimelookup.impl test
+ run: ant $OPTS -f platform/editor.mimelookup.impl test
- name: platform/favorites
- run: .github/retry.sh ant $OPTS -Dvanilla.javac.exists=true -f
platform/favorites test
+ run: .github/retry.sh ant $OPTS -f platform/favorites test
- name: platform/javahelp
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/javahelp
test-unit
+ run: ant $OPTS -f platform/javahelp test-unit
- name: platform/keyring.fallback
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/keyring.fallback test
+ run: ant $OPTS -f platform/keyring.fallback test
- name: platform/keyring.impl
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/keyring.impl
test
-
- - name: platform/lib.uihandler
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/lib.uihandler
test
+ run: ant $OPTS -f platform/keyring.impl test
- name: platform/libs.javafx
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/libs.javafx test
+ run: ant $OPTS -f platform/libs.javafx test
- name: platform/libs.junit4
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/libs.junit4 test
+ run: ant $OPTS -f platform/libs.junit4 test
- name: platform/masterfs
- run: .github/retry.sh ant $OPTS -Dvanilla.javac.exists=true -f
platform/masterfs test
+ run: .github/retry.sh ant $OPTS -f platform/masterfs test
- name: platform/masterfs.linux
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/masterfs.linux
test
+ run: ant $OPTS -f platform/masterfs.linux test
- name: platform/o.n.core
- run: ant $OPTS -Dvanilla.javac.exists=true -f platform/o.n.core
test-unit
+ run: ant $OPTS -f platform/o.n.core test-unit
- name: platform/o.n.swing.outline
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/o.n.swing.outline test
+ run: ant $OPTS -f platform/o.n.swing.outline test
- name: platform/o.n.swing.tabcontrol
- run: ant $OPTS -Dvanilla.javac.exists=true -f
platform/o.n.swing.tabcontrol test
+ run: ant $OPTS -f platform/o.n.swing.tabcontrol test
+
+ - name: Set up JDK 8 for incompatibe tests
+ uses: actions/setup-java@v3
+ with:
+ java-version: 8
+ distribution: ${{ env.default_java_distribution }}
- # required by netbinox tests
+ # TODO fix JDK 11 incompatibilities
+ - name: platform/lib.uihandler
+ run: ant $OPTS -f platform/lib.uihandler test
+
+ - name: platform/openide.text
+ run: .github/retry.sh ant $OPTS -f platform/openide.text test
+
+ - name: platform/openide.util.ui
+ run: ant $OPTS -f platform/openide.util.ui test
Review Comment:
`openide.util.ui` has some failures due to JDK xml lib updates. One is a
whitespace problem since whitespace parsing changed and is parsed into nodes,
the other is a formatting problem. The formatting test is probably not easily
fixable and might not be worth it to fix. I have a patch for the other failure
locally.
Forgot specifics about the other two modules.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists