You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/08/24 13:51:09 UTC
[GitHub] [servicecomb-java-chassis] develpoerX opened a new pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
develpoerX opened a new pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
---
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#discussion_r695327204
##########
File path: foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerResponseToHttpServletResponse.java
##########
@@ -346,6 +346,12 @@ public void sendPart_openInputStreamFailed(@Mocked Part part)
future.get();
}
+ @Test
+ public void sendPart_testPartIsNull(@Mocked Part part) throws InterruptedException, ExecutionException {
+ CompletableFuture<Void> future1 = response.sendPart(null);
+ Assert.assertNull(future1.get());
+ }
+
Review comment:
add an integration test case in demo.
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#discussion_r700114077
##########
File path: foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerResponseToHttpServletResponse.java
##########
@@ -346,6 +346,12 @@ public void sendPart_openInputStreamFailed(@Mocked Part part)
future.get();
}
+ @Test
+ public void sendPart_testPartIsNull(@Mocked Part part) throws InterruptedException, ExecutionException {
+ CompletableFuture<Void> future1 = response.sendPart(null);
+ Assert.assertNull(future1.get());
+ }
+
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.
To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] develpoerX commented on a change in pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
develpoerX commented on a change in pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#discussion_r696217361
##########
File path: foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/StandardHttpServletResponseEx.java
##########
@@ -104,6 +104,12 @@ public Object getAttribute(String key) {
@Override
public CompletableFuture<Void> sendPart(Part part) {
+ if (part == null) {
+ CompletableFuture<Void> defaultFuture = new CompletableFuture<>();
+ defaultFuture.complete(null);
+ return defaultFuture;
Review comment:
done
##########
File path: foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/VertxServerResponseToHttpServletResponse.java
##########
@@ -123,7 +123,11 @@ public void internalFlushBuffer() {
@Override
public CompletableFuture<Void> sendPart(Part part) {
DownloadUtils.prepareDownloadHeader(this, part);
-
+ if (part == null) {
+ CompletableFuture<Void> future = new CompletableFuture<>();
+ future.complete(null);
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.
To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#discussion_r695326902
##########
File path: foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/StandardHttpServletResponseEx.java
##########
@@ -104,6 +104,12 @@ public Object getAttribute(String key) {
@Override
public CompletableFuture<Void> sendPart(Part part) {
+ if (part == null) {
+ CompletableFuture<Void> defaultFuture = new CompletableFuture<>();
+ defaultFuture.complete(null);
+ return defaultFuture;
Review comment:
using factory method. `return CompletableFuture.completedFuture`
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] codecov-commenter commented on pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#issuecomment-904682698
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2527](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5eac5f3) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/b61a2199f333bd2780b514f82cf003c46bc99cd7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b61a219) will **decrease** coverage by `1.56%`.
> The diff coverage is `1.79%`.
> :exclamation: Current head 5eac5f3 differs from pull request most recent head a3a81c7. Consider uploading reports for the commit a3a81c7 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2527 +/- ##
============================================
- Coverage 79.19% 77.63% -1.57%
Complexity 1419 1419
============================================
Files 1559 1597 +38
Lines 41574 42415 +841
Branches 3470 3571 +101
============================================
+ Hits 32926 32930 +4
- Misses 7158 7993 +835
- Partials 1490 1492 +2
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `44.23% <0.00%> (-2.71%)` | :arrow_down: |
| [...tion/vertx/http/StandardHttpServletResponseEx.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi12ZXJ0eC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZm91bmRhdGlvbi92ZXJ0eC9odHRwL1N0YW5kYXJkSHR0cFNlcnZsZXRSZXNwb25zZUV4LmphdmE=) | `77.14% <0.00%> (-9.96%)` | :arrow_down: |
| [.../apache/servicecomb/darklaunch/DarklaunchRule.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...che/servicecomb/darklaunch/DarklaunchRuleItem.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVJdGVtLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...servicecomb/darklaunch/DarklaunchRuleItemJson.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVJdGVtSnNvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...che/servicecomb/darklaunch/DarklaunchRuleJson.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVKc29uLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...icecomb/darklaunch/DarklaunchServerListFilter.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFNlcnZlckxpc3RGaWx0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ache/servicecomb/darklaunch/MicroserviceCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvTWljcm9zZXJ2aWNlQ2FjaGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [.../org/apache/servicecomb/darklaunch/PolicyType.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvUG9saWN5VHlwZS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...servicecomb/darklaunch/oper/AbstractCondition.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvb3Blci9BYnN0cmFjdENvbmRpdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [53 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [094119f...a3a81c7](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] codecov-commenter edited a comment on pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#issuecomment-904682698
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2527](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f84bc87) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/b61a2199f333bd2780b514f82cf003c46bc99cd7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b61a219) will **decrease** coverage by `1.56%`.
> The diff coverage is `4.39%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2527 +/- ##
============================================
- Coverage 79.19% 77.63% -1.57%
- Complexity 1419 1420 +1
============================================
Files 1559 1597 +38
Lines 41574 42443 +869
Branches 3470 3575 +105
============================================
+ Hits 32926 32949 +23
- Misses 7158 7999 +841
- Partials 1490 1495 +5
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `44.23% <0.00%> (-2.71%)` | :arrow_down: |
| [...tion/vertx/http/StandardHttpServletResponseEx.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi12ZXJ0eC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZm91bmRhdGlvbi92ZXJ0eC9odHRwL1N0YW5kYXJkSHR0cFNlcnZsZXRSZXNwb25zZUV4LmphdmE=) | `81.81% <0.00%> (-5.28%)` | :arrow_down: |
| [.../apache/servicecomb/darklaunch/DarklaunchRule.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...che/servicecomb/darklaunch/DarklaunchRuleItem.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVJdGVtLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...servicecomb/darklaunch/DarklaunchRuleItemJson.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVJdGVtSnNvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...che/servicecomb/darklaunch/DarklaunchRuleJson.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVKc29uLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...icecomb/darklaunch/DarklaunchServerListFilter.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFNlcnZlckxpc3RGaWx0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ache/servicecomb/darklaunch/MicroserviceCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvTWljcm9zZXJ2aWNlQ2FjaGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [.../org/apache/servicecomb/darklaunch/PolicyType.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvUG9saWN5VHlwZS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...servicecomb/darklaunch/oper/AbstractCondition.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvb3Blci9BYnN0cmFjdENvbmRpdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [63 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [094119f...f84bc87](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] codecov-commenter edited a comment on pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#issuecomment-904682698
# [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2527](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a3a81c7) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/b61a2199f333bd2780b514f82cf003c46bc99cd7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b61a219) will **decrease** coverage by `1.56%`.
> The diff coverage is `1.79%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2527 +/- ##
============================================
- Coverage 79.19% 77.63% -1.57%
Complexity 1419 1419
============================================
Files 1559 1597 +38
Lines 41574 42415 +841
Branches 3470 3571 +101
============================================
+ Hits 32926 32930 +4
- Misses 7158 7993 +835
- Partials 1490 1492 +2
```
| [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ecomb/config/center/client/ConfigCenterClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50cy9jb25maWctY2VudGVyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29uZmlnL2NlbnRlci9jbGllbnQvQ29uZmlnQ2VudGVyQ2xpZW50LmphdmE=) | `44.23% <0.00%> (-2.71%)` | :arrow_down: |
| [...tion/vertx/http/StandardHttpServletResponseEx.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi12ZXJ0eC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZm91bmRhdGlvbi92ZXJ0eC9odHRwL1N0YW5kYXJkSHR0cFNlcnZsZXRSZXNwb25zZUV4LmphdmE=) | `77.14% <0.00%> (-9.96%)` | :arrow_down: |
| [.../apache/servicecomb/darklaunch/DarklaunchRule.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...che/servicecomb/darklaunch/DarklaunchRuleItem.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVJdGVtLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...servicecomb/darklaunch/DarklaunchRuleItemJson.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVJdGVtSnNvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...che/servicecomb/darklaunch/DarklaunchRuleJson.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFJ1bGVKc29uLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...icecomb/darklaunch/DarklaunchServerListFilter.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvRGFya2xhdW5jaFNlcnZlckxpc3RGaWx0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ache/servicecomb/darklaunch/MicroserviceCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvTWljcm9zZXJ2aWNlQ2FjaGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [.../org/apache/servicecomb/darklaunch/PolicyType.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvUG9saWN5VHlwZS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...servicecomb/darklaunch/oper/AbstractCondition.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aHVhd2VpLWNsb3VkL2RhcmtsYXVuY2gvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2RhcmtsYXVuY2gvb3Blci9BYnN0cmFjdENvbmRpdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [53 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [094119f...a3a81c7](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2527?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2527: SCB-2319 when dowanload part is null, will throw NPE
Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2527:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2527#discussion_r695327007
##########
File path: foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/VertxServerResponseToHttpServletResponse.java
##########
@@ -123,7 +123,11 @@ public void internalFlushBuffer() {
@Override
public CompletableFuture<Void> sendPart(Part part) {
DownloadUtils.prepareDownloadHeader(this, part);
-
+ if (part == null) {
+ CompletableFuture<Void> future = new CompletableFuture<>();
+ future.complete(null);
Review comment:
using factory method. return CompletableFuture.completedFuture
--
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@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org