Skip to content

Commit 7cc4be2

Browse files
committed
Revendored tlschannel to 0.3.2
JAVA-3588
1 parent a1b912f commit 7cc4be2

29 files changed

+3505
-2507
lines changed

THIRD-PARTY-NOTICES

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -107,27 +107,33 @@ https://github.com/mongodb/mongo-java-driver.
107107

108108
7) The following files (originally from https://github.com/marianobarrios/tls-channel):
109109

110-
AsynchronousTlsChannel.java
111-
AsynchronousTlsChannelGroup.java
112-
ExtendedAsynchronousByteChannel.java
113-
BufferHolder.java
114-
ByteBufferSet.java
115-
ByteBufferUtil.java
116-
TlsChannelImpl.java
117-
TlsChannelCallbackException.java
118-
Util.java
119-
BufferAllocator.java
120-
ClientTlsChannel.java
121-
NeedsReadException.java
122-
NeedsTaskException.java
123-
NeedsWriteException.java
124-
TlsChannel.java
125-
TlsChannelBuilder.java
126-
TlsChannelFlowControlException.java
127-
TrackingAllocator.java
128-
WouldBlockException.java
129-
130-
Copyright (c) [2015-2018] all contributors
110+
AsynchronousTlsChannel.java
111+
AsynchronousTlsChannelGroup.java
112+
BufferAllocator.java
113+
BufferHolder.java
114+
ByteBufferSet.java
115+
ByteBufferUtil.java
116+
ClientTlsChannel.java
117+
DirectBufferAllocator.java
118+
DirectBufferDeallocator.java
119+
ExtendedAsynchronousByteChannel.java
120+
HeapBufferAllocator.java
121+
NeedsReadException.java
122+
NeedsTaskException.java
123+
NeedsWriteException.java
124+
ServerTlsChannel.java
125+
SniSslContextFactory.java
126+
TlsChannel.java
127+
TlsChannelBuilder.java
128+
TlsChannelCallbackException.java
129+
TlsChannelFlowControlException.java
130+
TlsChannelImpl.java
131+
TlsExplorer.java
132+
TrackingAllocator.java
133+
Util.java
134+
WouldBlockException.java
135+
136+
Copyright (c) [2015-2020] all contributors
131137

132138
MIT License
133139

config/checkstyle-exclude.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<suppressions>
2424

25-
<suppress checks="VisibilityModifier" files="com[\\/]mongodb[\\/]internal[\\/]connection[\\/]tlschannel[\\/]"/>
25+
<suppress checks="[a-zA-Z0-9]*" files="com[\\/]mongodb[\\/]internal[\\/]connection[\\/]tlschannel[\\/]"/>
2626

2727
<suppress checks="MethodLength" files="QuickTour"/>
2828
<suppress checks="Regexp" files="Tour"/>

driver-core/src/main/com/mongodb/internal/connection/tlschannel/BufferAllocator.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,33 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*
16-
* Original Work: MIT License, Copyright (c) [2015-2018] all contributors
16+
* Original Work: MIT License, Copyright (c) [2015-2020] all contributors
1717
* https://github.com/marianobarrios/tls-channel
1818
*/
1919

2020
package com.mongodb.internal.connection.tlschannel;
2121

22-
import org.bson.ByteBuf;
22+
import java.nio.ByteBuffer;
2323

2424
/**
25-
* A factory for {@link ByteBuf}s. Implementations are free to return heap or
26-
* direct buffers, or to do any kind of pooling. They are also expected to be
27-
* thread-safe.
25+
* A factory for {@link ByteBuffer}s. Implementations are free to return heap or direct buffers, or
26+
* to do any kind of pooling. They are also expected to be thread-safe.
2827
*/
2928
public interface BufferAllocator {
3029

31-
/**
32-
* Allocate a {@link ByteBuf} with the given initial capacity.
33-
*/
34-
ByteBuf allocate(int size);
35-
36-
/**
37-
* Deallocate the given {@link ByteBuf}.
38-
*
39-
* @param buffer the buffer to deallocate, that should have been allocated using
40-
* the same {@link BufferAllocator} instance
41-
*/
42-
void free(ByteBuf buffer);
30+
/**
31+
* Allocate a {@link ByteBuffer} with the given initial capacity.
32+
*
33+
* @param size the size to allocate
34+
* @return the newly created buffer
35+
*/
36+
ByteBuffer allocate(int size);
4337

38+
/**
39+
* Deallocate the given {@link ByteBuffer}.
40+
*
41+
* @param buffer the buffer to deallocate, that should have been allocated using the same {@link
42+
* BufferAllocator} instance
43+
*/
44+
void free(ByteBuffer buffer);
4445
}

0 commit comments

Comments
 (0)