Skip to content
Open
Changes from 1 commit
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
b22d4db
tests: reproduce #4086
RaniAgus Jul 4, 2026
2b83489
#4086: Check nullable status of methode return types
hduelme Jul 22, 2026
6c6d0b4
add test to ensure only own package is used. No resolving in parent p…
hduelme Jul 30, 2026
65a5704
continue introducing Nullability into model
hduelme Jul 30, 2026
e2f1863
remove isConverted from PropertyMapping
hduelme Jul 30, 2026
1925b14
continue introducing Nullability into model
hduelme Aug 1, 2026
ba8bca4
continue introducing Nullability into model
hduelme Aug 3, 2026
8ef1ee0
revert fix
hduelme Aug 4, 2026
df26a96
Workaround for nullability
hduelme Aug 4, 2026
05c6801
remove unsed
hduelme Aug 4, 2026
de52645
use new nullability
hduelme Aug 4, 2026
4f8a232
use new nullability
hduelme Aug 4, 2026
af11595
use new nullability
hduelme Aug 4, 2026
1ce4fb9
use new nullability
hduelme Aug 4, 2026
ce45adf
use new nullability
hduelme Aug 4, 2026
ecd7e6c
remove usused
hduelme Aug 4, 2026
e42d815
nullability for javaExpressions
hduelme Aug 7, 2026
4341dec
remove usused
hduelme Aug 7, 2026
17f31d1
fix import
hduelme Aug 7, 2026
70bf87f
nullabilty considers NullValueMappingStrategy
hduelme Aug 8, 2026
20f8e72
allways condisider nullability for getPresenceCheckForSourceParameter
hduelme Aug 8, 2026
b25b961
The nullability of ForfedMethod depends on the input
hduelme Aug 8, 2026
8a7ca9c
Fix #4077
hduelme Aug 9, 2026
46d4090
Add #4081 test
hduelme Aug 9, 2026
29622b0
Add test for simple build in functions
hduelme Aug 14, 2026
2b33929
improve detection of nullability for parameters
hduelme Aug 14, 2026
3a0cf04
add headers
hduelme Aug 15, 2026
c4294a8
checkstyle
hduelme Aug 15, 2026
624b846
checkstyle
hduelme Aug 15, 2026
3623017
add missing package-info
hduelme Aug 15, 2026
c658b25
add joda time tests
hduelme Aug 16, 2026
02f18dd
type conversion needsParameterNullCheck depends on source Nullability
hduelme Aug 17, 2026
96ea933
TypeConversion getSourceNullability must be passed down
hduelme Aug 17, 2026
aa74da2
move source to other part for SetterWrapper if nullCheck needed
hduelme Aug 17, 2026
3c99ef5
no assertions yet. MapStruct does not support this kind of classloading
hduelme Aug 23, 2026
74b1df5
support null safe 2-step mapping
hduelme Aug 26, 2026
cb1f4ce
continue JspecifyBuildInTest
hduelme Aug 26, 2026
1018dc6
format
hduelme Aug 26, 2026
7f92336
continue JspecifyBuildInTest
hduelme Aug 26, 2026
30829ae
continue JspecifyBuildInTest
hduelme Aug 26, 2026
5b5b64b
ensure returnTypeNullabilty is considered in List<>
hduelme Aug 27, 2026
20fc814
continue JspecifyBuildInTest
hduelme Aug 27, 2026
5c3af51
continue JspecifyBuildInTest
hduelme Aug 27, 2026
42d415f
improve NullabilityResolver
hduelme Aug 27, 2026
36def80
add JSpecify scope annotations
hduelme Aug 27, 2026
4ec1527
move NullabilityChaining to AbstractReference
hduelme Sep 5, 2026
553151d
add JSpecify annotations to generatedCode
hduelme Sep 5, 2026
b79ca1f
SetterWrapper don't have a Nullability as it is a finalizing method
hduelme Sep 6, 2026
c413c1d
remove leftover todo
hduelme Sep 6, 2026
13295f0
fix eclipse package resolve error by disabling JSpecify
hduelme Sep 6, 2026
e851226
add JSpecifyAnnotationMethodeMapper test
hduelme Sep 6, 2026
d17b232
add JSpecifyAnnotationScopeMethodeMapper test
hduelme Sep 6, 2026
1bb5e99
add JSpecifyAnnotationScopeIgnoredMapper tests
hduelme Sep 6, 2026
a53c2f4
add JSpecifyAnnotationIgnoredMapper tests
hduelme Sep 6, 2026
96dddd6
add nullUmarked tests
hduelme Sep 6, 2026
b752d86
add nullUmarked tests
hduelme Sep 6, 2026
d4992c1
add licence
hduelme Sep 6, 2026
c483c20
format
hduelme Sep 6, 2026
4c728ca
add array support for nullability
hduelme Sep 6, 2026
f353989
added direct type annotation as inner classes need them
hduelme Sep 9, 2026
31e8443
ensure nullability cause is correct
hduelme Sep 9, 2026
5307d92
add nullability test for inner classes as parameter
hduelme Sep 9, 2026
13be87b
fix types with packages
hduelme Sep 12, 2026
cb8df0c
add test with Jspecify for 1425 (failed in tests)
hduelme Sep 12, 2026
0cb1957
add name collision test
hduelme Sep 12, 2026
de94e1f
add Jspecify test for nested classes deeper than 2 level
hduelme Sep 12, 2026
7914e07
format
hduelme Sep 12, 2026
a527e56
exclude java 8 incompatible JSpecify tests
hduelme Sep 12, 2026
781fa48
implement toString for Nullability
hduelme Sep 12, 2026
14e08fd
disable more tests due to jvm bugs
hduelme Sep 12, 2026
293da97
format
hduelme Sep 12, 2026
8ce8a39
add NullMarked module test
hduelme Sep 12, 2026
7d0d613
consider primitive as return type
hduelme Sep 12, 2026
8d81b8e
add test for two-step mapping with primitive return type
hduelme Sep 12, 2026
6cd7f81
reuse parameters for NullSafe2StepMappingMethode
hduelme Sep 12, 2026
af08385
reuse parameters nullability for NullSafe2StepMappingMethode
hduelme Sep 12, 2026
b199674
format
hduelme Sep 12, 2026
1a76add
set nullability debending on is return type default
hduelme Sep 13, 2026
1b5ab91
add TypeInstance
hduelme Sep 13, 2026
21adafe
add nullability for ValueMapping
hduelme Sep 13, 2026
56ebd28
format
hduelme Sep 13, 2026
6e2a247
format
hduelme Sep 13, 2026
b7c4c57
add missing Test
hduelme Sep 13, 2026
f0d9923
remove useless comments
hduelme Sep 13, 2026
814343f
better comments
hduelme Sep 13, 2026
4892bdd
fix naming
hduelme Sep 13, 2026
e3a7c71
move NullMarked to class level
hduelme Sep 13, 2026
bbd8698
fix tests
hduelme Sep 13, 2026
552dc03
fix tests
hduelme Sep 13, 2026
f993d13
consider bean default value for nullability
hduelme Sep 13, 2026
259d73c
fix scope leakage
hduelme Sep 13, 2026
260c366
fix typo
hduelme Sep 13, 2026
1e8f45e
add tests to ensure collections respect RETURN_DEFAULT
hduelme Sep 13, 2026
aace619
collections mapping now respects needsParameterNullCheck
hduelme Sep 13, 2026
31e6b17
remove leftover.
hduelme Sep 13, 2026
f0c1878
ContainerMappingMethod now uses withIsReturnDefault
hduelme Sep 13, 2026
b5e165f
format
hduelme Sep 13, 2026
67f9a20
implement NullSafe2StepMappingMethode for methode -> method
hduelme Sep 14, 2026
c8e8f55
add tests for NullSafe2StepMappingMethode for methode -> method
hduelme Sep 14, 2026
86d8513
fix primitive return type nullability in ForgedMethod
hduelme Sep 15, 2026
91b2f1f
fix 2 null-checks needed
hduelme Sep 15, 2026
37c6c92
fix position of handleSourceReferenceNullCheck in SetterWrapperOuter
hduelme Sep 15, 2026
012e40f
simplify by removing SetterWrapperOuter
hduelme Sep 15, 2026
af4072d
typo
hduelme Sep 15, 2026
acd5154
typos
hduelme Sep 15, 2026
5883eb8
remove getConstructorParameter
hduelme Sep 15, 2026
4bb2c91
remove getRecordElementNullability
hduelme Sep 15, 2026
f2ab208
format
hduelme Sep 15, 2026
fcbb88b
resolve no longer valid todos
hduelme Sep 17, 2026
6b92e11
add missing license header
hduelme Sep 17, 2026
09c380d
remove todo
hduelme Sep 17, 2026
5614765
typo
hduelme Sep 17, 2026
f242e5f
make it clear what o -> false means
hduelme Sep 17, 2026
a2607e4
add explanation to todos
hduelme Sep 17, 2026
b743373
fix beanMapping without null check
hduelme Sep 17, 2026
509aeec
add support for auxiliary parameter nullability
hduelme Sep 17, 2026
8e2a5b6
algin tests
hduelme Sep 17, 2026
07705e8
algin tests
hduelme Sep 17, 2026
528220b
improve docs in Nullability
hduelme Sep 18, 2026
a54bc98
improve docs in Nullability
hduelme Sep 18, 2026
fa61e08
improve docs on Assignment
hduelme Sep 18, 2026
4bf0802
revert not needed changes
hduelme Sep 18, 2026
b37f622
inline resolveNullMarked
hduelme Sep 18, 2026
a807ae2
prevent npe in method chaining
hduelme Sep 19, 2026
38222f9
prevent adding null in MappingMethod
hduelme Sep 19, 2026
eb74183
style fixes
hduelme Sep 19, 2026
2054547
remove duplicated parameter
hduelme Sep 19, 2026
92d11ca
improve doc
hduelme Sep 19, 2026
b67eceb
improve doc
hduelme Sep 19, 2026
36108ba
improve usage of GeneratedSource in tests
hduelme Sep 19, 2026
9b8f076
remove null check from XmlGregorianCalendarToLocalDate
hduelme Sep 19, 2026
087e5ad
remove resolved todos
hduelme Sep 19, 2026
4f50f4b
add docs
hduelme Sep 19, 2026
d6440ba
ensure collection direct mapping is null checked if needed
hduelme Sep 19, 2026
87267ce
remove old todos
hduelme Sep 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert not needed changes
  • Loading branch information
hduelme committed Sep 18, 2026
commit 4bf080280ddced80fb1a2cc3aa3ce07926d43cd4
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,18 @@ private Assignment forge( ) {
Type sourceType = rightHandSide.getSourceType();
if ( ( sourceType.isCollectionType() || sourceType.isArrayType()) && targetType.isIterableType()
|| ( sourceType.isIterableType() && targetType.isCollectionType() ) ) {
assignment = forgeIterableMapping( sourceType, rightHandSide );
assignment = forgeIterableMapping( sourceType, targetType, rightHandSide );
}
else if ( sourceType.isMapType() && targetType.isMapType() ) {
assignment = forgeMapMapping( sourceType, rightHandSide );
assignment = forgeMapMapping( sourceType, targetType, rightHandSide );
}
else if ( sourceType.isMapType() && !targetType.isMapType() ) {
assignment = forgeMapping( sourceType, targetType.withoutBounds(), rightHandSide );
}
else if ( ( sourceType.isIterableType() && targetType.isStreamType() )
|| ( sourceType.isStreamType() && targetType.isStreamType() )
|| ( sourceType.isStreamType() && targetType.isIterableType() ) ) {
assignment = forgeStreamMapping( sourceType, rightHandSide );
assignment = forgeStreamMapping( sourceType, targetType, rightHandSide );
}
else {
assignment = forgeMapping( rightHandSide );
Expand Down Expand Up @@ -931,23 +931,23 @@ private PresenceCheck getSourcePresenceCheckerRef(SourceReference sourceReferenc
return sourcePresenceChecker;
}

private Assignment forgeStreamMapping(Type sourceType, SourceRHS source) {
private Assignment forgeStreamMapping(Type sourceType, Type targetType, SourceRHS source) {

StreamMappingMethod.Builder builder = new StreamMappingMethod.Builder();
return forgeWithElementMapping( sourceType, source, builder );
return forgeWithElementMapping( sourceType, targetType, source, builder );
}

private Assignment forgeIterableMapping(Type sourceType, SourceRHS source) {
private Assignment forgeIterableMapping(Type sourceType, Type targetType, SourceRHS source) {

IterableMappingMethod.Builder builder = new IterableMappingMethod.Builder();
return forgeWithElementMapping( sourceType, source, builder );
return forgeWithElementMapping( sourceType, targetType, source, builder );
}

private Assignment forgeWithElementMapping(Type sourceType, SourceRHS source,
private Assignment forgeWithElementMapping(Type sourceType, Type targetType, SourceRHS source,
ContainerMappingMethodBuilder<?, ? extends ContainerMappingMethod> builder) {
sourceType = sourceType.replaceSuperBoundWith( targetType, ctx.getTypeFactory().getType( Object.class ) );
Type targetType1 = targetType.withoutBounds();
ForgedMethod methodRef = prepareForgedMethod( sourceType, targetType1,
targetType = targetType.withoutBounds();
ForgedMethod methodRef = prepareForgedMethod( sourceType, targetType,
targetWriteAccessor.getNullability(), source, "[]",
mappingMethodOptions -> mappingMethodOptions.getIterableMapping()
.getNullValueMappingStrategy()
Expand Down Expand Up @@ -978,10 +978,10 @@ private ForgedMethod prepareForgedMethod(Type sourceType, Type targetType, Nulla
method, forgedMethodHistory, forgedNamedBased, returnDefaultValue );
}

private Assignment forgeMapMapping(Type sourceType, SourceRHS source) {
private Assignment forgeMapMapping(Type sourceType, Type targetType, SourceRHS source) {

Type targetType1 = targetType.withoutBounds();
ForgedMethod methodRef = prepareForgedMethod( sourceType, targetType1, targetWriteAccessor.getNullability(),
targetType = targetType.withoutBounds();
ForgedMethod methodRef = prepareForgedMethod( sourceType, targetType, targetWriteAccessor.getNullability(),
source, "{}",
mappingMethodOptions -> mappingMethodOptions.getMapMapping()
.getNullValueMappingStrategy().isReturnDefault() );
Expand Down