Skip to content

Commit 071954b

Browse files
committed
fix pmd AvoidThrowingRawExceptionTypes
1 parent c1f8862 commit 071954b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void main(String[] args) {
3737
LOGGER.info(response.toString());
3838
}
3939
} catch (ApiException | IOException e) {
40-
throw new RuntimeException(e);
40+
throw new IllegalStateException(e);
4141
}
4242

4343
/*
@@ -97,7 +97,7 @@ public static void main(String[] args) {
9797
LOGGER.info(response.toString());
9898
}
9999
} catch (ApiException | IOException e) {
100-
throw new RuntimeException(e);
100+
throw new IllegalStateException(e);
101101
}
102102

103103
/*
@@ -136,7 +136,7 @@ public static void main(String[] args) {
136136
LOGGER.info(response.toString());
137137
}
138138
} catch (ApiException | IOException e) {
139-
throw new RuntimeException(e);
139+
throw new IllegalStateException(e);
140140
}
141141
}
142142

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
@@ -56,7 +56,7 @@ public static void main(String[] args) throws IOException {
5656
}
5757
}
5858
} catch (ApiException e) {
59-
throw new RuntimeException(e);
59+
throw new IllegalStateException(e);
6060
}
6161
}
6262
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public static void main(String[] args) throws IOException {
323323
}
324324

325325
} catch (ApiException | InterruptedException e) {
326-
throw new RuntimeException(e);
326+
throw new IllegalStateException(e);
327327
}
328328
}
329329

0 commit comments

Comments
 (0)