You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "zjpjohn (via GitHub)" <gi...@apache.org> on 2024/07/26 16:00:31 UTC
[I] Enum with abstract method throw java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization. [fury]
zjpjohn opened a new issue, #1764:
URL: https://github.com/apache/fury/issues/1764
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/fury/issues) and found no similar issues.
### Version
0.6.0
### Component(s)
Java
### Minimal reproduce step
@Getter
@AllArgsConstructor
public enum Gender {
FEMALE(1, "女") {
@Override
public void operate() {
System.out.println(this.description());
}
},
MALE(2, "男") {
@Override
public void operate() {
System.out.println(this.description());
}
};
private final Integer gender;
private final String name;
public Integer value() {
return this.gender;
}
public String description() {
return this.name;
}
public abstract void operate();
}
@Slf4j
@Data
@NoArgsConstructor
public class UserInfoDo {
private Long userId;
private String nickname;
private String phone;
private Gender gender;
public UserInfoDo(String nickname, String phone) {
this.nickname = nickname;
this.phone = phone;
this.gender = Gender.MALE;
}
public UserInfoDo(Long userId, String nickname, String phone) {
this.userId = userId;
this.nickname = nickname;
this.phone = phone;
this.gender = Gender.MALE;
}
public static void main(String[] args) {
UserInfoDo userInfo = new UserInfoDo("张三", "13312344321");
Fury fury = Fury.builder().withLanguage(Language.JAVA).requireClassRegistration(false).build();
byte[] serialize = fury.serialize(userInfo);
UserInfoDo deserialize = (UserInfoDo)fury.deserialize(serialize);
System.out.println(deserialize.getNickname());
}
}
### What did you expect to see?
java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization.
### What did you see instead?
0.5.1 version is ok, but version 0.6.0 is UnsupportedOperationException
### Anything Else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
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: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Enum with abstract method throw java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization. [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1764:
URL: https://github.com/apache/fury/issues/1764#issuecomment-2253091725
Hi @zjpjohn , thanks for reporting this bug, I fixed in https://github.com/apache/fury/pull/1765.
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Enum with abstract method throw java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization. [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1764: Enum with abstract method throw java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization.
URL: https://github.com/apache/fury/issues/1764
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Enum with abstract method throw java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization. [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1764: Enum with abstract method throw java.lang.UnsupportedOperationException: Class class com.cloud.thales.infrast.persist.Gender doesn't support serialization.
URL: https://github.com/apache/fury/issues/1764
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org