firmianaQ opened a new issue, #81:
URL: https://github.com/apache/dubbo-hessian-lite/issues/81

   hessian-lite版本:4.0.3
   jdk: 17
   
   ```
   public enum Gender {
       MALE, FEMALE
   }
   
   public record TestObj(List<InnerObj> list) implements Serializable {
       @Serial
       private static final long serialVersionUID = -6780365630900672593L;
   
       public static class InnerObj implements Serializable {
           @Serial
           private static final long serialVersionUID = 539682147868492463L;
   
           private String str;
           private Gender gender;
   
           public InnerObj() {
           }
   
           public String getStr() {
               return this.str;
           }
   
           public Gender getGender() {
               return this.gender;
           }
   
           public InnerObj setStr(String str) {
               this.str = str;
               return this;
           }
   
           public InnerObj setGender(Gender gender) {
               this.gender = gender;
               return this;
           }
   
           public boolean equals(final Object o) {
               if (o == this) return true;
               if (!(o instanceof InnerObj)) return false;
               final InnerObj other = (InnerObj) o;
               if (!other.canEqual((Object) this)) return false;
               final Object this$str = this.getStr();
               final Object other$str = other.getStr();
               if (this$str == null ? other$str != null : 
!this$str.equals(other$str)) return false;
               final Object this$gender = this.getGender();
               final Object other$gender = other.getGender();
               if (this$gender == null ? other$gender != null : 
!this$gender.equals(other$gender)) return false;
               return true;
           }
   
           protected boolean canEqual(final Object other) {
               return other instanceof InnerObj;
           }
   
           public int hashCode() {
               final int PRIME = 59;
               int result = 1;
               final Object $str = this.getStr();
               result = result * PRIME + ($str == null ? 43 : $str.hashCode());
               final Object $gender = this.getGender();
               result = result * PRIME + ($gender == null ? 43 : 
$gender.hashCode());
               return result;
           }
   
           public String toString() {
               return "TestObj.InnerObj(str=" + this.getStr() + ", gender=" + 
this.getGender() + ")";
           }
       }
   }
   @Test
   public void test() throws IOException {
       List<TestObj.InnerObj> list = new ArrayList<>();
       list.add(new TestObj.InnerObj().setStr("1").setGender(Gender.MALE));
       list.add(new TestObj.InnerObj().setStr("2").setGender(Gender.MALE));
       TestObj obj = new TestObj(list);
       Assertions.assertEquals(obj, baseHessian2Serialize(obj));
   }
   
   ```
   
   
![Image](https://github.com/user-attachments/assets/ca7905cc-70e8-4914-b982-bb6cbd1fd8fd)
   


-- 
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]

Reply via email to