persistence
.
*
* @return the JNDI name of the test datasource
@@ -163,7 +165,8 @@ public interface Configuration {
public void setTestJmsTopic(String testJmsTopic);
/**
- * All tests using some timeout technique (e.g. wait for async processing) should use this value to adjust the final timeout so that it's possible to configure timeouts
+ * All tests using some timeout technique (e.g. wait for async processing) should use this value to adjust the final timeout
+ * so that it's possible to configure timeouts
* according to the testing runtime performance and throughput.
*
* @return the test timeout factor (in percent)
diff --git a/api/src/main/java/org/jboss/cdi/tck/spi/Beans.java b/api/src/main/java/org/jboss/cdi/tck/spi/Beans.java
index c4ee2d38b3..7b03c649ae 100644
--- a/api/src/main/java/org/jboss/cdi/tck/spi/Beans.java
+++ b/api/src/main/java/org/jboss/cdi/tck/spi/Beans.java
@@ -1,58 +1,58 @@
-/*
- * Copyright 2010, Red Hat, Inc., and individual contributors
- *
- * Licensed 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.
- */
-package org.jboss.cdi.tck.spi;
-
-import java.io.IOException;
-
-/**
- * Provides Bean related operations.
- *
- * The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
- *
- * This interface may be removed.
- *
- * @author Shane Bryzak
- * @author Pete Muir
- * @author David Allen
- *
- */
-public interface Beans {
-
- public static final String PROPERTY_NAME = Beans.class.getName();
-
- /**
- * Determines if the object instance is actually a proxy object.
- *
- * @param instance The object which might be a proxy
- * @return true if the object is a proxy
- */
- public boolean isProxy(Object instance);
-
- /**
- * Passivates the object tree starting with the bean instance provided.
- *
- * @param instance The bean instance to serialize
- * @return the serialized byte array of the bean instance
- */
- public byte[] passivate(Object instance) throws IOException;
-
- /**
- * Activates a bean instance from the given serialized bytes.
- *
- * @param bytes The serialized byte stream of a bean instance
- * @return the serialized byte array of the bean instance
- */
- public Object activate(byte[] bytes) throws IOException, ClassNotFoundException;
-
-}
+/*
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ *
+ * Licensed 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.
+ */
+package org.jboss.cdi.tck.spi;
+
+import java.io.IOException;
+
+/**
+ * Provides Bean related operations.
+ *
+ * The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
+ *
+ * This interface may be removed.
+ *
+ * @author Shane Bryzak
+ * @author Pete Muir
+ * @author David Allen
+ *
+ */
+public interface Beans {
+
+ public static final String PROPERTY_NAME = Beans.class.getName();
+
+ /**
+ * Determines if the object instance is actually a proxy object.
+ *
+ * @param instance The object which might be a proxy
+ * @return true if the object is a proxy
+ */
+ public boolean isProxy(Object instance);
+
+ /**
+ * Passivates the object tree starting with the bean instance provided.
+ *
+ * @param instance The bean instance to serialize
+ * @return the serialized byte array of the bean instance
+ */
+ public byte[] passivate(Object instance) throws IOException;
+
+ /**
+ * Activates a bean instance from the given serialized bytes.
+ *
+ * @param bytes The serialized byte stream of a bean instance
+ * @return the serialized byte array of the bean instance
+ */
+ public Object activate(byte[] bytes) throws IOException, ClassNotFoundException;
+
+}
diff --git a/api/src/main/java/org/jboss/cdi/tck/spi/Contexts.java b/api/src/main/java/org/jboss/cdi/tck/spi/Contexts.java
index 0e45419710..1a5c07ca14 100644
--- a/api/src/main/java/org/jboss/cdi/tck/spi/Contexts.java
+++ b/api/src/main/java/org/jboss/cdi/tck/spi/Contexts.java
@@ -1,74 +1,74 @@
-/*
- * Copyright 2010, Red Hat, Inc., and individual contributors
- *
- * Licensed 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.
- */
-package org.jboss.cdi.tck.spi;
-
-import jakarta.enterprise.context.spi.Context;
-
-/**
- * This interface provides operations relating to Contexts.
- *
- * The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
- *
- * @author Shane Bryzak
- * @author Pete Muir
- *
- * @param - * The set of existing contextual instances of the context is preserved - * across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}. - * - * @param context The context to set active - */ - public void setActive(T context); - - /** - * Sets the specified context as inactive. - *
- * The set of existing contextual instances of the context is preserved
- * across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
- *
- * @param context The context to set inactive
- */
- public void setInactive(T context);
-
- /**
- * Get the request context, regardless of whether it is active or not
- *
- * @return The request context
- */
- public T getRequestContext();
-
- /**
- * Returns the dependent context, regardless of whether it is active or not
- *
- * @return the dependent context
- */
- public T getDependentContext();
-
- /**
- * Destroy the context. This operation is defined by the CDI specification but has no API.
- *
- * @param context the context to destroy
- */
- public void destroyContext(T context);
-
-}
+/*
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ *
+ * Licensed 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.
+ */
+package org.jboss.cdi.tck.spi;
+
+import jakarta.enterprise.context.spi.Context;
+
+/**
+ * This interface provides operations relating to Contexts.
+ *
+ * The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
+ *
+ * @author Shane Bryzak
+ * @author Pete Muir
+ *
+ * @param
+ * The set of existing contextual instances of the context is preserved
+ * across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
+ *
+ * @param context The context to set active
+ */
+ public void setActive(T context);
+
+ /**
+ * Sets the specified context as inactive.
+ *
+ * The set of existing contextual instances of the context is preserved
+ * across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
+ *
+ * @param context The context to set inactive
+ */
+ public void setInactive(T context);
+
+ /**
+ * Get the request context, regardless of whether it is active or not
+ *
+ * @return The request context
+ */
+ public T getRequestContext();
+
+ /**
+ * Returns the dependent context, regardless of whether it is active or not
+ *
+ * @return the dependent context
+ */
+ public T getDependentContext();
+
+ /**
+ * Destroy the context. This operation is defined by the CDI specification but has no API.
+ *
+ * @param context the context to destroy
+ */
+ public void destroyContext(T context);
+
+}
diff --git a/api/src/main/java/org/jboss/cdi/tck/spi/EL.java b/api/src/main/java/org/jboss/cdi/tck/spi/EL.java
index 56d9465374..0ca7fa863f 100644
--- a/api/src/main/java/org/jboss/cdi/tck/spi/EL.java
+++ b/api/src/main/java/org/jboss/cdi/tck/spi/EL.java
@@ -47,7 +47,8 @@ public interface EL {
* @param expectedParamTypes
* @return
*/
- public
- * This is a base class for builders that try to solve most JBoss Test Harness to Arquillian migration issues. The main goal was to use CDI TCK
+ * This is a base class for builders that try to solve most JBoss Test Harness to Arquillian migration issues. The
+ * main goal was to use CDI TCK
* 1.0 tests with minimum code changes.
*
- * Note that all Arquillian tests running in as-client mode (including tests using {@link ShouldThrowException}) must not contain testing related stuff
- * (anything that depends on Arquillian, TestNG, incl. test class itself) since Arquillian is not enriching as-client test archives. That's why
+ * Note that all Arquillian tests running in as-client mode (including tests using {@link ShouldThrowException}) must not
+ * contain testing related stuff
+ * (anything that depends on Arquillian, TestNG, incl. test class itself) since Arquillian is not enriching as-client test
+ * archives. That's why
* {@link #isAsClientMode} has to be properly set.
*
- * In case of {@link #isTestArchive} set to
* Do not use this in new tests - use {@link #withWebXml(WebAppDescriptor)} instead.
* & ClassContainer>> void processClasses(P archi
classesPackage = clazz.getPackage();
}
Asset resource = new ClassAsset(clazz);
- ArchivePath location = ArchivePaths.create(resolveClassesPath(archive), AssetUtil.getFullPathForClassResource(clazz));
+ ArchivePath location = ArchivePaths.create(resolveClassesPath(archive),
+ AssetUtil.getFullPathForClassResource(clazz));
archive.add(resource, location);
}
@@ -1142,7 +1162,8 @@ public LibraryDescriptor(File fileDescriptor) {
this.fileDescriptor = fileDescriptor;
}
- public LibraryDescriptor(String name, ServiceProviderDescriptor serviceProvider, BeansXml beansDescriptor, Class>... classes) {
+ public LibraryDescriptor(String name, ServiceProviderDescriptor serviceProvider, BeansXml beansDescriptor,
+ Class>... classes) {
super();
if (serviceProvider != null) {
this.serviceProviders = new ArrayList
*
@@ -76,8 +78,9 @@ public Listfalse
this archive may not include any testing related stuff as it is probably part of another test
+ * In case of {@link #isTestArchive} set to false
this archive may not include any testing related stuff as it is
+ * probably part of another test
* archive.
* beans.xml
and if any of defined classes implements
+ * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of
+ * defined classes implements
* {@link Extension} add corresponding service provider.
*
* @param beanClasses
@@ -609,7 +618,8 @@ public T withBeanLibrary(Class>... beanClasses) {
}
/**
- * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of defined classes implements
+ * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of
+ * defined classes implements
* {@link Extension} add corresponding service provider.
*
* @param beanClasses
@@ -620,7 +630,8 @@ public T withBeanLibrary(BeansXml beansXml, Class>... beanClasses) {
}
/**
- * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of defined classes implements
+ * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of
+ * defined classes implements
* {@link Extension} add corresponding service provider.
*
* @param beanClasses
@@ -631,7 +642,8 @@ public T withBeanLibrary(String name, Class>... beanClasses) {
}
/**
- * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of defined classes implements
+ * Add bean library that consists of defined bean classes; automatically include empty beans.xml
and if any of
+ * defined classes implements
* {@link Extension} add corresponding service provider.
*
* @param beanClasses
@@ -683,11 +695,13 @@ public T withLibrary(String name, BeansXml beansXml, boolean includeEmptyBeanXml
extensions.add(clazz);
}
}
- ServiceProviderDescriptor serviceProvider = extensions.isEmpty() ? null : new ServiceProviderDescriptor(Extension.class,
- extensions.toArray(new Class>[extensions.size()]));
+ ServiceProviderDescriptor serviceProvider = extensions.isEmpty() ? null
+ : new ServiceProviderDescriptor(Extension.class,
+ extensions.toArray(new Class>[extensions.size()]));
- this.libraries.add(beansXml != null ? new LibraryDescriptor(name, serviceProvider, beansXml, classes) : new LibraryDescriptor(name,
- serviceProvider, includeEmptyBeanXml, classes));
+ this.libraries.add(beansXml != null ? new LibraryDescriptor(name, serviceProvider, beansXml, classes)
+ : new LibraryDescriptor(name,
+ serviceProvider, includeEmptyBeanXml, classes));
return self();
}
@@ -738,7 +752,8 @@ public T setAsClientMode(boolean isAsClientMode) {
}
/**
- * @return true
if TCK specific infrastructure (porting package, utils, etc.) should be automatically added, false
otherwise
+ * @return true
if TCK specific infrastructure (porting package, utils, etc.) should be automatically added,
+ * false
otherwise
* @see #resolveAsClientMode()
*/
public boolean isTestArchive() {
@@ -746,7 +761,8 @@ public boolean isTestArchive() {
}
/**
- * Mark this archive as non-testing. TCK specific infrastructure (porting package, utils, etc.) will not be automatically added.
+ * Mark this archive as non-testing. TCK specific infrastructure (porting package, utils, etc.) will not be automatically
+ * added.
*/
public T notTestArchive() {
this.isTestArchive = false;
@@ -804,7 +820,8 @@ public A build() {
}
logger.log(Level.INFO, "Test archive built [info: {0}, time: {1} ms]",
- new Object[] { testClazz != null ? testClazz.getName() : archive.getName(), Long.valueOf(System.currentTimeMillis() - start) });
+ new Object[] { testClazz != null ? testClazz.getName() : archive.getName(),
+ Long.valueOf(System.currentTimeMillis() - start) });
return archive;
}
@@ -815,7 +832,8 @@ public A build() {
protected abstract A buildInternal();
/**
- * Process packages. Exclude classes specified via {@link #withExcludedClass(String)}. If in as-client mode, filter test class.
+ * Process packages. Exclude classes specified via {@link #withExcludedClass(String)}. If in as-client mode, filter test
+ * class.
*
* @param archive
*/
@@ -863,7 +881,8 @@ else if (className.startsWith(exludeClassName) && className.contains("$"))
if (classesPath != null) {
ArchivePath classNamePath = AssetUtil.getFullPathForClassResource(className);
- archive.add(new ClassLoaderAsset(classNamePath.get().substring(1), clToUse), ArchivePaths.create(classesPath, classNamePath));
+ archive.add(new ClassLoaderAsset(classNamePath.get().substring(1), clToUse),
+ ArchivePaths.create(classesPath, classNamePath));
} else {
archive.addClass(className);
}
@@ -905,7 +924,8 @@ protected org.jboss.cdi.tck.libraryDirectory
property in cdi-tck.properties.
+ * Add default libraries from lib directory specified with org.jboss.cdi.tck.libraryDirectory
property in
+ * cdi-tck.properties.
*/
private void addDefaultLibraries() {
@@ -1255,7 +1279,8 @@ public boolean accept(File dir, String name) {
}
private boolean skipClassName(String className) {
- return ((isAsClientMode() && testClazz.getName().equals(className)) || (excludedClasses != null && excludedClasses.contains(className)));
+ return ((isAsClientMode() && testClazz.getName().equals(className))
+ || (excludedClasses != null && excludedClasses.contains(className)));
}
private boolean isSinglePackage(Settrue
provided that:
*
*
*
* @throws IllegalStateException If multiple deployments detected and as-client mode not set
@@ -1315,7 +1341,8 @@ private void resolveAsClientMode() {
}
deploymentMethod = method;
- if (method.isAnnotationPresent(ShouldThrowException.class) || !method.getAnnotation(Deployment.class).testable()) {
+ if (method.isAnnotationPresent(ShouldThrowException.class)
+ || !method.getAnnotation(Deployment.class).testable()) {
setAsClientMode(true);
}
}
@@ -1359,7 +1386,8 @@ private static JavaArchive buildIncontainerLibrary() {
long start = System.currentTimeMillis();
- JavaArchive supportLib = ShrinkWrap.create(JavaArchive.class, "cdi-tck-incontainer.jar").addClasses(AbstractTest.class, Sections.class,
+ JavaArchive supportLib = ShrinkWrap.create(JavaArchive.class, "cdi-tck-incontainer.jar").addClasses(AbstractTest.class,
+ Sections.class,
TestGroups.class);
logger.log(Level.INFO, "Incontainer library built [time: {0} ms]", System.currentTimeMillis() - start);
@@ -1385,7 +1413,7 @@ protected String getSha1OfTestClass() {
for (int i = 0; i < digest.length; i++) {
hexString.append(Integer.toHexString(0xFF & digest[i]));
}
- return testClazz.getSimpleName()+hexString.toString();
+ return testClazz.getSimpleName() + hexString.toString();
}
return null;
}
diff --git a/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/URLPackageScanner.java b/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/URLPackageScanner.java
index 9ca2c31ce2..6fe3a4ce02 100644
--- a/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/URLPackageScanner.java
+++ b/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/URLPackageScanner.java
@@ -63,17 +63,17 @@ public class URLPackageScanner {
* Factory method to create an instance of URLPackageScanner.
*
* @param addRecursively
- * flag to add child packages
+ * flag to add child packages
* @param classLoader
- * class loader that will have classes added
+ * class loader that will have classes added
* @param callback
- * found class callback
+ * found class callback
* @param packageName
- * Package that will be scanned
+ * Package that will be scanned
* @return new instance of URLPackageScanner
*/
public static URLPackageScanner newInstance(boolean addRecursively, final ClassLoader classLoader,
- final Callback callback, final String packageName) {
+ final Callback callback, final String packageName) {
validateNotNull(packageName, "Package name must be specified");
validateNotNull(classLoader, "ClassLoader must be specified");
@@ -86,11 +86,11 @@ public static URLPackageScanner newInstance(boolean addRecursively, final ClassL
* Factory method to create an instance of URLPackageScanner in the default package
*
* @param addRecursively
- * flag to add child packages
+ * flag to add child packages
* @param classLoader
- * class loader that will have classes added
+ * class loader that will have classes added
* @param callback
- * found class callback
+ * found class callback
* @return new instance of URLPackageScanner
*/
public static URLPackageScanner newInstance(boolean addRecursively, ClassLoader classLoader, Callback callback) {
@@ -140,7 +140,7 @@ private void handleArchiveByFile(File file) throws IOException, ClassNotFoundExc
ZipEntry entry = entries.nextElement();
String name = entry.getName();
if (name.startsWith(packageNamePath) && name.endsWith(".class")
- && (addRecursively || !name.substring(packageNamePath.length() + 1).contains("/"))) {
+ && (addRecursively || !name.substring(packageNamePath.length() + 1).contains("/"))) {
String className = name.replace("/", ".").substring(0, name.length() - ".class".length());
foundClass(className);
}
@@ -193,7 +193,7 @@ public interface Callback {
* Called for each found class.
*
* @param className
- * The name of the found class
+ * The name of the found class
*/
void classFound(String className);
}
diff --git a/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/WebArchiveBuilder.java b/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/WebArchiveBuilder.java
index fd2e7f9379..cc1050e403 100644
--- a/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/WebArchiveBuilder.java
+++ b/impl/src/main/java/org/jboss/cdi/tck/shrinkwrap/WebArchiveBuilder.java
@@ -34,7 +34,7 @@ public class WebArchiveBuilder extends ArchiveBuilder
> listOfWildcard = new TypeLiteral<>() {};
+ TypeLiteral
> listOfWildcard = new TypeLiteral<>() {
+ };
Set
> listOfString = new TypeLiteral<>() {};
- TypeLiteral
> listOfWildcard = new TypeLiteral<>() {};
- TypeLiteral
> listOfInteger = new TypeLiteral<>() {};
-
- assertTrue(getCurrentBeanContainer().isMatchingEvent(listOfString.getType(), Set.of(), listOfString.getType(), Set.of()),
+ TypeLiteral
> listOfString = new TypeLiteral<>() {
+ };
+ TypeLiteral
> listOfWildcard = new TypeLiteral<>() {
+ };
+ TypeLiteral
> listOfInteger = new TypeLiteral<>() {
+ };
+
+ assertTrue(
+ getCurrentBeanContainer().isMatchingEvent(listOfString.getType(), Set.of(), listOfString.getType(), Set.of()),
"Event with Parameterized type should match when same Parameterized type is requested");
- assertTrue(getCurrentBeanContainer().isMatchingEvent(listOfString.getType(), Set.of(), listOfWildcard.getType(), Set.of()),
+ assertTrue(
+ getCurrentBeanContainer().isMatchingEvent(listOfString.getType(), Set.of(), listOfWildcard.getType(), Set.of()),
"Event with Parameterized type should match when Parameterized type with wildcard is requested");
- assertFalse(getCurrentBeanContainer().isMatchingEvent(listOfString.getType(), Set.of(), listOfInteger.getType(), Set.of()),
+ assertFalse(
+ getCurrentBeanContainer().isMatchingEvent(listOfString.getType(), Set.of(), listOfInteger.getType(), Set.of()),
"Event with Parameterized type should not match when a different Parameterized type is requested");
}
@Test
@SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "bb")
public void testEventMatchingAnyQualifier() {
- assertTrue(getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class, Set.of(Any.Literal.INSTANCE)),
+ assertTrue(
+ getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class, Set.of(Any.Literal.INSTANCE)),
"Event with no qualifiers should match when @Any required");
-
- assertTrue(getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(Qualifier1.Literal.INSTANCE), MyEvent.class, Set.of(Any.Literal.INSTANCE)),
+
+ assertTrue(
+ getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(Qualifier1.Literal.INSTANCE), MyEvent.class,
+ Set.of(Any.Literal.INSTANCE)),
"Event with @Qualifier1 should match when @Any required");
}
@Test
@SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "bc")
public void testEventMatchingNullException() {
- assertThrows("Null event type", IllegalArgumentException.class, () -> getCurrentBeanContainer().isMatchingEvent(null, Set.of(), MyBean.class, Set.of()));
- assertThrows("Null event qualifiers", IllegalArgumentException.class, () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, null, MyEvent.class, Set.of()));
- assertThrows("Null required type", IllegalArgumentException.class, () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), null, Set.of()));
- assertThrows("Null required qualifiers", IllegalArgumentException.class, () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class, null));
+ assertThrows("Null event type", IllegalArgumentException.class,
+ () -> getCurrentBeanContainer().isMatchingEvent(null, Set.of(), MyBean.class, Set.of()));
+ assertThrows("Null event qualifiers", IllegalArgumentException.class,
+ () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, null, MyEvent.class, Set.of()));
+ assertThrows("Null required type", IllegalArgumentException.class,
+ () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), null, Set.of()));
+ assertThrows("Null required qualifiers", IllegalArgumentException.class,
+ () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class, null));
}
@Test
@SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "bd")
public
> varEventType = new TypeLiteral<>() {};
+ TypeLiteral
> varEventType = new TypeLiteral<>() {
+ };
assertThrows("Type variable in event type", IllegalArgumentException.class,
() -> getCurrentBeanContainer().isMatchingEvent(varEventType.getType(), Set.of(), MyBean.class, Set.of()));
}
-
+
@Test
@SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "be")
public void testEventMatchingNonQualifiersException() {
assertThrows("A specifiedQualifiers annotation not a qualifier", IllegalArgumentException.class,
- () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(Qualifier1.Literal.INSTANCE, NonQualifier.Literal.INSTANCE), MyEvent.class, Set.of()));
+ () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class,
+ Set.of(Qualifier1.Literal.INSTANCE, NonQualifier.Literal.INSTANCE), MyEvent.class, Set.of()));
assertThrows("An observedEventQualfiers annotation not a qualifier", IllegalArgumentException.class,
- () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class, Set.of(Qualifier1.Literal.INSTANCE, NonQualifier.Literal.INSTANCE)));
+ () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class,
+ Set.of(Qualifier1.Literal.INSTANCE, NonQualifier.Literal.INSTANCE)));
}
}
diff --git a/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/Qualifier1.java b/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/Qualifier1.java
index 744877eb7d..7c6c5672a2 100644
--- a/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/Qualifier1.java
+++ b/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/Qualifier1.java
@@ -25,7 +25,7 @@
@Retention(RUNTIME)
@Target({ TYPE, METHOD, FIELD, PARAMETER })
public @interface Qualifier1 {
-
+
static class Literal extends AnnotationLiteral