diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/.classpath b/bundles/org.eclipse.equinox.http.servlet.tests/.classpath index 5a135638408..fd856c7cd14 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/.classpath +++ b/bundles/org.eclipse.equinox.http.servlet.tests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.http.servlet.tests/.settings/org.eclipse.jdt.core.prefs index 60ef89a9202..477051282e3 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.eclipse.equinox.http.servlet.tests/.settings/org.eclipse.jdt.core.prefs @@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -27,6 +27,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore @@ -72,6 +73,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -110,8 +112,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF index 1f94e3d52bd..3d8a2c527a7 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: org.eclipse.equinox.http.servlet.tests Bundle-Vendor: Eclipse.org - Equinox Bundle-SymbolicName: org.eclipse.equinox.http.servlet.tests Bundle-Version: 1.8.500.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Eclipse-BundleShape: dir Require-Bundle: org.junit;bundle-version="4.0", org.apache.felix.scr, diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter1.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter1.java index 07fac76fec4..5d5de637baf 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter1.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter1.java @@ -38,7 +38,7 @@ public class TestFilter1 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(regexAlias(), this, null, null); - service.registerFilter(regexAlias(), f1, new Hashtable(), null); + service.registerFilter(regexAlias(), f1, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter2.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter2.java index 2c8128cd9e7..c418fe0cda9 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter2.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter2.java @@ -38,8 +38,8 @@ public class TestFilter2 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(regexAlias(), this, null, null); - service.registerFilter(regexAlias(), f1, new Hashtable(), null); - service.registerFilter(regexAlias(), f2, new Hashtable(), null); + service.registerFilter(regexAlias(), f1, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f2, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter3.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter3.java index bfb776c7059..4353bc2bb23 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter3.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter3.java @@ -38,9 +38,9 @@ public class TestFilter3 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(regexAlias(), this, null, null); - service.registerFilter(regexAlias(), f1, new Hashtable(), null); - service.registerFilter(regexAlias(), f2, new Hashtable(), null); - service.registerFilter(regexAlias(), f3, new Hashtable(), null); + service.registerFilter(regexAlias(), f1, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f2, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f3, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter4.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter4.java index f7f0008f758..8f20a3dd90b 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter4.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter4.java @@ -38,8 +38,8 @@ public class TestFilter4 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(regexAlias(), this, null, null); - service.registerFilter(regexAlias(), f1, new Hashtable(), null); - service.registerFilter(regexAlias(), f2, new Hashtable(), null); + service.registerFilter(regexAlias(), f1, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f2, new Hashtable<>(), null); Hashtable hashtable = new Hashtable<>(); hashtable.put("filter-priority", "1"); service.registerFilter(regexAlias(), f3, hashtable, null); diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter5.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter5.java index a6ac399f59d..6c80898e3b6 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter5.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter5.java @@ -38,7 +38,7 @@ public class TestFilter5 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(extensionAlias(), this, null, null); - service.registerFilter(extensionAlias(), f1, new Hashtable(), null); + service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter6.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter6.java index d8b930aef83..ff8a89793dc 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter6.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter6.java @@ -38,8 +38,8 @@ public class TestFilter6 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(extensionAlias(), this, null, null); - service.registerFilter(extensionAlias(), f1, new Hashtable(), null); - service.registerFilter(extensionAlias(), f2, new Hashtable(), null); + service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null); + service.registerFilter(extensionAlias(), f2, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter7.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter7.java index 0680ca4feb2..7b5c6eaf1dc 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter7.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter7.java @@ -38,9 +38,9 @@ public class TestFilter7 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(extensionAlias(), this, null, null); - service.registerFilter(extensionAlias(), f1, new Hashtable(), null); - service.registerFilter(extensionAlias(), f2, new Hashtable(), null); - service.registerFilter(extensionAlias(), f3, new Hashtable(), null); + service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null); + service.registerFilter(extensionAlias(), f2, new Hashtable<>(), null); + service.registerFilter(extensionAlias(), f3, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter8.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter8.java index 8e6dd555493..ee67ec91e0e 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter8.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestFilter8.java @@ -38,8 +38,8 @@ public class TestFilter8 extends AbstractTestServlet { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerServlet(extensionAlias(), this, null, null); - service.registerFilter(extensionAlias(), f1, new Hashtable(), null); - service.registerFilter(extensionAlias(), f2, new Hashtable(), null); + service.registerFilter(extensionAlias(), f1, new Hashtable<>(), null); + service.registerFilter(extensionAlias(), f2, new Hashtable<>(), null); Hashtable hashtable = new Hashtable<>(); hashtable.put("filter-priority", "1"); service.registerFilter(extensionAlias(), f3, hashtable, null); diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource2.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource2.java index 8e1acb500bf..59b55c9f3a2 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource2.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource2.java @@ -22,7 +22,6 @@ import org.eclipse.equinox.http.servlet.ExtendedHttpService; import org.eclipse.equinox.http.servlet.tests.tb.AbstractTestResource; import org.eclipse.equinox.http.servlet.tests.util.BaseFilter; - import org.osgi.service.component.ComponentContext; import org.osgi.service.http.NamespaceException; @@ -35,9 +34,9 @@ public class TestResource2 extends AbstractTestResource { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerResources(regexAlias(), getName() , null); - service.registerFilter(regexAlias(), f1, new Hashtable(), null); - service.registerFilter(regexAlias(), f2, new Hashtable(), null); - service.registerFilter(regexAlias(), f3, new Hashtable(), null); + service.registerFilter(regexAlias(), f1, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f2, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f3, new Hashtable<>(), null); } @Override diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource4.java b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource4.java index f91c960cf0d..bea7be44652 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource4.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestResource4.java @@ -34,8 +34,8 @@ public class TestResource4 extends AbstractTestResource { public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { ExtendedHttpService service = (ExtendedHttpService)getHttpService(); service.registerResources(regexAlias(), getName() , null); - service.registerFilter(regexAlias(), f1, new Hashtable(), null); - service.registerFilter(regexAlias(), f2, new Hashtable(), null); + service.registerFilter(regexAlias(), f1, new Hashtable<>(), null); + service.registerFilter(regexAlias(), f2, new Hashtable<>(), null); Hashtable hashtable = new Hashtable<>(); hashtable.put("filter-priority", "1"); service.registerFilter(regexAlias(), f3, hashtable, null); diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java index 6ad7379819e..d6bceafd359 100644 --- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java +++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java @@ -22,7 +22,6 @@ import java.util.Hashtable; import java.util.concurrent.atomic.AtomicReference; -import javax.servlet.ServletContext; import javax.servlet.ServletContextListener; import org.eclipse.equinox.http.servlet.testbase.BaseTest; @@ -44,7 +43,7 @@ public void test_140_7_validation() { Dictionary properties = new Hashtable<>(); properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "true"); ServiceRegistration sr = context.registerService( - ServletContextListener.class, new MockSCL(new AtomicReference()), properties); + ServletContextListener.class, new MockSCL(new AtomicReference<>()), properties); registrations.add(sr); ListenerDTO listenerDTO = getListenerDTOByServiceId(DEFAULT, getServiceId(sr));