You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/09/16 02:27:10 UTC

[GitHub] [dubbo] wuwen5 opened a new issue, #10631: The generalized call does not support the serialization and deserialization of LocalTime, LocalDate & LocalDateTime

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

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 2.7.x,3.x
   * Operating System version: xxx
   * Java version: xxx
   
   ### Steps to reproduce this issue
   
   ```java
   
   @Bean
   public GenericService testApi() {
       ReferenceConfig<GenericService> config = new ReferenceConfig<>();
       config.setInterface("com.xxx.TestApi");
       config.setGeneric("true");
       //...
       return config.get()
   }
   
   
   @Autowired
   private TestApi testApi;
   
   @Test
   void testLocaDateTime() {
       Person obj = testApi.testApiQueryMethod();
   }
   ```
   ![image](https://user-images.githubusercontent.com/5037807/190542582-6c39ebe5-b1bc-41d6-bf2c-ac2bb5155db0.png)
   
   Unit testing for reproducible problems
   ```java
       @Test
       public void testJava8Time() {
           
           Object localDateTimeGen = PojoUtils.generalize(LocalDateTime.now());
           Object localDateTime = PojoUtils.realize(localDateTimeGen, LocalDateTime.class);
           assertEquals(localDateTimeGen, localDateTime.toString());
   
           Object localDateGen = PojoUtils.generalize(LocalDate.now());
           Object localDate = PojoUtils.realize(localDateGen, LocalDate.class);
           assertEquals(localDateGen, localDate.toString());
   
           Object localTimeGen = PojoUtils.generalize(LocalTime.now());
           Object localTime = PojoUtils.realize(localTimeGen, LocalTime.class);
           assertEquals(localTimeGen, localTime.toString());
       }
   ```
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   
   ```
   Just put your stack trace here!
   ```
   


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ closed issue #10631: The generalized call does not support the serialization and deserialization of LocalTime, LocalDate & LocalDateTime

Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #10631: The generalized call does not support the serialization and deserialization of LocalTime, LocalDate & LocalDateTime
URL: https://github.com/apache/dubbo/issues/10631


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org