Skip to content

Commit 881b817

Browse files
committed
Suppress and resolve build warnings
1 parent cf53ff0 commit 881b817

File tree

7 files changed

+15
-6
lines changed

7 files changed

+15
-6
lines changed

operator/src/main/java/oracle/kubernetes/operator/calls/RequestStep.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public abstract class RequestStep<
6464
* @param resourceSingular Resource singular
6565
* @param clientSelector Client selector
6666
*/
67+
@SuppressWarnings("this-escape")
6768
protected RequestStep(
6869
ResponseStep<R> next,
6970
Class<A> apiTypeClass,

operator/src/main/java/oracle/kubernetes/operator/calls/ResponseStep.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2024, Oracle and/or its affiliates.
1+
// Copyright (c) 2024, 2025, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.kubernetes.operator.calls;
@@ -94,6 +94,7 @@ public static boolean isNotAuthorizedOrForbidden(KubernetesApiResponse<?> r) {
9494
}
9595

9696
private final Step conflictStep;
97+
@SuppressWarnings("rawtypes")
9798
private RequestStep previousStep = null;
9899

99100
/** Constructor specifying no next step. */
@@ -136,7 +137,7 @@ public AfterStep(Step next) {
136137
}
137138
}
138139

139-
public final void setPrevious(RequestStep previousStep) {
140+
public final void setPrevious(@SuppressWarnings("rawtypes") RequestStep previousStep) {
140141
this.previousStep = previousStep;
141142
}
142143

operator/src/main/java/oracle/kubernetes/operator/helpers/CrdHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import oracle.kubernetes.weblogic.domain.model.DomainSpec;
6666
import oracle.kubernetes.weblogic.domain.model.DomainStatus;
6767
import org.apache.commons.codec.binary.Base64;
68+
import org.yaml.snakeyaml.DumperOptions;
6869
import org.yaml.snakeyaml.LoaderOptions;
6970
import org.yaml.snakeyaml.constructor.SafeConstructor;
7071

@@ -357,7 +358,8 @@ static V1CustomResourceValidation getValidationFromCrdSchemaFile(String fileCont
357358
private static org.yaml.snakeyaml.Yaml getSnakeYaml() {
358359
LoaderOptions loaderOptions = new LoaderOptions();
359360
loaderOptions.setEnumCaseSensitive(false);
360-
return new org.yaml.snakeyaml.Yaml(new SafeConstructor(new LoaderOptions()), new Yaml.CustomRepresenter());
361+
return new org.yaml.snakeyaml.Yaml(
362+
new SafeConstructor(new LoaderOptions()), new Yaml.CustomRepresenter(), new DumperOptions());
361363
}
362364

363365
static V1CustomResourceSubresources createSubresources() {

operator/src/main/java/oracle/kubernetes/operator/helpers/FileGroupReader.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2018, 2023, Oracle and/or its affiliates.
1+
// Copyright (c) 2018, 2025, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.kubernetes.operator.helpers;
@@ -95,6 +95,8 @@ private boolean isJar(URI uri) {
9595

9696
interface ScriptPath extends AutoCloseable {
9797
Path getScriptsDir();
98+
99+
void close() throws IOException;
98100
}
99101

100102
static class FileScriptPath implements ScriptPath {
@@ -128,7 +130,7 @@ public Path getScriptsDir() {
128130
}
129131

130132
@Override
131-
public void close() throws Exception {
133+
public void close() throws IOException {
132134
fileSystem.close();
133135
}
134136
}

operator/src/main/java/oracle/kubernetes/operator/http/client/HttpRequestStep.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public HttpRequestStep withTimeoutSeconds(long timeoutSeconds) {
9090
}
9191

9292
@Override
93+
@SuppressWarnings("try")
9394
public @Nonnull Result apply(Packet packet) {
9495
HttpResponseStep.removeResponse(packet);
9596
DomainPresenceInfo info = getDomainPresenceInfo(packet);

operator/src/main/java/oracle/kubernetes/operator/steps/InitializeWebhookIdentityStep.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, 2024, Oracle and/or its affiliates.
1+
// Copyright (c) 2022, 2025, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.kubernetes.operator.steps;
@@ -271,6 +271,7 @@ public byte[] getWebhookCert() {
271271
}
272272
}
273273

274+
@SuppressWarnings("serial")
274275
public static class IdentityInitializationException extends Exception {
275276
public IdentityInitializationException(Exception e) {
276277
super(e);

operator/src/test/java/oracle/kubernetes/operator/builders/StubWatchFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public Watchable<A> watch(ListOptions listOptions) throws ApiException {
110110
}
111111

112112
@Override
113+
@SuppressWarnings("unchecked")
113114
public Watchable<A> watch(String namespace, ListOptions listOptions) throws ApiException {
114115
try {
115116
addRecordedParameters(getParameters(namespace, listOptions));

0 commit comments

Comments
 (0)