diff --git a/src/main/java/software/amazon/awssdk/crt/http/HttpException.java b/src/main/java/software/amazon/awssdk/crt/http/HttpException.java index d000edd5d..b266151ee 100644 --- a/src/main/java/software/amazon/awssdk/crt/http/HttpException.java +++ b/src/main/java/software/amazon/awssdk/crt/http/HttpException.java @@ -12,7 +12,7 @@ * JNI bindings to the AWS Common Runtime */ public class HttpException extends RuntimeException { - private int errorCode; + private final int errorCode; /** * Constructs a new HttpException @@ -24,11 +24,11 @@ public HttpException(int errorCode) { } /** - * Returns the error code captured when the exception occurred. This can be fed to {@link CRT.awsErrorString} to + * Returns the error code captured when the exception occurred. This can be fed to CRT.awsErrorString() to * get a user-friendly error string * @return The error code associated with this exception */ - int getErrorCode() { + public int getErrorCode() { return errorCode; } } diff --git a/src/test/java/software/amazon/awssdk/crt/test/S3ClientTest.java b/src/test/java/software/amazon/awssdk/crt/test/S3ClientTest.java index fb29820e9..9bc1c216d 100644 --- a/src/test/java/software/amazon/awssdk/crt/test/S3ClientTest.java +++ b/src/test/java/software/amazon/awssdk/crt/test/S3ClientTest.java @@ -1263,7 +1263,7 @@ public void benchmarkS3Get() { // resolution final int vipsNeeded = (int) Math.ceil(expectedGbps / 0.5 / 10); final int sampleDelay = Integer.parseInt(System.getProperty("aws.crt.s3.benchmark.warmup", - new Integer((int) Math.ceil(vipsNeeded / 5)).toString())); + Integer.toString((int) Math.ceil(vipsNeeded / 5)))); System.out.println(String.format("REGION=%s, WARMUP=%s", region, sampleDelay)); // Ignore stats during warm up time, they skew results @@ -1402,7 +1402,7 @@ public void benchmarkS3Put() { // resolution final int vipsNeeded = (int) Math.ceil(expectedGbps / 0.5 / 10); final int sampleDelay = Integer.parseInt(System.getProperty("aws.crt.s3.benchmark.warmup", - new Integer((int) Math.ceil(vipsNeeded / 5)).toString())); + Integer.toString((int) Math.ceil(vipsNeeded / 5)))); System.out.println(String.format("REGION=%s, WARMUP=%s", region, sampleDelay)); // Ignore stats during warm up time, they skew results