Skip to content

Commit bb39ee2

Browse files
authored
chore: Bump version & misc cleanup (#511)
* Address some IDE warnings * Bump Java version in CI * Bump version: v8.1.0 → v8.2.0 * Use Java 17 for publish * Update build.gradle
1 parent 18389ef commit bb39ee2

File tree

21 files changed

+69
-87
lines changed

21 files changed

+69
-87
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[bumpversion]
22
commit = True
33
tag = False
4-
current_version = v8.1.0
4+
current_version = v8.2.0
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
66
serialize =
77
{major}.{minor}.{patch}-{release}{build}

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
java: [8, 11, 17]
27+
java: [8, 11, 20]
2828
os: [ubuntu-latest, macos-latest, windows-latest]
2929

3030
steps:
3131
- name: Checkout the repo
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333

3434
- name: Setup Java
35-
uses: actions/setup-java@v3
35+
uses: actions/setup-java@v4
3636
with:
3737
distribution: 'zulu'
3838
java-version: ${{ matrix.java }}
@@ -41,7 +41,7 @@ jobs:
4141
run: chmod +x gradlew
4242

4343
- name: Cache Gradle packages
44-
uses: actions/cache@v3
44+
uses: actions/cache@v4
4545
with:
4646
path: ~/.gradle/caches
4747
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
with:
2626
ref: ${{ github.event.release.target_commitish }}
2727
- name: Setup Java
28-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@v4
2929
with:
3030
java-version: 17
3131
distribution: 'temurin'
3232
- name: Grant execute permission for gradlew
3333
run: chmod +x gradlew
3434
- name: Cache Gradle packages
35-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3636
with:
3737
path: ~/.gradle/caches
3838
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
249249
- Bumped dependency versions
250250

251251
## [6.4.0] - 2021-05-28
252-
- Adding Random From Number Feature for the Voice API, if set to `true`, the from number will be randomly selected from the pool of numbers available to the application making the call.
252+
- Adding Random From Number Feature for the Voice API, if set to `true`, the `from` number will be randomly selected from the pool of numbers available to the application making the call.
253253
- adjusting operator used to check json payloads
254254
- Adding extra parsing for top level Roaming Status in Advanced Number Insights
255255

@@ -585,8 +585,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
585585

586586
## [2.0.1] - 2017-03-18
587587
### Changed
588-
- Made servlet-api an optional dependency so it isn't bundled in war files. (This
589-
could result in class conflicts in Tomcat.)
588+
- Made servlet-api an optional dependency, so it isn't bundled in WAR files. (This could result in class conflicts in Tomcat.)
590589

591590
## [2.0.0] - 2017-03-16
592591
### Added
@@ -630,7 +629,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
630629
### Changed
631630
- Correcting some comments and log statements
632631
- Fix some small things reported by findbugs
633-
- Re-factor NexmoSmsClient. There are now sub-classes of this client class depending on the level of security required
632+
- Re-factor NexmoSmsClient. There are now subclasses of this client class depending on the level of security required
634633
- `com.nexmo.messaging.sdk.NexmoSmsClient`: The default client
635634
- `com.nexmo.messaging.sdk.NexmoSmsClientSSL`: Uses SSL / HTTPS to encrypt the requests
636635
- `com.nexmo.messaging.sdk.NexmoSmsClientSignedRequests`: Signs the requests using the secret key assigned to your account

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ See all of our SDKs and integrations on the [Vonage Developer portal](https://de
5151

5252
## Installation
5353

54-
Releases are published to [Maven Central](https://central.sonatype.com/artifact/com.vonage/server-sdk/8.1.0/snippets).
54+
Releases are published to [Maven Central](https://central.sonatype.com/artifact/com.vonage/server-sdk/8.2.0/snippets).
5555
Instructions for your build system can be found in the snippets section.
56-
They're also available from [here](https://mvnrepository.com/artifact/com.vonage/server-sdk/8.1.0).
56+
They're also available from [here](https://mvnrepository.com/artifact/com.vonage/server-sdk/8.2.0).
5757
Release notes can be found in the [changelog](CHANGELOG.md).
5858

5959
### Build It Yourself

build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ plugins {
99

1010
group = "com.vonage"
1111
archivesBaseName = "server-sdk"
12-
version = "8.1.0"
13-
sourceCompatibility = "1.8"
14-
targetCompatibility = "1.8"
12+
version = "8.2.0"
1513

1614
ext.githubPath = 'Vonage/vonage-java-sdk'
1715

@@ -23,6 +21,11 @@ repositories {
2321
mavenCentral()
2422
}
2523

24+
java {
25+
sourceCompatibility = JavaVersion.VERSION_1_8
26+
targetCompatibility = sourceCompatibility
27+
}
28+
2629
dependencies {
2730
def jacksonVersion = '2.16.1'
2831
def httpclientVersion = '4.5.14'

src/main/java/com/vonage/client/AbstractMethod.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.vonage.client.auth.JWTAuthMethod;
2020
import com.vonage.client.auth.SignatureAuthMethod;
2121
import com.vonage.client.auth.TokenAuthMethod;
22-
import org.apache.commons.logging.Log;
2322
import org.apache.commons.logging.LogFactory;
2423
import org.apache.http.HttpResponse;
2524
import org.apache.http.client.methods.HttpUriRequest;
@@ -46,7 +45,10 @@
4645
* response
4746
*/
4847
public abstract class AbstractMethod<RequestT, ResultT> implements RestEndpoint<RequestT, ResultT> {
49-
private static final Log LOG = LogFactory.getLog(AbstractMethod.class);
48+
static {
49+
LogFactory.getLog(AbstractMethod.class);
50+
}
51+
5052
protected static final BasicResponseHandler basicResponseHandler = new BasicResponseHandler();
5153

5254
protected final HttpWrapper httpWrapper;

src/main/java/com/vonage/client/HttpWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
public class HttpWrapper {
3232
private static final String CLIENT_NAME = "vonage-java-sdk";
33-
private static final String CLIENT_VERSION = "8.1.0";
33+
private static final String CLIENT_VERSION = "8.2.0";
3434
private static final String JAVA_VERSION = System.getProperty("java.version");
3535
private static final String USER_AGENT = String.format("%s/%s java/%s", CLIENT_NAME, CLIENT_VERSION, JAVA_VERSION);
3636

src/main/java/com/vonage/client/auth/hashutils/HashUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
public class HashUtil {
2828

29-
private static Map<HashType, AbstractHasher> hashTypes = new HashMap<HashType, AbstractHasher>() {{
29+
private static final Map<HashType, AbstractHasher> hashTypes = new HashMap<HashType, AbstractHasher>() {{
3030
put(HashType.MD5, new Md5Hasher());
3131
put(HashType.HMAC_SHA1, new HmacSha1Hasher());
3232
put(HashType.HMAC_MD5, new HmacMd5Hasher());

src/main/java/com/vonage/client/numberinsight2/NumberInsight2Client.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,21 @@ public class NumberInsight2Client {
3434
*
3535
* @param wrapper (REQUIRED) shared HTTP wrapper object used for making REST calls.
3636
*/
37-
@SuppressWarnings("unchecked")
3837
public NumberInsight2Client(HttpWrapper wrapper) {
39-
40-
class Endpoint<T, R> extends DynamicEndpoint<T, R> {
41-
Endpoint(HttpMethod method, R... type) {
38+
@SuppressWarnings("unchecked")
39+
final class Endpoint<T, R> extends DynamicEndpoint<T, R> {
40+
Endpoint(R... type) {
4241
super(DynamicEndpoint.<T, R> builder(type)
4342
.authMethod(TokenAuthMethod.class)
4443
.responseExceptionType(NumberInsight2ResponseException.class)
45-
.requestMethod(method).wrapper(wrapper).pathGetter((de, req) -> {
46-
String base = de.getHttpWrapper().getHttpConfig().getApiBaseUri();
47-
return base + "/v2/ni";
48-
})
44+
.requestMethod(HttpMethod.POST).wrapper(wrapper).pathGetter((de, req) ->
45+
de.getHttpWrapper().getHttpConfig().getApiBaseUri() + "/v2/ni"
46+
)
4947
);
5048
}
5149
}
5250

53-
fraudCheck = new Endpoint<>(HttpMethod.POST);
51+
fraudCheck = new Endpoint<>();
5452
}
5553

5654
/**

0 commit comments

Comments
 (0)