diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml
index 1735c692..f0129ab4 100644
--- a/.github/workflows/codacy.yml
+++ b/.github/workflows/codacy.yml
@@ -39,7 +39,7 @@ jobs:
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
- uses: codacy/codacy-analysis-cli-action@5cc54a75f9ad88159bb54046196d920e40e367a5
+ uses: codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index 7f894976..2406b012 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -26,7 +26,7 @@ jobs:
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Cache Maven packages
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 830c03bf..afbe7642 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -30,7 +30,7 @@ jobs:
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Cache Maven packages
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/pmd.yml b/.github/workflows/pmd.yml
index 85f40e58..f0b0b63c 100644
--- a/.github/workflows/pmd.yml
+++ b/.github/workflows/pmd.yml
@@ -31,7 +31,7 @@ jobs:
distribution: 'temurin'
- name: Run PMD
id: pmdcommon
- uses: pmd/pmd-github-action@v1
+ uses: pmd/pmd-github-action@v2
with:
rulesets: 'rulesets/java/quickstart.xml'
diff --git a/pom.xml b/pom.xml
index 5c7fba92..08e00a58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,7 +15,7 @@
0.8.11
17
JavaSE-17
- 4.7.3.6
+ 4.8.2.0
UTF-8
diff --git a/sandbox_common/src/org/sandbox/jdt/internal/common/ASTProcessor.java b/sandbox_common/src/org/sandbox/jdt/internal/common/ASTProcessor.java
index f08476a4..2fc9d71d 100644
--- a/sandbox_common/src/org/sandbox/jdt/internal/common/ASTProcessor.java
+++ b/sandbox_common/src/org/sandbox/jdt/internal/common/ASTProcessor.java
@@ -442,7 +442,7 @@ public ASTProcessor callClassInstanceCreationVisitor(BiPredicate callClassInstanceCreationVisitor(Class typeof,BiPredicate bs) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(HelperVisitor.TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(HelperVisitor.TYPEOF, typeof)
);
nodetypelist.put(VisitorEnum.ClassInstanceCreation, new NodeHolder(bs, null, map));
return this;
@@ -1177,7 +1177,7 @@ public ASTProcessor callMethodInvocationVisitor(BiPredicate
*/
public ASTProcessor callMethodInvocationVisitor(String methodname, BiPredicate bs) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(HelperVisitor.METHODNAME, methodname)
+ new AbstractMap.SimpleEntry<>(HelperVisitor.METHODNAME, methodname)
);
nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, null, map));
return this;
@@ -1190,7 +1190,7 @@ public ASTProcessor callMethodInvocationVisitor(String methodname, BiPr
*/
public ASTProcessor callMethodInvocationVisitor(Class typeof, BiPredicate bs) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(HelperVisitor.TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(HelperVisitor.TYPEOF, typeof)
);
nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, null, map));
return this;
@@ -1215,8 +1215,8 @@ public ASTProcessor callMethodInvocationVisitor(Class typeof,String met
*/
public ASTProcessor callMethodInvocationVisitor(Class typeof,String methodname, BiPredicate bs, Function navigate) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(HelperVisitor.METHODNAME, methodname),
- new AbstractMap.SimpleEntry(HelperVisitor.TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(HelperVisitor.METHODNAME, methodname),
+ new AbstractMap.SimpleEntry<>(HelperVisitor.TYPEOF, typeof)
);
nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, navigate, map));
return this;
@@ -1231,7 +1231,7 @@ public ASTProcessor callMethodInvocationVisitor(Class typeof,String met
public ASTProcessor callMethodInvocationVisitor(String methodname, BiPredicate bs,
Function navigate) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(HelperVisitor.METHODNAME, methodname)
+ new AbstractMap.SimpleEntry<>(HelperVisitor.METHODNAME, methodname)
);
nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, navigate, map));
return this;
diff --git a/sandbox_common/src/org/sandbox/jdt/internal/common/HelperVisitor.java b/sandbox_common/src/org/sandbox/jdt/internal/common/HelperVisitor.java
index 0a743417..f51cc766 100644
--- a/sandbox_common/src/org/sandbox/jdt/internal/common/HelperVisitor.java
+++ b/sandbox_common/src/org/sandbox/jdt/internal/common/HelperVisitor.java
@@ -681,7 +681,7 @@ public BiPredicate extends ASTNode, E> addMethodInvocation(BiPredicate addMethodInvocation(String methodname,
BiPredicate bs) {
predicatedata.put(VisitorEnum.MethodInvocation, Map.ofEntries(
- new AbstractMap.SimpleEntry(METHODNAME, methodname)
+ new AbstractMap.SimpleEntry<>(METHODNAME, methodname)
));
return predicatemap.put(VisitorEnum.MethodInvocation, bs);
}
@@ -695,8 +695,8 @@ public BiPredicate extends ASTNode, E> addMethodInvocation(String methodname,
public BiPredicate extends ASTNode, E> addMethodInvocation(Class typeof, String methodname,
BiPredicate bs) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(METHODNAME, methodname),
- new AbstractMap.SimpleEntry(TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(METHODNAME, methodname),
+ new AbstractMap.SimpleEntry<>(TYPEOF, typeof)
);
predicatedata.put(VisitorEnum.MethodInvocation, map);
return predicatemap.put(VisitorEnum.MethodInvocation, bs);
@@ -1166,7 +1166,7 @@ public BiPredicate extends ASTNode, E> addVariableDeclarationStatement(
public BiPredicate extends ASTNode, E> addVariableDeclarationStatement(Class> typeof,
BiPredicate bs) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(TYPEOF, typeof)
);
predicatedata.put(VisitorEnum.VariableDeclarationStatement, map);
return predicatemap.put(VisitorEnum.VariableDeclarationStatement, bs);
@@ -1677,7 +1677,7 @@ public BiConsumer extends ASTNode, E> addMethodInvocation(BiConsumer addMethodInvocation(String methodname, BiConsumer bc) {
this.consumerdata.put(VisitorEnum.MethodInvocation, Map.ofEntries(
- new AbstractMap.SimpleEntry(METHODNAME, methodname)
+ new AbstractMap.SimpleEntry<>(METHODNAME, methodname)
));
return consumermap.put(VisitorEnum.MethodInvocation, bc);
}
@@ -2146,7 +2146,7 @@ public BiConsumer extends ASTNode, E> addVariableDeclarationStatement(
public BiConsumer extends ASTNode, E> addVariableDeclarationStatement(Class> typeof,
BiConsumer bc) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(TYPEOF, typeof)
);
consumerdata.put(VisitorEnum.VariableDeclarationStatement, map);
return consumermap.put(VisitorEnum.VariableDeclarationStatement, bc);
@@ -2710,11 +2710,11 @@ public void addMethodDeclaration(BiPredicate bs, BiConsume
public void addMethodInvocation(String methodname, BiPredicate bs,
BiConsumer bc) {
predicatedata.put(VisitorEnum.MethodInvocation, Map.ofEntries(
- new AbstractMap.SimpleEntry(METHODNAME, methodname)
+ new AbstractMap.SimpleEntry<>(METHODNAME, methodname)
));
predicatemap.put(VisitorEnum.MethodInvocation, bs);
consumerdata.put(VisitorEnum.MethodInvocation, Map.ofEntries(
- new AbstractMap.SimpleEntry(METHODNAME, methodname)
+ new AbstractMap.SimpleEntry<>(METHODNAME, methodname)
));
consumermap.put(VisitorEnum.MethodInvocation, bc);
}
@@ -2729,8 +2729,8 @@ public void addMethodInvocation(String methodname, BiPredicate bs,
BiConsumer bc) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(METHODNAME, methodname),
- new AbstractMap.SimpleEntry(TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(METHODNAME, methodname),
+ new AbstractMap.SimpleEntry<>(TYPEOF, typeof)
);
predicatedata.put(VisitorEnum.MethodInvocation, map);
predicatemap.put(VisitorEnum.MethodInvocation, bs);
@@ -3270,7 +3270,7 @@ public void addVariableDeclarationStatement(BiPredicate typeof, BiPredicate bs,
BiConsumer bc) {
Map map = Map.ofEntries(
- new AbstractMap.SimpleEntry(TYPEOF, typeof)
+ new AbstractMap.SimpleEntry<>(TYPEOF, typeof)
);
predicatedata.put(VisitorEnum.VariableDeclarationStatement, map);
consumerdata.put(VisitorEnum.VariableDeclarationStatement, map);
diff --git a/sandbox_encoding_quickfix_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java b/sandbox_encoding_quickfix_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java
index 305e0786..54ebe8d0 100644
--- a/sandbox_encoding_quickfix_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java
+++ b/sandbox_encoding_quickfix_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java
@@ -375,7 +375,7 @@ enum ExplicitEncodingPatterns {
@ParameterizedTest
@EnumSource(ExplicitEncodingPatterns.class)
public void testExplicitEncodingParametrized(ExplicitEncodingPatterns test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("E1.java", test.given, false, null);
context.enable(MYCleanUpConstants.EXPLICITENCODING_CLEANUP);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -383,7 +383,7 @@ public void testExplicitEncodingParametrized(ExplicitEncodingPatterns test) thro
@Test
public void testExplicitEncoding_donttouch() throws CoreException{
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("E2.java",
"" //
+ "package test1;\n" //
diff --git a/sandbox_functional_converter_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java b/sandbox_functional_converter_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
index 17dcf4e3..cc327114 100644
--- a/sandbox_functional_converter_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
+++ b/sandbox_functional_converter_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
@@ -1150,7 +1150,7 @@ enum UseFunctionalLoop {
@ParameterizedTest
@EnumSource(UseFunctionalLoop.class)
public void testExplicitEncodingParametrized(UseFunctionalLoop test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("TestDemo.java", test.given, false, null);
context.enable(MYCleanUpConstants.USEFUNCTIONALLOOP_CLEANUP);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -1610,7 +1610,7 @@ public void testExplicitEncodingParametrized(UseFunctionalLoop test) throws Core
})
public void testExplicitEncoding_donttouch(String dontchange) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("testdemo", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("testdemo", false, null);
ICompilationUnit cu= pack.createCompilationUnit("TestDemo.java",
dontchange,
false, null);
diff --git a/sandbox_jface_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java b/sandbox_jface_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
index e45a34b5..79c1d12a 100644
--- a/sandbox_jface_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
+++ b/sandbox_jface_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
@@ -107,7 +107,7 @@ enum JFaceCleanupCases{
@ParameterizedTest
@EnumSource(JFaceCleanupCases.class)
public void testJFaceCleanupParametrized(JFaceCleanupCases test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test", false, null);
ICompilationUnit cu= pack.createCompilationUnit("Test.java", test.given, false, null);
context.enable(MYCleanUpConstants.JFACE_CLEANUP);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -144,7 +144,7 @@ enum NO_JFaceCleanupCases {
@ParameterizedTest
@EnumSource(NO_JFaceCleanupCases.class)
public void testJFaceCleanup_donttouch(NO_JFaceCleanupCases test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test", false, null);
ICompilationUnit cu= pack.createCompilationUnit("Test.java",test.given,false, null);
context.enable(MYCleanUpConstants.JFACE_CLEANUP);
context.assertRefactoringHasNoChange(new ICompilationUnit[] { cu });
diff --git a/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java b/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
index 9ba87b02..ca5a0a43 100644
--- a/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
+++ b/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
@@ -125,7 +125,7 @@ enum PlatformStatusPatterns {
@ParameterizedTest
@EnumSource(PlatformStatusPatterns.class)
public void testPlatformStatusParametrized(PlatformStatusPatterns test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("E1.java", test.given, false, null);
context.enable(MYCleanUpConstants.SIMPLIFY_STATUS_CLEANUP);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -133,7 +133,7 @@ public void testPlatformStatusParametrized(PlatformStatusPatterns test) throws C
@Test
public void testPlatformStatus_donttouch() throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("E2.java",
"" //
+ "package test1;\n" //
diff --git a/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java b/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java
index c26f5db1..c2cb7075 100644
--- a/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java
+++ b/sandbox_platform_helper_test/src/org/sandbox/jdt/ui/tests/quickfix/Java9CleanUpTest.java
@@ -103,7 +103,7 @@ enum PlatformStatusPatterns {
@ParameterizedTest
@EnumSource(PlatformStatusPatterns.class)
public void testPlatformStatusParametrized(PlatformStatusPatterns test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("E1.java", test.given, false, null);
context.enable(MYCleanUpConstants.SIMPLIFY_STATUS_CLEANUP);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -146,7 +146,7 @@ enum PlatformStatusPatternsDontTouch {
@ParameterizedTest
@EnumSource(PlatformStatusPatternsDontTouch.class)
public void testPlatformStatus_donttouch(PlatformStatusPatternsDontTouch test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("E2.java", test.given, false, null);
context.enable(MYCleanUpConstants.SIMPLIFY_STATUS_CLEANUP);
context.assertRefactoringHasNoChange(new ICompilationUnit[] { cu });
diff --git a/sandbox_test_commons/src/org/sandbox/jdt/ui/tests/quickfix/rules/AbstractEclipseJava.java b/sandbox_test_commons/src/org/sandbox/jdt/ui/tests/quickfix/rules/AbstractEclipseJava.java
index 4915b93c..fdf34ef4 100644
--- a/sandbox_test_commons/src/org/sandbox/jdt/ui/tests/quickfix/rules/AbstractEclipseJava.java
+++ b/sandbox_test_commons/src/org/sandbox/jdt/ui/tests/quickfix/rules/AbstractEclipseJava.java
@@ -78,7 +78,7 @@ public class AbstractEclipseJava implements AfterEachCallback, BeforeEachCallbac
private final String testresources_stubs;
private final String compliance;
private static final String TEST_SETUP_PROJECT= "TestSetupProject"; //$NON-NLS-1$
- public IPackageFragmentRoot fSourceFolder;
+ private IPackageFragmentRoot fSourceFolder;
private CustomProfile fProfile;
public AbstractEclipseJava(String stubs, String compilerversion) {
@@ -93,8 +93,8 @@ public void beforeEach(ExtensionContext context) throws CoreException {
Map options= javaProject.getOptions(false);
JavaCore.setComplianceOptions(compliance, options);
javaProject.setOptions(options);
- fSourceFolder= AbstractEclipseJava.addSourceContainer(getProject(TEST_SETUP_PROJECT), "src", new Path[0], //$NON-NLS-1$
- new Path[0], null, new IClasspathAttribute[0]);
+ setfSourceFolder(AbstractEclipseJava.addSourceContainer(getProject(TEST_SETUP_PROJECT), "src", new Path[0], //$NON-NLS-1$
+ new Path[0], null, new IClasspathAttribute[0]));
Map settings= new HashMap<>();
fProfile= new ProfileManager.CustomProfile("testProfile", settings, CleanUpProfileVersioner.CURRENT_VERSION, //$NON-NLS-1$
CleanUpProfileVersioner.PROFILE_KIND);
@@ -106,7 +106,7 @@ public void beforeEach(ExtensionContext context) throws CoreException {
@Override
public void afterEach(ExtensionContext context) throws CoreException {
- delete(fSourceFolder);
+ delete(getfSourceFolder());
}
public IJavaProject getProject(String projectname) {
@@ -464,4 +464,12 @@ private void commitProfile() throws CoreException {
profileStore.writeProfiles(profiles, InstanceScope.INSTANCE);
CleanUpPreferenceUtil.saveSaveParticipantOptions(InstanceScope.INSTANCE, fProfile.getSettings());
}
+
+ public IPackageFragmentRoot getfSourceFolder() {
+ return fSourceFolder;
+ }
+
+ public void setfSourceFolder(IPackageFragmentRoot fSourceFolder) {
+ this.fSourceFolder = fSourceFolder;
+ }
}
diff --git a/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java b/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
index 4aed1231..1b526da0 100644
--- a/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
+++ b/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
@@ -306,7 +306,7 @@ enum While2EnhancedForLoop {
@ParameterizedTest
@EnumSource(While2EnhancedForLoop.class)
public void testWhile2enhancedForLoopParametrized(While2EnhancedForLoop test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test1", false, null);
ICompilationUnit cu= pack.createCompilationUnit("TestDemo.java", test.given, false, null);
context.enable(CleanUpConstants.CONTROL_STATEMENTS_CONVERT_FOR_LOOP_TO_ENHANCED);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -402,7 +402,7 @@ enum NO_While2EnhancedForLoop {
@ParameterizedTest
@EnumSource(NO_While2EnhancedForLoop.class)
public void testWhile2enhancedForLoop_donttouch(NO_While2EnhancedForLoop test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test", false, null);
ICompilationUnit cu= pack.createCompilationUnit("Test.java",test.given,false, null);
context.enable(CleanUpConstants.CONTROL_STATEMENTS_CONVERT_FOR_LOOP_TO_ENHANCED);
context.assertRefactoringHasNoChange(new ICompilationUnit[] { cu });
diff --git a/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/VisitorTest.java b/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/VisitorTest.java
index f0c1a37b..07947e9d 100644
--- a/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/VisitorTest.java
+++ b/sandbox_tools_test/src/org/sandbox/jdt/ui/tests/quickfix/VisitorTest.java
@@ -356,7 +356,7 @@ public void simpleTest3c() {
@Test
public void simpleTest3d() {
Set nodesprocessed = null;
- HelperVisitor,String,NodeFound> hv = new HelperVisitor<>(nodesprocessed, new ReferenceHolder());
+ HelperVisitor,String,NodeFound> hv = new HelperVisitor<>(nodesprocessed, new ReferenceHolder<>());
VisitorEnum.stream().forEach(ve -> {
hv.add(ve, (node, holder) -> {
String x = "Start "+node.getNodeType() + " :" + node; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/sandbox_xml_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java b/sandbox_xml_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
index 3ff0b6f2..b5ccd6e3 100644
--- a/sandbox_xml_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
+++ b/sandbox_xml_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
@@ -66,7 +66,7 @@ enum XMLCleanupCases{
@ParameterizedTest
@EnumSource(XMLCleanupCases.class)
public void testXMLCleanupParametrized(XMLCleanupCases test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test", false, null);
ICompilationUnit cu= pack.createCompilationUnit("Test.java", test.given, false, null);
context.enable(CleanUpConstants.CONTROL_STATEMENTS_CONVERT_FOR_LOOP_TO_ENHANCED);
context.assertRefactoringResultAsExpected(new ICompilationUnit[] {cu}, new String[] {test.expected}, null);
@@ -103,7 +103,7 @@ enum NO_XMLCleanupCases {
@ParameterizedTest
@EnumSource(NO_XMLCleanupCases.class)
public void testXMLCleanup_donttouch(NO_XMLCleanupCases test) throws CoreException {
- IPackageFragment pack= context.fSourceFolder.createPackageFragment("test", false, null);
+ IPackageFragment pack= context.getfSourceFolder().createPackageFragment("test", false, null);
ICompilationUnit cu= pack.createCompilationUnit("Test.java",test.given,false, null);
context.enable(CleanUpConstants.CONTROL_STATEMENTS_CONVERT_FOR_LOOP_TO_ENHANCED);
context.assertRefactoringHasNoChange(new ICompilationUnit[] { cu });