Skip to content

Commit 1059dc7

Browse files
authored
Merge pull request #67 from onixbyte/feature/deprecate-reflect-map-util
feat: deprecate reflect map util
2 parents 579a2e2 + fad6916 commit 1059dc7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

map-util-unsafe/src/main/java/com/onixbyte/devkit/utils/unsafe/ReflectMapUtil.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@
3333
* as maps for serialization, deserialization, or other purposes, and where the structure of the
3434
* objects is not known at compile time.
3535
* </p>
36-
*
36+
*
3737
* <p><b>Example usage:</b></p>
3838
* <pre>
3939
* {@code
4040
* public class User {
4141
* private String name;
4242
* private int age;
43-
*
43+
*
4444
* // getters and setters
4545
* }
46-
*
46+
*
4747
* public class Example {
4848
* public static void main(String[] args) throws IllegalAccessException {
4949
* User user = new User();
5050
* user.setName("John");
5151
* user.setAge(30);
52-
*
52+
*
5353
* // Convert object to map
5454
* Map<String, Object> userMap = ReflectMapUtil.objectToMap(user);
5555
* System.out.println(userMap); // Output: {name=John, age=30}
56-
*
56+
*
5757
* // Convert map to object
5858
* User newUser = ReflectMapUtil.mapToObject(userMap, User.class);
5959
* System.out.println(newUser.getName()); // Output: John
@@ -66,7 +66,10 @@
6666
* @author zihluwang
6767
* @version 1.4.2
6868
* @since 1.4.2
69+
* @deprecated This utility class is no longer maintained and will be removed in a future release. If you still need to
70+
* use {@link ReflectMapUtil}, please stick to the last available version (2.2.0).
6971
*/
72+
@Deprecated(forRemoval = true, since = "2.2.0")
7073
public final class ReflectMapUtil {
7174

7275
private final static Logger log = LoggerFactory.getLogger(ReflectMapUtil.class);

0 commit comments

Comments
 (0)