Skip to content

Commit a4fdce7

Browse files
Updated build requirements to Java 21
- Added default constructors with comments - Upgraded CodeQL Actions from 2 to 3
1 parent c5e7a5a commit a4fdce7

11 files changed

+61
-5
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ jobs:
1919
- name: Checkout Sources
2020
uses: actions/checkout@v4
2121
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@v2
22+
uses: github/codeql-action/init@v3
2323
with:
2424
languages: java
2525
- name: Setup Java JDK
2626
uses: actions/setup-java@v4
2727
with:
28-
java-version: '17'
28+
java-version: '21'
2929
distribution: 'zulu'
3030
cache: 'maven'
3131
- name: Build
3232
run: ./mvnw --batch-mode --update-snapshots verify
3333
- name: Codecov
3434
uses: codecov/codecov-action@v3
3535
- name: Perform CodeQL Analysis
36-
uses: github/codeql-action/analyze@v2
36+
uses: github/codeql-action/analyze@v3

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Java JDK
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: '17'
20+
java-version: '21'
2121
distribution: 'zulu'
2222
cache: 'maven'
2323
- name: Release

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Java Socket library supporting SOCKS and HTTP proxy servers with authentication
1010

1111
# Build Requirements
1212

13-
- Java 17
13+
- Java 21
1414
- Maven 3.9
1515

1616
# Runtime Requirements

src/main/java/com/exceptionfactory/socketbroker/protocol/ByteBufferEncoder.java

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
* ByteBuffer Encoder reads populated byte array contents of the provided buffer
2323
*/
2424
public class ByteBufferEncoder implements PacketEncoder<ByteBuffer> {
25+
/**
26+
* Default constructor for Byte Buffer Encoder
27+
*/
28+
public ByteBufferEncoder() {
29+
30+
}
31+
2532
/**
2633
* Get encoded buffer after rewinding and read byte array based on the buffer limit length
2734
*

src/main/java/com/exceptionfactory/socketbroker/protocol/StringEncoder.java

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
* String Encoder converts provided sources to byte arrays using US-ASCII encoding
2323
*/
2424
public class StringEncoder implements PacketEncoder<String> {
25+
/**
26+
* Default constructor for Byte Buffer Encoder
27+
*/
28+
public StringEncoder() {
29+
30+
}
31+
2532
/**
2633
* Get bytes encoded using US-ASCII
2734
*

src/main/java/com/exceptionfactory/socketbroker/protocol/UnicodeStandardCharacterArrayEncoder.java

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
public class UnicodeStandardCharacterArrayEncoder implements PacketEncoder<char[]> {
2727
private static final PacketEncoder<ByteBuffer> BYTE_BUFFER_ENCODER = new ByteBufferEncoder();
2828

29+
/**
30+
* Default constructor for Byte Buffer Encoder
31+
*/
32+
public UnicodeStandardCharacterArrayEncoder() {
33+
34+
}
35+
2936
/**
3037
* Get bytes encoded using UTF-8
3138
*

src/main/java/com/exceptionfactory/socketbroker/protocol/UnicodeStandardStringEncoder.java

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
* Unicode Standard String Encoder converts provided sources to byte arrays using UTF-8 encoding
2323
*/
2424
public class UnicodeStandardStringEncoder implements PacketEncoder<String> {
25+
/**
26+
* Default constructor for Byte Buffer Encoder
27+
*/
28+
public UnicodeStandardStringEncoder() {
29+
30+
}
31+
2532
/**
2633
* Get bytes encoded using UTF-8
2734
*

src/main/java/com/exceptionfactory/socketbroker/protocol/http/HttpConnectSocketBroker.java

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public class HttpConnectSocketBroker implements SocketBroker {
5757

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

60+
/**
61+
* Default constructor for HTTP CONNECT implementation of Socket Broker
62+
*/
63+
public HttpConnectSocketBroker() {
64+
65+
}
66+
6067
/**
6168
* Request connection to remote address through socket connected to HTTP Proxy Server
6269
*

src/main/java/com/exceptionfactory/socketbroker/protocol/http/authentication/StandardAuthenticationChallengeParser.java

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ public class StandardAuthenticationChallengeParser implements AuthenticationChal
3838

3939
private static final String VALUE_GROUP = "value";
4040

41+
/**
42+
* Default constructor for Standard Authentication Challenge Parser
43+
*/
44+
public StandardAuthenticationChallengeParser() {
45+
46+
}
47+
4148
/**
4249
* Get Authentication Challenge from challenge source containing scheme and parameters
4350
*

src/main/java/com/exceptionfactory/socketbroker/protocol/http/authorization/BasicProxyAuthorizationProvider.java

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ public class BasicProxyAuthorizationProvider implements ProxyAuthorizationProvid
4545

4646
private static final int SEPARATOR_LENGTH = 1;
4747

48+
/**
49+
* Default constructor for HTTP Basic implementation of Proxy Authorization Provider
50+
*/
51+
public BasicProxyAuthorizationProvider() {
52+
53+
}
54+
4855
/**
4956
* Get Proxy Authorization Credentials formatted according to RFC 7617 Section 2
5057
*

src/main/java/com/exceptionfactory/socketbroker/protocol/socks/Socks5SocketBroker.java

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public class Socks5SocketBroker implements SocketBroker {
5757

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

60+
/**
61+
* Default constructor for SOCKS5 implementation of Socket Broker
62+
*/
63+
public Socks5SocketBroker() {
64+
65+
}
66+
6067
/**
6168
* Connect to SOCKS server using provided Socket and request connection to the specified remote address
6269
*

0 commit comments

Comments
 (0)