Skip to content

Commit 17d1871

Browse files
committed
Remove @NotNull from jetbrains
1 parent d5d1092 commit 17d1871

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

@@ -1817,12 +1816,12 @@ public Map<String, String> getInternalPropertyMap(
18171816
}
18181817

18191818
@Override
1820-
public @NotNull AttachmentResult attachPolicyToEntity(
1821-
@NotNull PolarisCallContext callCtx,
1822-
@NotNull List<PolarisEntityCore> targetCatalogPath,
1823-
@NotNull PolarisEntityCore target,
1824-
@NotNull List<PolarisEntityCore> policyCatalogPath,
1825-
@NotNull PolicyEntity policy,
1819+
public @Nonnull AttachmentResult attachPolicyToEntity(
1820+
@Nonnull PolarisCallContext callCtx,
1821+
@Nonnull List<PolarisEntityCore> targetCatalogPath,
1822+
@Nonnull PolarisEntityCore target,
1823+
@Nonnull List<PolarisEntityCore> policyCatalogPath,
1824+
@Nonnull PolicyEntity policy,
18261825
Map<String, String> parameters) {
18271826
// get metastore we should be using
18281827
BasePersistence ms = callCtx.getMetaStore();
@@ -1859,12 +1858,12 @@ public Map<String, String> getInternalPropertyMap(
18591858
}
18601859

18611860
@Override
1862-
public @NotNull AttachmentResult detachPolicyFromEntity(
1863-
@NotNull PolarisCallContext callCtx,
1864-
@NotNull List<PolarisEntityCore> catalogPath,
1865-
@NotNull PolarisEntityCore target,
1866-
@NotNull List<PolarisEntityCore> policyCatalogPath,
1867-
@NotNull PolicyEntity policy) {
1861+
public @Nonnull AttachmentResult detachPolicyFromEntity(
1862+
@Nonnull PolarisCallContext callCtx,
1863+
@Nonnull List<PolarisEntityCore> catalogPath,
1864+
@Nonnull PolarisEntityCore target,
1865+
@Nonnull List<PolarisEntityCore> policyCatalogPath,
1866+
@Nonnull PolicyEntity policy) {
18681867
// get metastore we should be using
18691868
BasePersistence ms = callCtx.getMetaStore();
18701869

@@ -1886,8 +1885,8 @@ public Map<String, String> getInternalPropertyMap(
18861885
}
18871886

18881887
@Override
1889-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntity(
1890-
@NotNull PolarisCallContext callCtx, @NotNull PolarisEntityCore target) {
1888+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntity(
1889+
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisEntityCore target) {
18911890
// get metastore we should be using
18921891
BasePersistence ms = callCtx.getMetaStore();
18931892

@@ -1907,10 +1906,10 @@ public Map<String, String> getInternalPropertyMap(
19071906
}
19081907

19091908
@Override
1910-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
1911-
@NotNull PolarisCallContext callCtx,
1912-
@NotNull PolarisEntityCore target,
1913-
@NotNull PolicyType policyType) {
1909+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
1910+
@Nonnull PolarisCallContext callCtx,
1911+
@Nonnull PolarisEntityCore target,
1912+
@Nonnull PolicyType policyType) {
19141913
// get metastore we should be using
19151914
BasePersistence ms = callCtx.getMetaStore();
19161915

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

@@ -2312,7 +2311,7 @@ public Map<String, String> getInternalPropertyMap(
23122311

23132312
/** {@inheritDoc} */
23142313
@Override
2315-
public @NotNull AttachmentResult attachPolicyToEntity(
2314+
public @Nonnull AttachmentResult attachPolicyToEntity(
23162315
@Nonnull PolarisCallContext callCtx,
23172316
@Nonnull List<PolarisEntityCore> targetCatalogPath,
23182317
@Nonnull PolarisEntityCore target,
@@ -2433,7 +2432,7 @@ private AttachmentResult doDetachPolicyFromEntity(
24332432

24342433
/** {@inheritDoc} */
24352434
@Override
2436-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntity(
2435+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntity(
24372436
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisEntityCore target) {
24382437
TransactionalPersistence ms = ((TransactionalPersistence) callCtx.getMetaStore());
24392438
return ms.runInReadTransaction(callCtx, () -> this.doLoadPoliciesOnEntity(callCtx, ms, target));
@@ -2462,7 +2461,7 @@ private LoadPolicyMappingsResult doLoadPoliciesOnEntity(
24622461

24632462
/** {@inheritDoc} */
24642463
@Override
2465-
public @NotNull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
2464+
public @Nonnull LoadPolicyMappingsResult loadPoliciesOnEntityByType(
24662465
@Nonnull PolarisCallContext callCtx,
24672466
@Nonnull PolarisEntityCore target,
24682467
@Nonnull PolicyType policyType) {

0 commit comments

Comments
 (0)