Skip to content

Commit

Permalink
Updated build requirements to Java 21
Browse files Browse the repository at this point in the history
- Added default constructors with comments
- Upgraded CodeQL Actions from 2 to 3
  • Loading branch information
exceptionfactory committed Mar 17, 2024
1 parent c5e7a5a commit a4fdce7
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: java
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'zulu'
cache: 'maven'
- name: Build
run: ./mvnw --batch-mode --update-snapshots verify
- name: Codecov
uses: codecov/codecov-action@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'zulu'
cache: 'maven'
- name: Release
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Java Socket library supporting SOCKS and HTTP proxy servers with authentication

# Build Requirements

- Java 17
- Java 21
- Maven 3.9

# Runtime Requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
* ByteBuffer Encoder reads populated byte array contents of the provided buffer
*/
public class ByteBufferEncoder implements PacketEncoder<ByteBuffer> {
/**
* Default constructor for Byte Buffer Encoder
*/
public ByteBufferEncoder() {

}

/**
* Get encoded buffer after rewinding and read byte array based on the buffer limit length
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
* String Encoder converts provided sources to byte arrays using US-ASCII encoding
*/
public class StringEncoder implements PacketEncoder<String> {
/**
* Default constructor for Byte Buffer Encoder
*/
public StringEncoder() {

}

/**
* Get bytes encoded using US-ASCII
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
public class UnicodeStandardCharacterArrayEncoder implements PacketEncoder<char[]> {
private static final PacketEncoder<ByteBuffer> BYTE_BUFFER_ENCODER = new ByteBufferEncoder();

/**
* Default constructor for Byte Buffer Encoder
*/
public UnicodeStandardCharacterArrayEncoder() {

}

/**
* Get bytes encoded using UTF-8
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
* Unicode Standard String Encoder converts provided sources to byte arrays using UTF-8 encoding
*/
public class UnicodeStandardStringEncoder implements PacketEncoder<String> {
/**
* Default constructor for Byte Buffer Encoder
*/
public UnicodeStandardStringEncoder() {

}

/**
* Get bytes encoded using UTF-8
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public class HttpConnectSocketBroker implements SocketBroker {

private static final String CONNECTION_FAILED = "HTTP Connection Failed: Status [%d] Reason [%s]";

/**
* Default constructor for HTTP CONNECT implementation of Socket Broker
*/
public HttpConnectSocketBroker() {

}

/**
* Request connection to remote address through socket connected to HTTP Proxy Server
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public class StandardAuthenticationChallengeParser implements AuthenticationChal

private static final String VALUE_GROUP = "value";

/**
* Default constructor for Standard Authentication Challenge Parser
*/
public StandardAuthenticationChallengeParser() {

}

/**
* Get Authentication Challenge from challenge source containing scheme and parameters
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public class BasicProxyAuthorizationProvider implements ProxyAuthorizationProvid

private static final int SEPARATOR_LENGTH = 1;

/**
* Default constructor for HTTP Basic implementation of Proxy Authorization Provider
*/
public BasicProxyAuthorizationProvider() {

}

/**
* Get Proxy Authorization Credentials formatted according to RFC 7617 Section 2
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public class Socks5SocketBroker implements SocketBroker {

private static final PacketDecoder<SocksReply> REPLY_DECODER = new SocksReplyDecoder();

/**
* Default constructor for SOCKS5 implementation of Socket Broker
*/
public Socks5SocketBroker() {

}

/**
* Connect to SOCKS server using provided Socket and request connection to the specified remote address
*
Expand Down

0 comments on commit a4fdce7

Please sign in to comment.