Commit Graph

10450 Commits

Author SHA1 Message Date
skyguard1
d334146ccd
Add default block in IdleStateHandler (#11341)
Motivation:

We should have a default case in every switch block.

Modification:

Add default block in IdleStateHandler

Result:

Cleanup

Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
2021-06-01 08:01:32 +02:00
skyguard1
a64a7eb39d
Remove useless code (#11339)
Signed-off-by: xingrufei <xingrufei@sogou-inc.com>

Co-authored-by: xingrufei <xingrufei@sogou-inc.com>
2021-05-31 15:35:42 +02:00
Frédéric Brégier
103f1d269e
HttpPostMultipartRequestDecoder IndexOutOfBoundsException error (#11335)
Motivation:

When searching for the delimiter, the decoder part within HttpPostBodyUtil
was not checking the left space to check if it could be included or not,
while it should.

Modifications:

Add a check on toRead being greater or equal than delimiterLength before
going within the loop. If the check is wrong, the delimiter is obviously not found.

Add a Junit test to preserve regression.

Result:

No more IndexOutOfBoundsException

Fixes #11334
2021-05-31 08:43:39 +02:00
wuare
fa58542417
Remove unUsed import statement (#11338)
Motivation:

Remove unused import statement

Modification:

Remove unused import statement

Result:

Cleanup
2021-05-31 08:35:14 +02:00
Norman Maurer
18e92304a7
Move sctp tests to correct directory and migrate to junit5 (#11331)
Motivation:

The sctp tests were in the incorrect directory and so were never executed. Beside this we also should use junit5

Modifications:

- Move to correct directory
- Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757 and fixes https://github.com/netty/netty/issues/11325
2021-05-28 15:03:18 +02:00
Norman Maurer
4d681bfc6f
Fix test-error which was introduced by porting tests to junit5 (#11330)
Motivation:

b89a807d15 moved the buffer tests to junit5 but introduced a small error which could lead to test-failure

Modifications:

Correctly override the method and assert that super throws (as we can not expand the buffer).

Result:

No more test failures
2021-05-28 09:26:51 +02:00
skyguard1
b7e23e2c39
Add default block in DnsOpCode (#11328)
Motivation:

Every switch block should also have a default case.

Modification:

Add default block in DnsOpCode to ensure we not fall-through by mistake

Result:

Cleanup

Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
2021-05-28 08:50:30 +02:00
skyguard1
c098b48692
Add default block in AbstractDnsMessage (#11327)
Motivation:

Every switch block should also have a default case.

Modification:

Add default block in AbstractDnsMessage to ensure we not fall-through by mistake

Result:

Cleanup

Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
2021-05-28 08:49:18 +02:00
skyguard1
cfe631ad05
Add default block in DefaultHttpHeaders (#11329)
Motivation:

Every switch block should also have a default case.

Modification:

Add default block in DefaultHttpHeaders to ensure we not fall-through by mistake

Result:

Cleanup

Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
2021-05-28 08:47:53 +02:00
Riley Park
83290c5a4b Migrate resolver-dns tests to JUnit 5 (#11326)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 19:13:42 +02:00
Riley Park
496ba801d6 Migrate transport-blockhound-tests tests to JUnit 5 (#11322)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 16:00:51 +02:00
Riley Park
0ac8835e36 Migrate testsuite-shading tests to JUnit 5 (#11323)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 15:59:49 +02:00
Riley Park
2ea670021b Migrate transport-native-unix-common tests to JUnit 5 (#11321)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 15:57:53 +02:00
Riley Park
bc7434aedb Migrate testsuite, transport-native-epoll, transport-native-kqueue, and transport-native-unix-common-tests tests to JUnit 5 (#11320)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 15:55:58 +02:00
Riley Park
b89a807d15 Migrate buffer tests to JUnit 5 (#11305)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 11:09:05 +02:00
Riley Park
ac3f823cce Migrate codec-http tests to JUnit 5 (#11316)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 09:19:33 +02:00
terrarier2111
b646a2670a
Some minor cleanups for TypeParameterMatcher (#11286)
Motivation:

The code in TypeParamterMatcher can be simplified and cleaned up.

Modification:

Cleanup

Result:

Cleanup
2021-05-27 09:02:29 +02:00
Riley Park
84826a4ea6 Migrate codec-redis tests to JUnit 5 (#11318)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 09:00:30 +02:00
Riley Park
3efd9642ca Migrate common tests to JUnit 5 (#11319)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-27 08:56:23 +02:00
wuare
a743b74bfb
Remove not needed null check (#11303)
Motivation:

throw exception if there is no method, it never is null, condition is always true

Modification:

remove unnecessary condition

Result:

cleanup
2021-05-26 15:11:27 +02:00
Riley Park
5e71336ffb Migrate codec tests to JUnit 5 (#11306)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 14:11:12 +02:00
Norman Maurer
f81149324f
Automatically use netty-tcnative-boringssl-static on windows (#11317)
Motivation:

We only release a static compiled version of netty-tcnative for windows so we need to ensure we use it when on windows and not try to use a dynamic build version.

Modifications:

Automatically renable the boringssl profile when on windows

Result:

Fixes https://github.com/netty/netty/issues/11302
2021-05-26 14:10:45 +02:00
Norman Maurer
0ff93519a4
Add builds for windows (#11284)
Motivation:

Let's also build on windows during PR validation

Modifications:

Add build on windows during PR

Result:

Validate that all also pass on windows
2021-05-26 12:12:11 +02:00
Idel Pivnitskiy
cb1b3517dc
Don't iterate through active h2-streams if lastStreamId is MAX_VALUE (#11304)
Motivation:

Incoming `Http2GoAwayFrame#lastStreamId()` tells what was the last
streamId that the remote peer takes for processing [1]. We fire a
userEvent for all streams above that value to let users know those are
safe to retry on another connection. There is no need to go through
`forEachActiveStream` if `lastStreamId == Integer.MAX_VALUE` because
none of the streams can have id greater that MAX_VALUE.

1. https://datatracker.ietf.org/doc/html/rfc7540#section-6.8

Modifications:

- Return fast from `onHttp2GoAwayFrame` in `Http2MultiplexCodec` and
`Http2MultiplexHandler` if `lastStreamId() == Integer.MAX_VALUE`;

Result:

No unnecessary iteration over active streams on GO_AWAY if
`lastStreamId() == Integer.MAX_VALUE`.
2021-05-26 12:05:57 +02:00
Riley Park
bfd2c5ac8a Migrate transport tests to JUnit 5 (#11315)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 12:03:58 +02:00
Riley Park
22faf32c25 Migrate codec-socks tests to JUnit 5 (#11314)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:45:22 +02:00
Riley Park
a63a4d99e0 Migrate handler-proxy tests to JUnit 5 (#11313)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in  handler-proxy  tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:37:18 +02:00
Riley Park
6ffb001caf Migrate codec-stomp tests to JUnit 5 (#11312)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-stomp tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:35:05 +02:00
Riley Park
c6aaaffec2 Migrate codec-memcache tests to JUnit 5 (#11310)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-memcache tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:16:02 +02:00
Riley Park
7be16c549b Migrate codec-dns tests to JUnit 5 (#11307)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-dns tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:13:04 +02:00
Riley Park
28d4600aa6 Migrate codec-xml tests to JUnit 5 (#11311)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-smtp tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:06:28 +02:00
Riley Park
187c6015b4 Migrate codec-haproxy tests to JUnit 5 (#11308)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-smtp tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 10:05:10 +02:00
Riley Park
e9a8eaeb18 Migrate codec-smtp tests to JUnit 5 (#11309)
Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-smtp tests

Result:

Related to https://github.com/netty/netty/issues/10757
2021-05-26 09:48:56 +02:00
old driver
cfaed1219f
Add fast path in ByteBufUtil.compare and ByteBufUtil.equals methods (#11296)
Motivation:

When object-references are both same, the method should return 0 directly with no necessary go loop&compare the content of the ByteBuf.

Modification:

Added short circuit when both object-references are the same for equals and compare methods.

Result:

Added short circuit code.
2021-05-25 08:19:02 +02:00
old driver
7b064700a0
correct the doc of methods:io.netty.buffer.ByteBuf#setBytes(int, io.netty.buffer.ByteBuf) and io.netty.buffer.ByteBuf#setBytes(int, io.netty.buffer.ByteBuf, int) (#11290) 2021-05-24 10:48:56 +02:00
Roman Fedorov
bb800d6067
Delete obsolete javadoc warning about pendingTasks() method expensiveness (#11287)
Co-authored-by: Roman Fedorov <roman.fedorov@spikeapp.com>
2021-05-22 09:33:45 +02:00
old driver
9747739962
Change docs of method io.netty.util.internal.MathUtil#isOutOfBounds (#11281)
Motivation:

1. The docs about the 'retun value' of the method `io.netty.util.internal.MathUtil#isOutOfBounds` is not correct.
2. The capacity parameter should be checked for overflowed case.

Modification:

1. Changed the doc to:

>  @return {@code false} if the requested {@code index} and {@code length} will fit within {@code capacity}.
>  {@code true} if this would result in an index out of bounds exception.

2. Improved the bounder checking logic.

Result:
Fixes #11279 
Fixes #11280
2021-05-19 21:33:26 +02:00
Norman Maurer
bed04fc597 Don't include benchmarks and tests in the generated javadocs
Motivation:

We shouldn't include benchmarks and tests in the generated javadocs to keep things clean

Modifications:

Add some more excludes

Result:

Javadocs for benchmarks and tests are not published
2021-05-19 16:28:05 +02:00
Norman Maurer
09336b5a04 Checkout previous branch again after finish copy the docs 2021-05-19 15:16:56 +02:00
Netty Project Bot
02142a2510 [maven-release-plugin] prepare for next development iteration 2021-05-19 12:09:18 +00:00
Netty Project Bot
9e06241ddb [maven-release-plugin] prepare release netty-4.1.65.Final 2021-05-19 12:09:14 +00:00
Norman Maurer
eca0e160ed
Add license header to our scripts and workflows (#11282)
Motivation:

We should have license header whenever possible.

Modifications:

Add header to scripts and workflow config

Result:

More clear licensing
2021-05-19 14:06:42 +02:00
Norman Maurer
8be7c5b860 Delete tag if already exist locally 2021-05-19 11:43:06 +02:00
Norman Maurer
037eddd5a2
Fix netty-all artifact (#11274)
Motivation:

612ab58448 did change the way how netty-all was produced by unfortunally it messed up the dependency graph for our native artifacts. This commit reverts changes done by 612ab58448 and also clean up the profiles

Modifications:

netty-all is useable again

Result:

Fixes https://github.com/netty/netty/issues/11272
2021-05-19 11:12:52 +02:00
Norman Maurer
08dbd72758
Fail the build if we can't load the OpenSSL library (#11269)
Motivation:

We should better fail the build if we can't load the OpenSSL library to ensure we not introduce a regression at some point related to native library loading

Modifications:

Remove usages of assumeTrue and let the tests fail if we cant load the native lib

Result:

Ensure we not regress
2021-05-19 08:19:15 +02:00
Norman Maurer
1a67c1feb8
Correctly cleanup jars created during shading tests (#11276)
Motivation:

We need to ensure we correctly cleanup all the jars that are build for the integration tests that verify shading otherwise we may deploy these during release.

Modifications:

Correctly remove all the generated jars

Result:

Not deploy the jars by mistake
2021-05-18 18:54:34 +02:00
Stephan H. Wissel
7c955a19dc
Redirect Log4J 1.x to Log 2.x (#11264)
Removes flag by Whitesource vulnerability scanner

Motivation:

WhiteSource vulnerability scan flags the Log4J 1.x stream as vulnerable.

Modification:

Replaced reference to `log4j` with `log4j-1.2-api`
Ran `mvn test` (on a Mac) successfully

Result:

Fixes #11263
2021-05-18 12:42:48 +02:00
Norman Maurer
72db32a801
Don't include netty-examples as dependency for netty-all (#11273)
Motivation:

We shouldn't include netty-examples as dependency for netty-all as this will try to pull in all sorts of dependencies which are optional.

Modifications:

Remove dependency on netty-examples

Result:

Related to https://github.com/netty/netty/issues/11272
2021-05-18 11:44:30 +02:00
Trustin Lee
3972bacd60
Provide a way to pass through a certain HTTP upgrade request (#11267)
Motivation:

A user might want to handle a certain HTTP upgrade request differently
than what `HttpServerUpgradeHandler` does by default. For example, a
user could let `HttpServerUpgradeHandler` handle HTTP/2 upgrades but
not WebSocket upgrades.

Modifications:

- Added `HttpServerUpgradeHandler.isUpgrade(HttpRequest)` so a user can
  tell `HttpServerUpgradeHandler` to pass the request as it is to the
  next handler.

Result:

- A user can handle a certain upgrade request specially.
2021-05-18 11:42:38 +02:00
Norman Maurer
6f193193ea
Upgrade logback dependency due CVE (#11271)
Motivation:

Older version of logback are affected by [CVE-2017-5929]. While its an optional dependency we should upgrade

Modifications:

Upgrade to 1.2.3

Result:

No more reports about using affected logback version
2021-05-18 11:40:57 +02:00