Skip to content

Commit 95d21dc

Browse files
committed
Merge branch '2.x' into 3.x
2 parents 48aa362 + 07b790b commit 95d21dc

File tree

23 files changed

+274
-7
lines changed

23 files changed

+274
-7
lines changed

jakarta-jsonp/src/main/resources/META-INF/services/tools.jackson.databind.JacksonModule

Lines changed: 0 additions & 1 deletion
This file was deleted.

jakarta-jsonp/src/test/java/module-info.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919

2020
// Further, need to open up test packages for JUnit et al
2121
opens tools.jackson.datatype.jsonp;
22+
23+
provides tools.jackson.databind.JacksonModule with
24+
tools.jackson.datatype.jsonp.JSONPModule;
25+
uses tools.jackson.databind.JacksonModule;
2226
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package tools.jackson.datatype.jsonp;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
import tools.jackson.databind.JacksonModule;
6+
7+
import static org.junit.jupiter.api.Assertions.*;
8+
9+
import java.util.ServiceLoader;
10+
11+
public class ModuleSPIMetadataTest extends TestBase
12+
{
13+
@Test
14+
void testModuleSPIMetadata() {
15+
ServiceLoader<JacksonModule> loader
16+
= ServiceLoader.load(JacksonModule.class);
17+
assertTrue(loader.iterator().hasNext(),
18+
"Expected at least one `Module` implementation to be found via `ServiceLoader`");
19+
final String exp = JSONPModule.class.getName();
20+
int count = 0;
21+
22+
try {
23+
for (JacksonModule service : loader) {
24+
++count;
25+
if (service.getClass().getName().equals(exp)) {
26+
return;
27+
}
28+
}
29+
} catch (Throwable t) {
30+
fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t);
31+
}
32+
fail("Expecteed to find `"+exp+"` Module (found "+count+" others)");
33+
assertEquals(1, count);
34+
}
35+
}

jakarta-mail/src/main/resources/META-INF/services/tools.jackson.databind.JacksonModule

Lines changed: 0 additions & 1 deletion
This file was deleted.

jakarta-mail/src/test/java/module-info.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@
1515

1616
// Further, need to open up test packages for JUnit et al
1717
opens tools.jackson.datatype.jakarta.mail;
18+
19+
provides tools.jackson.databind.JacksonModule with
20+
tools.jackson.datatype.jakarta.mail.JakartaMailModule;
21+
uses tools.jackson.databind.JacksonModule;
1822
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package tools.jackson.datatype.jakarta.mail;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
import tools.jackson.databind.JacksonModule;
6+
7+
import static org.junit.jupiter.api.Assertions.*;
8+
9+
import java.util.ServiceLoader;
10+
11+
public class ModuleSPIMetadataTest extends TestBase
12+
{
13+
@Test
14+
void testModuleSPIMetadata() {
15+
ServiceLoader<JacksonModule> loader
16+
= ServiceLoader.load(JacksonModule.class);
17+
assertTrue(loader.iterator().hasNext(),
18+
"Expected at least one `Module` implementation to be found via `ServiceLoader`");
19+
final String exp = JakartaMailModule.class.getName();
20+
int count = 0;
21+
22+
try {
23+
for (JacksonModule service : loader) {
24+
++count;
25+
if (service.getClass().getName().equals(exp)) {
26+
return;
27+
}
28+
}
29+
} catch (Throwable t) {
30+
fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t);
31+
}
32+
fail("Expecteed to find `"+exp+"` Module (found "+count+" others)");
33+
assertEquals(1, count);
34+
}
35+
}

javax-money/delombok.tgz

-4.71 KB
Binary file not shown.

javax-money/src/main/resources/META-INF/services/tools.jackson.databind.JacksonModule

Lines changed: 0 additions & 1 deletion
This file was deleted.

javax-money/src/test/java/module-info.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@
2323

2424
// Further, need to open up test packages for JUnit et al
2525
opens tools.jackson.datatype.javax.money;
26+
27+
provides tools.jackson.databind.JacksonModule with
28+
tools.jackson.datatype.javax.money.JavaxMoneyModule;
29+
uses tools.jackson.databind.JacksonModule;
2630
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package tools.jackson.datatype.javax.money;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
import tools.jackson.databind.JacksonModule;
6+
7+
import static org.junit.jupiter.api.Assertions.*;
8+
9+
import java.util.ServiceLoader;
10+
11+
public class ModuleSPIMetadataTest
12+
{
13+
@Test
14+
void testModuleSPIMetadata() {
15+
ServiceLoader<JacksonModule> loader
16+
= ServiceLoader.load(JacksonModule.class);
17+
assertTrue(loader.iterator().hasNext(),
18+
"Expected at least one `Module` implementation to be found via `ServiceLoader`");
19+
final String exp = JavaxMoneyModule.class.getName();
20+
int count = 0;
21+
22+
try {
23+
for (JacksonModule service : loader) {
24+
++count;
25+
if (service.getClass().getName().equals(exp)) {
26+
return;
27+
}
28+
}
29+
} catch (Throwable t) {
30+
fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t);
31+
}
32+
fail("Expected to find `"+exp+"` Module (found "+count+" others)");
33+
assertEquals(1, count);
34+
}
35+
}

0 commit comments

Comments
 (0)