Skip to content

Commit e2b3b2d

Browse files
committed
#232: Keep the order of adding public write accessors as before
1 parent 458258c commit e2b3b2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/mapstruct/intellij/util/TargetUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ public static Map<String, Pair<? extends PsiElement, PsiSubstitutor>> publicWrit
113113
TargetType targetType = classAndType.getSecond();
114114
PsiType typeToUse = targetType.type();
115115

116-
if ( mapStructVersion.isConstructorSupported() && !targetType.builder() ) {
117-
publicWriteAccessors.putAll( constructorParameters( psiClass ) );
118-
}
119-
120116
if ( !psiClass.isRecord() ) {
121117
publicWriteAccessors.putAll( publicSetters( psiClass, typeToUse, mapstructUtil, builderPresent ) );
122118
publicWriteAccessors.putAll( publicFields( psiClass ) );
123119
}
124120

121+
if ( mapStructVersion.isConstructorSupported() && !targetType.builder() ) {
122+
publicWriteAccessors.putAll( constructorParameters( psiClass ) );
123+
}
124+
125125
return publicWriteAccessors;
126126
}
127127

0 commit comments

Comments
 (0)