Skip to content

Commit 8e3c4ba

Browse files
committed
Improve Maven configuration and document known Java/Maven warnings
- Update compiler configuration to use --release 21 instead of source/target - Fixes 'location of system modules not set' warnings - Add Known Issues section to README documenting harmless sun.misc.Unsafe warnings - These warnings come from Maven's bundled Guice, not from our library code - Warnings are harmless and will be resolved when Maven updates Guice version
1 parent d15c71f commit 8e3c4ba

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,16 @@ For each `@DynamoMappable` class, the processor generates:
125125
- **Bidirectional methods**: `toDynamoDbAttributeValue()` and `fromDynamoDbAttributeValue()`
126126
- **Dependency injection**: Constructor injection for required mappers
127127
- **Null safety**: Proper null handling throughout mapping logic
128-
- **Error handling**: Safe parsing with fallback to null values
128+
- **Error handling**: Safe parsing with fallback to null values
129+
130+
## Known Issues
131+
132+
### Java/Maven Compatibility Warnings
133+
134+
When using Java 21+ with Maven, you may see warnings like:
135+
```
136+
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
137+
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner
138+
```
139+
140+
These warnings are **harmless** and come from Google Guice (bundled with Maven), not from this library. They will be resolved when Maven updates to a newer Guice version. The warnings do not affect functionality and can be safely ignored.

integration-tests/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
<artifactId>maven-compiler-plugin</artifactId>
7979
<version>3.14.0</version>
8080
<configuration>
81-
<source>${maven.compiler.source}</source>
82-
<target>${maven.compiler.target}</target>
81+
<release>21</release>
8382
<encoding>${project.build.sourceEncoding}</encoding>
8483
<!-- Re-enable DynamoDB Toolkit annotation processor -->
8584
<annotationProcessorPaths>

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@
7070
<artifactId>maven-compiler-plugin</artifactId>
7171
<version>3.14.0</version>
7272
<configuration>
73-
<source>${maven.compiler.source}</source>
74-
<target>${maven.compiler.target}</target>
73+
<release>21</release>
7574
<encoding>${project.build.sourceEncoding}</encoding>
7675
<annotationProcessorPaths>
7776
<path>

0 commit comments

Comments
 (0)