smalltalkhyb opened a new issue, #14770:
URL: https://github.com/apache/dubbo/issues/14770

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo-3.3.1 
   
   ### Steps to reproduce this issue
   
   ### OpenIdQueryRequest
   `import com.fasterxml.jackson.annotation.JsonProperty;
   import com.fasterxml.jackson.annotation.JsonTypeName;
   import io.swagger.v3.oas.annotations.media.Schema;
   import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
   import java.io.Serializable;
   import java.util.Objects;
   import lombok.Generated;
   
   @Schema(
       name = "openIdQueryRequest",
       description = "用户查询-入参"
   )
   @JsonTypeName("openIdQueryRequest")
   public class OpenIdQueryRequest implements Serializable {
       private static final long serialVersionUID = 1L;
       private Integer identityType;
       private String openId;
       private Integer bussCode;
   
       public OpenIdQueryRequest identityType(Integer identityType) {
           this.identityType = identityType;
           return this;
       }
   
       @Schema(
           name = "identityType",
           description = "身份类型 1.乘客 2.司机 3.运营商 4.出租车司机",
           requiredMode = RequiredMode.NOT_REQUIRED
       )
       @JsonProperty("identityType")
       public Integer getIdentityType() {
           return this.identityType;
       }
   
       public void setIdentityType(Integer identityType) {
           this.identityType = identityType;
       }
   
       public OpenIdQueryRequest openId(String openId) {
           this.openId = openId;
           return this;
       }
   
       @Schema(
           name = "openId",
           description = "三方openId (必填)",
           requiredMode = RequiredMode.NOT_REQUIRED
       )
       @JsonProperty("openId")
       public String getOpenId() {
           return this.openId;
       }
   
       public void setOpenId(String openId) {
           this.openId = openId;
       }
   
       public OpenIdQueryRequest bussCode(Integer bussCode) {
           this.bussCode = bussCode;
           return this;
       }
   
       @Schema(
           name = "bussCode",
           description = "三方的业务编码 1.智享盒子小程序 2.智行出租(出租车乘客小程序) 3.商业化微信小程序 
10.乘客支付宝小程序  20001.出租车乘客支付宝demo1",
           requiredMode = RequiredMode.NOT_REQUIRED
       )
       @JsonProperty("bussCode")
       public Integer getBussCode() {
           return this.bussCode;
       }
   
       public void setBussCode(Integer bussCode) {
           this.bussCode = bussCode;
       }
   
       public boolean equals(Object o) {
           if (this == o) {
               return true;
           } else if (o != null && this.getClass() == o.getClass()) {
               OpenIdQueryRequest openIdQueryRequest = (OpenIdQueryRequest)o;
               return Objects.equals(this.identityType, 
openIdQueryRequest.identityType) && Objects.equals(this.openId, 
openIdQueryRequest.openId) && Objects.equals(this.bussCode, 
openIdQueryRequest.bussCode);
           } else {
               return false;
           }
       }
   
       public int hashCode() {
           return Objects.hash(new Object[]{this.identityType, this.openId, 
this.bussCode});
       }
   
       public String toString() {
           StringBuilder sb = new StringBuilder();
           sb.append("class OpenIdQueryRequest {\n");
           sb.append("    identityType: 
").append(this.toIndentedString(this.identityType)).append("\n");
           sb.append("    openId: 
").append(this.toIndentedString(this.openId)).append("\n");
           sb.append("    bussCode: 
").append(this.toIndentedString(this.bussCode)).append("\n");
           sb.append("}");
           return sb.toString();
       }
   
       private String toIndentedString(Object o) {
           return o == null ? "null" : o.toString().replace("\n", "\n    ");
       }
   
       @Generated
       public static OpenIdQueryRequestBuilder builder() {
           return new OpenIdQueryRequestBuilder();
       }
   
       @Generated
       public OpenIdQueryRequest(Integer identityType, String openId, Integer 
bussCode) {
           this.identityType = identityType;
           this.openId = openId;
           this.bussCode = bussCode;
       }
   
       @Generated
       public OpenIdQueryRequest() {
       }
   
       @Generated
       public static class OpenIdQueryRequestBuilder {
           @Generated
           private Integer identityType;
           @Generated
           private String openId;
           @Generated
           private Integer bussCode;
   
           @Generated
           OpenIdQueryRequestBuilder() {
           }
   
           @Generated
           public OpenIdQueryRequestBuilder identityType(Integer identityType) {
               this.identityType = identityType;
               return this;
           }
   
           @Generated
           public OpenIdQueryRequestBuilder openId(String openId) {
               this.openId = openId;
               return this;
           }
   
           @Generated
           public OpenIdQueryRequestBuilder bussCode(Integer bussCode) {
               this.bussCode = bussCode;
               return this;
           }
   
           @Generated
           public OpenIdQueryRequest build() {
               return new OpenIdQueryRequest(this.identityType, this.openId, 
this.bussCode);
           }
   
           @Generated
           public String toString() {
               return 
"OpenIdQueryRequest.OpenIdQueryRequestBuilder(identityType=" + 
this.identityType + ", openId=" + this.openId + ", bussCode=" + this.bussCode + 
")";
           }
       }
   }`
   
   
   ### Test
   
   `public class TestMain {
   
   
       public static void main(String[] args) {
   
   
           OpenIdQueryRequest openIdQueryRequest=new OpenIdQueryRequest();
   
   
           JSONB.parseObject(
                   JSONB.toBytes(
                           openIdQueryRequest,
                           JSONWriter.Feature.WriteClassName,
                           JSONWriter.Feature.FieldBased,
                           JSONWriter.Feature.ErrorOnNoneSerializable,
                           JSONWriter.Feature.ReferenceDetection,
                           JSONWriter.Feature.WriteNulls,
                           JSONWriter.Feature.NotWriteDefaultValue,
                           JSONWriter.Feature.NotWriteHashMapArrayListClassName,
                           JSONWriter.Feature.WriteNameAsSymbol),
                   OpenIdQueryRequest.class,
                   new ContextAutoTypeBeforeHandler(true),
                   JSONReader.Feature.UseDefaultConstructorAsPossible,
                   JSONReader.Feature.ErrorOnNoneSerializable,
                   JSONReader.Feature.IgnoreAutoTypeNotMatch,
                   JSONReader.Feature.UseNativeObject,
                   JSONReader.Feature.FieldBased);
   
       }
   }`
   
   ### Error  
   
   Exception in thread "main" java.lang.NullPointerException
        at java.base/java.lang.Class.isAssignableFrom(Native Method)
        at 
com.alibaba.fastjson2.reader.ObjectReaderBean.checkAutoType0(ObjectReaderBean.java:182)
        at 
com.alibaba.fastjson2.reader.ObjectReaderBean.checkAutoType(ObjectReaderBean.java:165)
        at 
com.alibaba.fastjson2.reader.ORG_1_3_OpenIdQueryRequest.readJSONBObject(Unknown 
Source)
        at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:540)
        at cn.itbox.user.api.service.TestMain.main(TestMain.java:27)
   
   
   
   ### What you expected to happen
   
   none  Exception
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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