Skip to content

Commit

Permalink
Merge pull request #7352 from apache/delivery
Browse files Browse the repository at this point in the history
Sync delivery to release220 for 22-rc3
  • Loading branch information
ebarboni authored May 7, 2024
2 parents 148b168 + 09cb41c commit 9f0aa24
Show file tree
Hide file tree
Showing 35 changed files with 393 additions and 865 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:

- name: platform/masterfs.macosx
if: contains(matrix.os, 'macos') && success()
run: ant $OPTS -f platform/masterfs.macosx test
run: .github/retry.sh ant $OPTS -f platform/masterfs.macosx test

- name: Commit Validation tests
run: .github/retry.sh ant $OPTS -Dcluster.config=$CLUSTER_CONFIG commit-validation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public static void makePlatform(File d, String harnessSpecVersion) throws IOExce

@Deprecated
public static void delete(File f) throws IOException {
TestUtil.delete(f);
TestFileUtils.deleteFile(f);
}

private static File getTestNBRoot() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ public static void createJar(File jar, Map<String,String> contents, Manifest man
}
}

public static void delete(File f) throws IOException {
if (f.isDirectory()) {
File[] kids = f.listFiles();
for (int i = 0; i < kids.length; i++) {
delete(kids[i]);
}
}
if (!f.delete()) {
throw new IOException("Could not delete " + f);
}
}

/** @deprecated Use {@link TestFileUtils#writeFile} instead. */
@Deprecated
public static void dump(FileObject f, String contents) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.openide.filesystems.Repository;
import org.openide.filesystems.URLMapper;
import org.openide.util.Lookup;
import org.openide.util.test.TestFileUtils;

/**
* Help set up org.netbeans.api.project.*Test.
Expand Down Expand Up @@ -96,18 +97,7 @@ public static FileObject makeScratchDir(NbTestCase test) throws IOException {
* Delete a file and all subfiles.
*/
public static void deleteRec(File f) throws IOException {
if (f.isDirectory()) {
File[] kids = f.listFiles();
if (kids == null) {
throw new IOException("List " + f);
}
for (int i = 0; i < kids.length; i++) {
deleteRec(kids[i]);
}
}
if (!f.delete()) {
throw new IOException("Delete " + f);
}
TestFileUtils.deleteFile(f);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.openide.filesystems.URLMapper;
import org.openide.util.Lookup;
import org.openide.util.test.MockLookup;
import org.openide.util.test.TestFileUtils;

/**
* Help set up org.netbeans.api.project.*Test.
Expand Down Expand Up @@ -168,18 +169,7 @@ public static FileObject makeScratchDir(NbTestCase test) throws IOException {
* Delete a file and all subfiles.
*/
public static void deleteRec(File f) throws IOException {
if (f.isDirectory()) {
File[] kids = f.listFiles();
if (kids == null) {
throw new IOException("List " + f);
}
for (int i = 0; i < kids.length; i++) {
deleteRec(kids[i]);
}
}
if (!f.delete()) {
throw new IOException("Delete " + f);
}
TestFileUtils.deleteFile(f);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.nio.file.Files;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.WeakHashMap;
Expand All @@ -43,6 +44,7 @@
import org.openide.filesystems.URLMapper;
import org.openide.util.Lookup;
import org.openide.util.lookup.ProxyLookup;
import org.openide.util.test.TestFileUtils;

/**
* Help set up org.netbeans.api.project.*Test.
Expand Down Expand Up @@ -92,18 +94,7 @@ public static FileObject makeScratchDir(NbTestCase test) throws IOException {
* Delete a file and all subfiles.
*/
public static void deleteRec(File f) throws IOException {
if (f.isDirectory()) {
File[] kids = f.listFiles();
if (kids == null) {
throw new IOException("List " + f);
}
for (int i = 0; i < kids.length; i++) {
deleteRec(kids[i]);
}
}
if (!f.delete()) {
throw new IOException("Delete " + f);
}
TestFileUtils.deleteFile(f);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.netbeans.modules.web.core;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -32,18 +31,10 @@
import org.netbeans.api.java.source.JavaSource;
import org.netbeans.modules.j2ee.metadata.model.support.JavaSourceTestCase;
import org.netbeans.modules.j2ee.metadata.model.support.TestUtilities;
import org.netbeans.modules.j2ee.core.api.support.java.SourceUtils;
import static org.netbeans.api.java.source.JavaSource.Phase;
import org.netbeans.modules.parsing.api.indexing.IndexingManager;



import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;

import org.netbeans.junit.NbTestCase;

import org.netbeans.modules.web.core.test.TestUtil;

/**
*
Expand All @@ -52,7 +43,6 @@
*/
public class WebInjectionTargetQueryImplementationTest extends JavaSourceTestCase {

private String serverID;
private FileObject ordinaryClass;
private FileObject fileSubclass;
private FileObject directServletSubclass;
Expand Down Expand Up @@ -144,8 +134,8 @@ protected void setUp() throws Exception {

}

@Override
protected void tearDown() {
serverID = null;
ordinaryClass = null;
fileSubclass = null;
directServletSubclass = null;
Expand Down
Loading

0 comments on commit 9f0aa24

Please sign in to comment.