From e1387e808e1b4dc3c31f29a01abb5bf2a3d56503 Mon Sep 17 00:00:00 2001 From: Said BOUDJELDA Date: Fri, 24 Nov 2023 21:31:31 +0100 Subject: [PATCH 1/4] upgrade testng dependency to version 7.8.0 --- api/pom.xml | 4 +++- .../org/jboss/cdi/api/test/AnnotationLiteralTest.java | 5 ++--- api/src/test/java/org/jboss/cdi/api/test/CDITest.java | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 94405952..8bb82d77 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -128,6 +128,7 @@ 2.0.1 5.0.0 2.1.0 + 7.8.0 @@ -137,7 +138,7 @@ org.testng testng - 6.8.8 + ${testng.version} @@ -379,6 +380,7 @@ Jakarta Contexts and Dependency Injection API
Jakarta Contexts and Dependency Injection ${project.version}]]>
+ cdi-dev@eclipse.org.
Copyright © 2018,2022 Eclipse Foundation.
diff --git a/api/src/test/java/org/jboss/cdi/api/test/AnnotationLiteralTest.java b/api/src/test/java/org/jboss/cdi/api/test/AnnotationLiteralTest.java index 70652fd6..aa914b22 100644 --- a/api/src/test/java/org/jboss/cdi/api/test/AnnotationLiteralTest.java +++ b/api/src/test/java/org/jboss/cdi/api/test/AnnotationLiteralTest.java @@ -1,7 +1,6 @@ package org.jboss.cdi.api.test; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.context.BeforeDestroyed; @@ -77,8 +76,8 @@ public void testNonbindingLiteral() { @Test public void testTypedLiteral() { - assertTrue(Typed.Literal.INSTANCE.value().length == 0); - assertTrue(Typed.Literal.of(new Class[] { String.class }).value()[0] == String.class); + assertEquals(Typed.Literal.INSTANCE.value().length, 0); + assertEquals(Typed.Literal.of(new Class[] { String.class }).value()[0], String.class); } @SuppressWarnings("serial") diff --git a/api/src/test/java/org/jboss/cdi/api/test/CDITest.java b/api/src/test/java/org/jboss/cdi/api/test/CDITest.java index 00bfd4b7..323c75ec 100644 --- a/api/src/test/java/org/jboss/cdi/api/test/CDITest.java +++ b/api/src/test/java/org/jboss/cdi/api/test/CDITest.java @@ -53,7 +53,7 @@ public void setUp() throws Exception { } @Test(expectedExceptions = IllegalStateException.class) - public void testWithoutServiceFile() throws Exception { + public void testWithoutServiceFile() throws IllegalStateException { CDI.current(); } @@ -96,7 +96,7 @@ public void testWithTwoGoodCDIProvider() throws Exception { fw.write('\n'); fw.write(DummyCDIProvider.class.getName()); fw.close(); - Assert.assertTrue(CDI.current().getClass().equals(DummyCDIProvider.DummyCDI.class)); + Assert.assertEquals(DummyCDIProvider.DummyCDI.class, CDI.current().getClass()); } @@ -107,7 +107,7 @@ public void testWithTwoGoodCDIProviderReverse() throws Exception { fw.write('\n'); fw.write(DummyCDIProvider2.class.getName()); fw.close(); - Assert.assertTrue(CDI.current().getClass().equals(DummyCDIProvider.DummyCDI.class)); + Assert.assertEquals(DummyCDIProvider.DummyCDI.class, CDI.current().getClass()); } @Test @@ -117,7 +117,7 @@ public void testWithTwoCDIProviderOneWithNullCDIAndOneGood() throws Exception { fw.write('\n'); fw.write(DummyCDIProvider2.class.getName()); fw.close(); - Assert.assertTrue(CDI.current().getClass().equals(DummyCDIProvider2.DummyCDI2.class)); + Assert.assertEquals(DummyCDIProvider2.DummyCDI2.class, CDI.current().getClass()); } @@ -130,7 +130,7 @@ public void testWithThreeCDIProviderOneWithNullCDIAndOthersGood() throws Excepti fw.write('\n'); fw.write(DummyCDIProvider.class.getName()); fw.close(); - Assert.assertTrue(CDI.current().getClass().equals(DummyCDIProvider.DummyCDI.class)); + Assert.assertEquals(DummyCDIProvider.DummyCDI.class, CDI.current().getClass()); } From e2951c7d9d70210850974452dc623c64d117484f Mon Sep 17 00:00:00 2001 From: Said BOUDJELDA Date: Sat, 25 Nov 2023 21:02:49 +0100 Subject: [PATCH 2/4] update copyrithy year --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 8bb82d77..81fbb87b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -383,7 +383,7 @@ cdi-dev@eclipse.org.
-Copyright © 2018,2022 Eclipse Foundation.
+Copyright © 2018,2023 Eclipse Foundation.
Use is subject to license terms.]]>
From 828bf4d9e8762da7aac6428a95e1e410d8dbebc6 Mon Sep 17 00:00:00 2001 From: Said BOUDJELDA Date: Sat, 25 Nov 2023 21:17:05 +0100 Subject: [PATCH 3/4] update some dependencies --- spec/pom.xml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/spec/pom.xml b/spec/pom.xml index 02b9de90..998013eb 100644 --- a/spec/pom.xml +++ b/spec/pom.xml @@ -14,9 +14,13 @@ CDI Specification documentation - 2.2.1 - 2.5.2 - 1.6.0 + 2.2.4 + 2.5.10 + 2.3.9 + 3.3.1 + 1.0.0.Alpha2 + 3.1.0 + 3.1.1 asl2 @@ -79,7 +83,7 @@ org.jboss tck-spec-mapper - 1.0.0.Alpha2 + ${tck-spec-mapper.version} jar @@ -87,7 +91,7 @@ maven-resources-plugin - 2.7 + ${maven-resources-plugin.version} copy-resources @@ -109,7 +113,7 @@ org.codehaus.mojo exec-maven-plugin - 1.3.2 + ${exec-maven-plugin.version} package @@ -208,7 +212,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.0.0-M1 + ${maven-deploy-plugin.version} true From 569cb10cb6a36c4f1120fadb8dfe3b93aafbf145 Mon Sep 17 00:00:00 2001 From: Said BOUDJELDA Date: Mon, 27 Nov 2023 13:34:38 +0100 Subject: [PATCH 4/4] restore the order of equals --- api/src/test/java/org/jboss/cdi/api/test/CDITest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/test/java/org/jboss/cdi/api/test/CDITest.java b/api/src/test/java/org/jboss/cdi/api/test/CDITest.java index 323c75ec..bb37ead8 100644 --- a/api/src/test/java/org/jboss/cdi/api/test/CDITest.java +++ b/api/src/test/java/org/jboss/cdi/api/test/CDITest.java @@ -96,7 +96,7 @@ public void testWithTwoGoodCDIProvider() throws Exception { fw.write('\n'); fw.write(DummyCDIProvider.class.getName()); fw.close(); - Assert.assertEquals(DummyCDIProvider.DummyCDI.class, CDI.current().getClass()); + Assert.assertEquals(CDI.current().getClass(), DummyCDIProvider.DummyCDI.class); } @@ -107,7 +107,7 @@ public void testWithTwoGoodCDIProviderReverse() throws Exception { fw.write('\n'); fw.write(DummyCDIProvider2.class.getName()); fw.close(); - Assert.assertEquals(DummyCDIProvider.DummyCDI.class, CDI.current().getClass()); + Assert.assertEquals(CDI.current().getClass(), DummyCDIProvider.DummyCDI.class); } @Test @@ -117,7 +117,7 @@ public void testWithTwoCDIProviderOneWithNullCDIAndOneGood() throws Exception { fw.write('\n'); fw.write(DummyCDIProvider2.class.getName()); fw.close(); - Assert.assertEquals(DummyCDIProvider2.DummyCDI2.class, CDI.current().getClass()); + Assert.assertEquals(CDI.current().getClass(), DummyCDIProvider2.DummyCDI2.class); } @@ -130,7 +130,7 @@ public void testWithThreeCDIProviderOneWithNullCDIAndOthersGood() throws Excepti fw.write('\n'); fw.write(DummyCDIProvider.class.getName()); fw.close(); - Assert.assertEquals(DummyCDIProvider.DummyCDI.class, CDI.current().getClass()); + Assert.assertEquals(CDI.current().getClass(), DummyCDIProvider.DummyCDI.class); }