Skip to content

Commit 75ccc27

Browse files
committed
apply make fmt
1 parent 8330da9 commit 75ccc27

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

core/src/main/java/cloud/stackit/sdk/core/KeyFlowAuthenticator.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ public String getAccessToken() throws IOException, ApiException, InvalidKeySpecE
209209
* @throws JsonSyntaxException parsing of the created access token failed
210210
*/
211211
@SuppressWarnings("PMD.AvoidSynchronizedStatement")
212-
protected void createAccessToken()
213-
throws InvalidKeySpecException, IOException, ApiException {
212+
protected void createAccessToken() throws InvalidKeySpecException, IOException, ApiException {
214213
synchronized (tokenRefreshMonitor) {
215214
String assertion;
216215
try {
@@ -236,8 +235,7 @@ protected void createAccessToken()
236235
* @throws JsonSyntaxException can not parse new access token
237236
*/
238237
@SuppressWarnings("PMD.AvoidSynchronizedStatement")
239-
protected void createAccessTokenWithRefreshToken()
240-
throws IOException, ApiException {
238+
protected void createAccessTokenWithRefreshToken() throws IOException, ApiException {
241239
synchronized (tokenRefreshMonitor) {
242240
String refreshToken = token.refreshToken;
243241
try (Response response = requestToken(REFRESH_TOKEN, refreshToken).execute()) {
@@ -253,8 +251,7 @@ protected void createAccessTokenWithRefreshToken()
253251
* @throws ApiException if the response has a bad status code
254252
* @throws JsonSyntaxException if the response body cannot be parsed
255253
*/
256-
private void parseTokenResponse(Response response)
257-
throws ApiException {
254+
private void parseTokenResponse(Response response) throws ApiException {
258255
if (response.code() != HttpURLConnection.HTTP_OK) {
259256
String body = null;
260257
if (response.body() != null) {

core/src/main/java/cloud/stackit/sdk/core/auth/SetupAuth.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ private static String getDefaultCredentialsFilePath() {
126126
* can be found
127127
* @throws IOException thrown when a file can not be found
128128
*/
129-
public static ServiceAccountKey setupKeyFlow(CoreConfiguration cfg)
130-
throws IOException {
129+
public static ServiceAccountKey setupKeyFlow(CoreConfiguration cfg) throws IOException {
131130
return setupKeyFlow(cfg, new EnvironmentVariables());
132131
}
133132

@@ -304,8 +303,7 @@ private static String getPrivateKey(CoreConfiguration cfg, EnvironmentVariables
304303
* pathKey can not be found
305304
*/
306305
protected static String readValueFromCredentialsFile(
307-
String path, String valueKey, String pathKey)
308-
throws IOException {
306+
String path, String valueKey, String pathKey) throws IOException {
309307
// Read credentials file
310308
String fileContent =
311309
new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8);

examples/authentication/src/main/java/cloud/stackit/sdk/authentication/examples/AuthenticationExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public static void main(String[] args) throws IOException {
4141
*
4242
* */
4343

44-
/* read key content from a file, in production you can also read it
45-
* e.g. from STACKIT secrets manager, so it's only kept in-memory
44+
/* read key content from a file, in production you can also read it
45+
* e.g. from STACKIT secrets manager, so it's only kept in-memory
4646
* */
4747
String serviceAccountKeyPath = // replace it with the path to your service account key
4848
"examples/authentication/src/main/java/cloud/stackit/sdk/authentication/examples/dummy_credentials/dummy-service-account-key.json";

examples/custom-http-client/src/main/java/cloud/stackit/sdk/customhttpclient/examples/CustomHttpClientExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* NOTE: Passing the http client is optional, see our other examples
1818
* where no OkHttpClient object is passed.
1919
* In this case the STACKIT SDK ApiClients will just create their own OkHttpClient objects.
20-
* Nevertheless, for production usage try to use one single OkHttpClient object
20+
* Nevertheless, for production usage try to use one single OkHttpClient object
2121
* for everything to take advantage of the shared connection pool and to prevent resource leaks.
2222
*
2323
* */

examples/iaas/src/main/java/cloud/stackit/sdk/iaas/examples/IaaSExample.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ public static void main(String[] args) throws IOException {
7272
System.out.println("\nFetched network: ");
7373
System.out.println("* Network name: " + fetchedNetwork.getName());
7474
System.out.println("* Id: " + fetchedNetwork.getNetworkId());
75-
System.out.println("* DHCP: " + (Boolean.TRUE.equals(fetchedNetwork.getDhcp()) ? "YES" : "NO"));
75+
System.out.println(
76+
"* DHCP: " + (Boolean.TRUE.equals(fetchedNetwork.getDhcp()) ? "YES" : "NO"));
7677
System.out.println("* Gateway: " + fetchedNetwork.getGateway());
7778
System.out.println("* Public IP: " + fetchedNetwork.getPublicIp());
7879

@@ -178,8 +179,8 @@ public static void main(String[] args) throws IOException {
178179
* create a server
179180
*
180181
* NOTE: see the following link for available machine types
181-
* https://docs.stackit.cloud/stackit/en/virtual-machine-flavors-75137231.html
182-
*
182+
* https://docs.stackit.cloud/stackit/en/virtual-machine-flavors-75137231.html
183+
*
183184
* */
184185
Server newServer =
185186
iaasApi.createServer(

0 commit comments

Comments
 (0)