zrlw opened a new issue, #83:
URL: https://github.com/apache/dubbo-hessian-lite/issues/83
Current Dubbo 3.3 take back `hessian` as the default serialization protocol
because `fastjson2` still has many problems need to be fixed.
so dubbo-hessian-lite need to be continuously maintained by
1. Bugfix.
2. Optimization.
There are many ```Class.forName``` and ```getDeclaredMethod``` reflection
codes in dubbo-hessian-lite serialiazation handlers which were designed to meet
JDK 6 compilation requirement, e.g., ```LocalDateHandle```.
```
public LocalDateHandle(Object o) {
try {
Class c = Class.forName("java.time.LocalDate"); // LocalDate
was introduced since JDK 8, it's not existed in JDK 6.
Method m = c.getDeclaredMethod("getYear");
this.year = (Integer) m.invoke(o);
...
```
Since current Dubbo 3.3 needs JDK 8+, these codes might be refacted by
calling java.time.LocalDate directly.
```
public LocalDateHandle(Object o) {
try {
java.time.LocalDate localDate = (java.time.LocalDate) o;
this.year = localDate.getYear();
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]