Skip to content

Commit

Permalink
mapstruct#3638 Remove deprecation note of enum mapping via @mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderhook authored and filiphr committed Jul 25, 2024
1 parent 0f24633 commit 81ca739
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
5 changes: 1 addition & 4 deletions core/src/main/java/org/mapstruct/Mapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import static org.mapstruct.NullValueCheckStrategy.ON_IMPLICIT_CONVERSION;

/**
* Configures the mapping of one bean attribute or enum constant.
* Configures the mapping of one bean attribute.
* <p>
* The name of the mapped attribute or constant is to be specified via {@link #target()}. For mapped bean attributes it
* is assumed by default that the attribute has the same name in the source bean. Alternatively, one of
Expand Down Expand Up @@ -136,9 +136,6 @@
* }
* </code></pre>
*
* <b>IMPORTANT NOTE:</b> the enum mapping capability is deprecated and replaced by {@link ValueMapping} it
* will be removed in subsequent versions.
*
* @author Gunnar Morling
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,6 @@ public class SpecialOrderMapperImpl implements SpecialOrderMapper {
----
====


[WARNING]
====
The mapping of enum to enum via the `@Mapping` annotation is *DEPRECATED*. It will be removed from future versions of MapStruct. Please adapt existing enum mapping methods to make use of `@ValueMapping` instead.
====

=== Mapping enum-to-String or String-to-enum

MapStruct supports enum to a String mapping along the same lines as is described in <<Mapping enum to enum types, enum-to-enum types>>. There are similarities and differences:
Expand Down

0 comments on commit 81ca739

Please sign in to comment.