Skip to content

Commit 3449915

Browse files
committed
fix some annotations
1 parent db26e23 commit 3449915

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

operator/src/main/java/it/aboutbits/postgresql/crd/grant/GrantReconciler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public UpdateControl<Grant> reconcile(
114114
return updateControl;
115115
}
116116

117+
@SuppressWarnings("java:S3776")
117118
private UpdateControl<Grant> reconcileInTransaction(
118119
DSLContext tx,
119120
Grant resource,

operator/src/main/java/it/aboutbits/postgresql/crd/grant/GrantService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class GrantService {
4141
/// @param tx The DSLContext for database operations.
4242
/// @param resource The Grant resource containing the specification details.
4343
/// @return A map with object names as keys and lists of GrantPrivilege as values.
44-
@SuppressWarnings("MethodLength")
44+
@SuppressWarnings("checkstyle:MethodLength")
4545
public Map<String, Set<GrantPrivilege>> determineCurrentObjectPrivileges(
4646
DSLContext tx,
4747
Grant resource
@@ -214,7 +214,7 @@ public Map<String, Set<GrantPrivilege>> determineCurrentObjectPrivileges(
214214
/// @param resource the Grant object containing specifications about the target database objects and privileges
215215
/// @return a map where the keys represent object names and the values indicate ownership status,
216216
/// or `null` if the object does not exist
217-
@SuppressWarnings("MethodLength")
217+
@SuppressWarnings({"checkstyle:MethodLength", "java:S3776"})
218218
public Map<String, @Nullable Boolean> determineObjectExistenceAndOwnership(
219219
DSLContext tx,
220220
Grant resource

operator/src/main/java/it/aboutbits/postgresql/crd/role/RoleReconciler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.jspecify.annotations.Nullable;
2727

2828
import java.util.List;
29+
import java.util.Objects;
2930
import java.util.concurrent.TimeUnit;
3031
import java.util.stream.Collectors;
3132

@@ -340,7 +341,7 @@ private boolean isReferencedBy(
340341
return false;
341342
}
342343

343-
var ref = spec.getPasswordSecretRef();
344+
var ref = Objects.requireNonNull(spec.getPasswordSecretRef());
344345
var refName = ref.getName();
345346
var refNamespace = getResourceNamespaceOrOwn(role, ref.getNamespace());
346347

0 commit comments

Comments
 (0)