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 2020/07/19 02:47:52 UTC

[GitHub] [dubbo-go-hessian2] willson-chen opened a new pull request #212: Feature java8 time

willson-chen opened a new pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**: Add java8.time support
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #193 
   
   **Special notes for your reviewer**:
   
   Only part of java8.time classes are supported now. Please review our framework of impelement. And we will coding for the reset classes asap if this PR is merged.
   
   * [ ] java.time.OffsetDateTime
   
   * [ ] java.time.ZoneOffset
   
   * [ ] java.time.OffsetTime
   
   * [ ] java.time.ZoneDateTime
   
   * [x] java.time.Year
   
   * [ ] java.time.YearMonth
   
   * [x] java.time.MonthDay
   
   * [x] java.time.Instant
   
   * [x] java.time.Duration
   
   * [ ] java.time.Period
   
   * [x] java.time.LocalTime
   
   * [x] java.time.LocalDate
   
   * [x] java.time.LocalDateTime
   
   * [ ] java.sql.Date
   
   * [ ] java.sql.Time
   
   * [ ] java.sql.Timestamp


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

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-go-hessian2] willson-chen commented on pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
willson-chen commented on pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212#issuecomment-667673887


   Hi, thank you maintainers for your review. We will add the rest types soon.


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

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-go-hessian2] willson-chen commented on a change in pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
willson-chen commented on a change in pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212#discussion_r462436148



##########
File path: test_hessian/src/main/java/test/TestJava8Time.java
##########
@@ -0,0 +1,73 @@
+package test;

Review comment:
       Done




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

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-go-hessian2] willson-chen commented on a change in pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
willson-chen commented on a change in pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212#discussion_r461641558



##########
File path: test_hessian/src/main/java/test/TestJava8Time.java
##########
@@ -0,0 +1,73 @@
+package test;

Review comment:
       Agree

##########
File path: java8_time/year.go
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package java8_time
+
+type Year struct {
+	Year int32 `hessian:"year"`
+}
+
+func (Year) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.java8.YearHandle"

Review comment:
       Hi @wongoo, sorry, we can not fully understand these questions.
   
   > 1. is it only support the https://github.com/apache/dubbo-hessian-lite?
   
   Yes, we implemented these code by following the dubbo-hessian-lite.
   
   > 2. is there some dubbo users use some other hessian libraries? Yes, as I know.
   
   Could you please offer the libraries names?
   
   > 3. should we support class name java.time.Year at the same time?
   
   When shall we use `java.time.Year` instead of `com.alibaba.com.caucho.hessian.io.java8.YearHandle`?




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

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-go-hessian2] codecov-commenter commented on pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212#issuecomment-665387457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=h1) Report
   > Merging [#212](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=desc) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/caa228feb6ba0e6d168d0d9a24875ec3d549365d&el=desc) will **increase** coverage by `0.11%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #212      +/-   ##
   ==========================================
   + Coverage   66.73%   66.85%   +0.11%     
   ==========================================
     Files          23       24       +1     
     Lines        2883     2893      +10     
   ==========================================
   + Hits         1924     1934      +10     
     Misses        744      744              
     Partials      215      215              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [java8\_time.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212/diff?src=pr&el=tree#diff-amF2YThfdGltZS5nbw==) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=footer). Last update [caa228f...70ee9e3](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/212?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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-go-hessian2] wongoo commented on a change in pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212#discussion_r461991166



##########
File path: java8_time/year.go
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package java8_time
+
+type Year struct {
+	Year int32 `hessian:"year"`
+}
+
+func (Year) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.java8.YearHandle"

Review comment:
       some companies use the original hessian java library,  if u insist it's only for dubbo-hessian-lite, then no problems.

##########
File path: test_hessian/src/main/java/test/TestJava8Time.java
##########
@@ -0,0 +1,73 @@
+package test;

Review comment:
       agree, but pls add license for this file first




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

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-go-hessian2] AlexStocks merged pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212


   


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

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-go-hessian2] zouyx commented on a change in pull request #212: Feature java8 time

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #212:
URL: https://github.com/apache/dubbo-go-hessian2/pull/212#discussion_r461279728



##########
File path: test_hessian/src/main/java/test/TestJava8Time.java
##########
@@ -0,0 +1,73 @@
+package test;

Review comment:
       i think should add `.java` file to license checker.




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

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