File tree Expand file tree Collapse file tree
main/java/group/rxcloud/capa/spi/aws/mesh/http/serializer
test/java/group/rxcloud/capa/spi/aws/mesh/http/serializer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ labels: kind/bug
66assignees : ' '
77---
88
9- - [ ] I have searched the [ issues] ( https://github.com/reactivegroup /capa-aws/issues ) of this repository and believe that this is not a duplicate.
9+ - [ ] I have searched the [ issues] ( https://github.com/capa-cloud /capa-java -aws/issues ) of this repository and believe that this is not a duplicate.
1010
1111### Environment
1212
@@ -38,4 +38,4 @@ assignees: ''
3838<!-- RELEASE NOTE: **FIX** Bug in runtime. -->
3939<!-- RELEASE NOTE: **UPDATE** Runtime dependency. -->
4040
41- RELEASE NOTE:
41+ RELEASE NOTE:
Original file line number Diff line number Diff line change 1+ # Repository Guidelines
2+
3+ - GitHub: ` capa-cloud/capa-java-aws `
4+ - Category: Java AWS adapter/runtime project.
5+ - Public documentation: ` https://capa.rxcloud.group/ `
6+
7+ Keep cloud credentials out of source. Validate adapter changes with local tests or mocked AWS clients before documenting them as ready.
Original file line number Diff line number Diff line change @@ -312,6 +312,6 @@ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENS
312312
313313<p align="center">
314314 <a href="https://github.com/capa-cloud">Capa Cloud</a> ·
315- <a href="https://capa-cloud.github.io/capa.io /">Documentation</a> ·
315+ <a href="https://capa.rxcloud.group /">Documentation</a> ·
316316 <a href="https://aws.amazon.com/">AWS</a>
317317</p>
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ public interface AwsCapaSerializerProvider {
3737 static CapaObjectSerializer getSerializerOrDefault (CapaObjectSerializer originSerializer ) {
3838 final String serializerName = AwsCapaRpcProperties .SerializerProperties .Settings .getRpcAwsAppMeshSerializer ();
3939 Map <String , CapaObjectSerializer > serializerFactory = AwsCapaSerializerFactory .SERIALIZER_FACTORY ;
40- return serializerFactory .getOrDefault (serializerName , originSerializer );
40+ CapaObjectSerializer configuredSerializer = serializerFactory .get (serializerName );
41+ if (configuredSerializer != null ) {
42+ return configuredSerializer ;
43+ }
44+ return originSerializer != null ? originSerializer : serializerFactory .get ("default" );
4145 }
4246
4347 /**
Original file line number Diff line number Diff line change 1717package group .rxcloud .capa .spi .aws .mesh .http .serializer ;
1818
1919import group .rxcloud .capa .infrastructure .serializer .CapaObjectSerializer ;
20+ import group .rxcloud .capa .infrastructure .serializer .DefaultObjectSerializer ;
21+ import group .rxcloud .capa .spi .aws .mesh .AwsCapaRpcProperties ;
22+ import org .junit .jupiter .api .AfterEach ;
2023import org .junit .jupiter .api .Assertions ;
2124import org .junit .jupiter .api .Test ;
2225
2326public class AwsCapaSerializerProviderTest {
2427
28+ @ AfterEach
29+ public void resetSerializerSetting () {
30+ AwsCapaRpcProperties .SerializerProperties .Settings .setRpcAwsAppMeshSerializer ("default" );
31+ }
32+
2533 @ Test
26- public void testGetSerializerOrDefault_Success () {
34+ public void testGetSerializerOrDefault_UsesDefaultWhenConfiguredSerializerIsUnavailable () {
35+ AwsCapaRpcProperties .SerializerProperties .Settings .setRpcAwsAppMeshSerializer ("unavailable" );
36+
2737 CapaObjectSerializer serializerOrDefault = AwsCapaSerializerProvider .getSerializerOrDefault (null );
38+
2839 Assertions .assertEquals ("application/json" , serializerOrDefault .getContentType ());
2940 }
41+
42+ @ Test
43+ public void testGetSerializerOrDefault_UsesProvidedSerializer () {
44+ AwsCapaRpcProperties .SerializerProperties .Settings .setRpcAwsAppMeshSerializer ("custom" );
45+ CapaObjectSerializer serializer = new DefaultObjectSerializer ();
46+
47+ CapaObjectSerializer serializerOrDefault = AwsCapaSerializerProvider .getSerializerOrDefault (serializer );
48+
49+ Assertions .assertSame (serializer , serializerOrDefault );
50+ }
3051}
Original file line number Diff line number Diff line change 2626 <version >1.11.13.5.RELEASE</version >
2727 <name >capa-aws-parent</name >
2828 <description >AWS for Capa.</description >
29- <url >https://github.com/reactivegroup </url >
29+ <url >https://github.com/capa-cloud/capa-java-aws </url >
3030
3131 <licenses >
3232 <license >
4747 </developers >
4848
4949 <scm >
50- <connection >scm:git:git@ github.com:reactivegroup /capa-aws.git</connection >
51- <developerConnection >scm:git:git@github.com:reactivegroup /capa-aws.git</developerConnection >
52- <url >git@ github.com:reactivegroup /capa-aws.git </url >
50+ <connection >scm:git:https:// github.com/capa-cloud/capa-java -aws.git</connection >
51+ <developerConnection >scm:git:git@github.com:capa-cloud /capa-java -aws.git</developerConnection >
52+ <url >https:// github.com/capa-cloud/capa-java- aws</url >
5353 </scm >
5454
5555 <distributionManagement >
661661 </plugins >
662662 </build >
663663
664- </project >
664+ </project >
You can’t perform that action at this time.
0 commit comments