Skip to content

Commit 0bc8b8f

Browse files
committed
Remove @NotNull from jetbrains
1 parent fd4040e commit 0bc8b8f

File tree

3 files changed

+39
-42
lines changed

3 files changed

+39
-42
lines changed

polaris-core/src/main/java/org/apache/polaris/core/persistence/AtomicOperationMetaStoreManager.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
import org.apache.polaris.core.storage.PolarisStorageActions;
6969
import org.apache.polaris.core.storage.PolarisStorageConfigurationInfo;
7070
import org.apache.polaris.core.storage.PolarisStorageIntegration;
71-
import org.jetbrains.annotations.NotNull;
7271
import org.slf4j.Logger;
7372
import org.slf4j.LoggerFactory;
7473

@@ -1827,12 +1826,12 @@ public Map<String, String> getInternalPropertyMap(
18271826
}
18281827

18291828
@Override
1830-
public @NotNull AttachmentResult attachPolicyToEntity(
1831-
@NotNull PolarisCallContext callCtx,
1832-
@NotNull List<PolarisEntityCore> targetCatalogPath,
1833-
@NotNull PolarisEntityCore target,
1834-
@NotNull List<PolarisEntityCore> policyCatalogPath,
1835-
@NotNull PolicyEntity policy,
1829+
public @Nonnull AttachmentResult attachPolicyToEntity(
1830+
@Nonnull PolarisCallContext callCtx,
1831+
@Nonnull List<PolarisEntityCore> targetCatalogPath,
1832+
@Nonnull PolarisEntityCore target,
1833+
@Nonnull List<PolarisEntityCore> policyCatalogPath,
1834+
@Nonnull PolicyEntity policy,
18361835
Map<String, String> parameters) {
18371836
// get metastore we should be using
18381837
BasePersistence ms = callCtx.getMetaStore();
@@ -1869,12 +1868,12 @@ public Map<String, String> getInternalPropertyMap(
18691868
}
18701869

18711870
@Override
1872-
public @NotNull AttachmentResult detachPolicyFromEntity(
1873-
@NotNull PolarisCallContext callCtx,
1874-
@NotNull List<PolarisEntityCore> catalogPath,
1875-
@NotNull PolarisEntityCore target,
1876-
@NotNull List<PolarisEntityCore> policyCatalogPath,
1877-
@NotNull PolicyEntity policy) {
1871+
public @Nonnull AttachmentResult detachPolicyFromEntity(
1872+
@Nonnull PolarisCallContext callCtx,
1873+
@Nonnull List<PolarisEntityCore> catalogPath,
1874+
@Nonnull PolarisEntityCore target,
1875+
@Nonnull List<PolarisEntityCore> policyCatalogPath,
1876+
@Nonnull PolicyEntity policy) {
18781877
// get metastore we should be using
18791878
BasePersistence ms = callCtx.getMetaStore();
18801879

@@ -1896,8 +1895,8 @@ public Map<String, String> getInternalPropertyMap(
18961895
}
18971896

18981897
@Override
1899-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntity(
1900-
@NotNull PolarisCallContext callCtx, @NotNull PolarisEntityCore target) {
1898+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntity(
1899+
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisEntityCore target) {
19011900
// get metastore we should be using
19021901
BasePersistence ms = callCtx.getMetaStore();
19031902

@@ -1917,10 +1916,10 @@ public Map<String, String> getInternalPropertyMap(
19171916
}
19181917

19191918
@Override
1920-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
1921-
@NotNull PolarisCallContext callCtx,
1922-
@NotNull PolarisEntityCore target,
1923-
@NotNull PolicyType policyType) {
1919+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
1920+
@Nonnull PolarisCallContext callCtx,
1921+
@Nonnull PolarisEntityCore target,
1922+
@Nonnull PolicyType policyType) {
19241923
// get metastore we should be using
19251924
BasePersistence ms = callCtx.getMetaStore();
19261925

polaris-core/src/main/java/org/apache/polaris/core/persistence/TransactionWorkspaceMetaStoreManager.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import org.apache.polaris.core.policy.PolicyEntity;
5353
import org.apache.polaris.core.policy.PolicyType;
5454
import org.apache.polaris.core.storage.PolarisStorageActions;
55-
import org.jetbrains.annotations.NotNull;
5655

5756
/**
5857
* Wraps an existing impl of PolarisMetaStoreManager and delegates expected "read" operations
@@ -399,12 +398,12 @@ public ResolvedEntityResult refreshResolvedEntity(
399398
}
400399

401400
@Override
402-
public @NotNull AttachmentResult attachPolicyToEntity(
403-
@NotNull PolarisCallContext callCtx,
404-
@NotNull List<PolarisEntityCore> targetCatalogPath,
405-
@NotNull PolarisEntityCore target,
406-
@NotNull List<PolarisEntityCore> policyCatalogPath,
407-
@NotNull PolicyEntity policy,
401+
public @Nonnull AttachmentResult attachPolicyToEntity(
402+
@Nonnull PolarisCallContext callCtx,
403+
@Nonnull List<PolarisEntityCore> targetCatalogPath,
404+
@Nonnull PolarisEntityCore target,
405+
@Nonnull List<PolarisEntityCore> policyCatalogPath,
406+
@Nonnull PolicyEntity policy,
408407
Map<String, String> parameters) {
409408
callCtx
410409
.getDiagServices()
@@ -413,32 +412,32 @@ public ResolvedEntityResult refreshResolvedEntity(
413412
}
414413

415414
@Override
416-
public @NotNull AttachmentResult detachPolicyFromEntity(
417-
@NotNull PolarisCallContext callCtx,
418-
@NotNull List<PolarisEntityCore> catalogPath,
419-
@NotNull PolarisEntityCore target,
420-
@NotNull List<PolarisEntityCore> policyCatalogPath,
421-
@NotNull PolicyEntity policy) {
415+
public @Nonnull AttachmentResult detachPolicyFromEntity(
416+
@Nonnull PolarisCallContext callCtx,
417+
@Nonnull List<PolarisEntityCore> catalogPath,
418+
@Nonnull PolarisEntityCore target,
419+
@Nonnull List<PolarisEntityCore> policyCatalogPath,
420+
@Nonnull PolicyEntity policy) {
422421
callCtx
423422
.getDiagServices()
424423
.fail("illegal_method_in_transaction_workspace", "detachPolicyFromEntity");
425424
return null;
426425
}
427426

428427
@Override
429-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntity(
430-
@NotNull PolarisCallContext callCtx, @NotNull PolarisEntityCore target) {
428+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntity(
429+
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisEntityCore target) {
431430
callCtx
432431
.getDiagServices()
433432
.fail("illegal_method_in_transaction_workspace", "loadPoliciesOnEntity");
434433
return null;
435434
}
436435

437436
@Override
438-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
439-
@NotNull PolarisCallContext callCtx,
440-
@NotNull PolarisEntityCore target,
441-
@NotNull PolicyType policyType) {
437+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
438+
@Nonnull PolarisCallContext callCtx,
439+
@Nonnull PolarisEntityCore target,
440+
@Nonnull PolicyType policyType) {
442441
callCtx
443442
.getDiagServices()
444443
.fail("illegal_method_in_transaction_workspace", "loadPoliciesOnEntityByType");

polaris-core/src/main/java/org/apache/polaris/core/persistence/transactional/PolarisMetaStoreManagerImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
import org.apache.polaris.core.storage.PolarisStorageActions;
7070
import org.apache.polaris.core.storage.PolarisStorageConfigurationInfo;
7171
import org.apache.polaris.core.storage.PolarisStorageIntegration;
72-
import org.jetbrains.annotations.NotNull;
7372
import org.slf4j.Logger;
7473
import org.slf4j.LoggerFactory;
7574

@@ -2322,7 +2321,7 @@ public Map<String, String> getInternalPropertyMap(
23222321

23232322
/** {@inheritDoc} */
23242323
@Override
2325-
public @NotNull AttachmentResult attachPolicyToEntity(
2324+
public @Nonnull AttachmentResult attachPolicyToEntity(
23262325
@Nonnull PolarisCallContext callCtx,
23272326
@Nonnull List<PolarisEntityCore> targetCatalogPath,
23282327
@Nonnull PolarisEntityCore target,
@@ -2443,7 +2442,7 @@ private AttachmentResult doDetachPolicyFromEntity(
24432442

24442443
/** {@inheritDoc} */
24452444
@Override
2446-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntity(
2445+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntity(
24472446
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisEntityCore target) {
24482447
TransactionalPersistence ms = ((TransactionalPersistence) callCtx.getMetaStore());
24492448
return ms.runInReadTransaction(callCtx, () -> this.doLoadPoliciesOnEntity(callCtx, ms, target));
@@ -2472,7 +2471,7 @@ private LoadPolicyMappingsResult doLoadPoliciesOnEntity(
24722471

24732472
/** {@inheritDoc} */
24742473
@Override
2475-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
2474+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
24762475
@Nonnull PolarisCallContext callCtx,
24772476
@Nonnull PolarisEntityCore target,
24782477
@Nonnull PolicyType policyType) {

0 commit comments

Comments
 (0)