Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove useless @NotNull annotation from primitives #21258

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ jobs:
- name: Error Prone Checks
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN ${MAVEN_TEST} -T 1C clean verify -DskipTests ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \
# Skip checks, these are run in `maven-checks` job and e.g. checkstyle is expensive.
$MAVEN ${MAVEN_TEST} -T 1C clean verify -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \
-pl '!:trino-docs,!:trino-server,!:trino-server-rpm'

web-ui-checks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ public QueryManagerConfig setRetryMaxDelay(Duration retryMaxDelay)
return this;
}

@NotNull
public double getRetryDelayScaleFactor()
{
return retryDelayScaleFactor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ public TaskManagerConfig setMaxIndexMemoryUsage(DataSize maxIndexMemoryUsage)
return this;
}

@NotNull
public boolean isShareIndexLoading()
{
return shareIndexLoading;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public MemoryManagerConfig setFaultTolerantExecutionTaskMemory(DataSize faultTol
return this;
}

@NotNull
public double getFaultTolerantExecutionTaskMemoryGrowthFactor()
{
return faultTolerantExecutionTaskMemoryGrowthFactor;
Expand All @@ -121,7 +120,6 @@ public MemoryManagerConfig setFaultTolerantExecutionTaskMemoryGrowthFactor(doubl
return this;
}

@NotNull
public double getFaultTolerantExecutionTaskMemoryEstimationQuantile()
{
return faultTolerantExecutionTaskMemoryEstimationQuantile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public AzureFileSystemConfig setWriteBlockSize(DataSize writeBlockSize)
return this;
}

@NotNull
public int getMaxWriteConcurrency()
{
return maxWriteConcurrency;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public AccumuloConfig setZkMetadataRoot(String zkMetadataRoot)
return this;
}

@NotNull
@Min(1)
public int getCardinalityCacheSize()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public ElasticsearchConfig setDefaultSchema(String defaultSchema)
return this;
}

@NotNull
@Min(1)
public int getScrollSize()
{
Expand Down Expand Up @@ -239,7 +238,6 @@ public ElasticsearchConfig setMaxHttpConnections(int size)
return this;
}

@NotNull
public int getMaxHttpConnections()
{
return maxHttpConnections;
Expand All @@ -253,7 +251,6 @@ public ElasticsearchConfig setHttpThreadCount(int count)
return this;
}

@NotNull
public int getHttpThreadCount()
{
return httpThreadCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public ThriftMetastoreConfig setDelegationTokenCacheTtl(Duration delegationToken
return this;
}

@NotNull
@Min(0)
public long getDelegationTokenCacheMaximumSize()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class MemoryConfig
private DataSize maxDataPerNode = DataSize.of(128, DataSize.Unit.MEGABYTE);
private boolean enableLazyDynamicFiltering = true;

@NotNull
public int getSplitsPerNode()
{
return splitsPerNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public OpenSearchConfig setDefaultSchema(String defaultSchema)
return this;
}

@NotNull
@Min(1)
public int getScrollSize()
{
Expand Down Expand Up @@ -223,7 +222,6 @@ public OpenSearchConfig setMaxHttpConnections(int size)
return this;
}

@NotNull
public int getMaxHttpConnections()
{
return maxHttpConnections;
Expand All @@ -237,7 +235,6 @@ public OpenSearchConfig setHttpThreadCount(int count)
return this;
}

@NotNull
public int getHttpThreadCount()
{
return httpThreadCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class OracleConfig
private int connectionPoolMaxSize = 30;
private Duration inactiveConnectionTimeout = new Duration(20, MINUTES);

@NotNull
public boolean isSynonymsEnabled()
{
return synonymsEnabled;
Expand Down Expand Up @@ -90,7 +89,6 @@ public OracleConfig setNumberRoundingMode(RoundingMode numberRoundingMode)
return this;
}

@NotNull
public boolean isConnectionPoolEnabled()
{
return connectionPoolEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public PinotConfig setMetadataCacheExpiry(Duration metadataCacheExpiry)
return this;
}

@NotNull
public int getEstimatedSizeInBytesForNonNumericColumn()
{
return estimatedSizeInBytesForNonNumericColumn;
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2674,6 +2674,7 @@
-Xep:NarrowingCompoundAssignment:ERROR \
-Xep:NullOptional:ERROR \
-Xep:NullableOptional:ERROR \
-Xep:NullablePrimitive:ERROR \
-Xep:ObjectToString:ERROR \
-Xep:OptionalNotPresent:ERROR \
-Xep:OrphanedFormatString:ERROR \
Expand Down
Loading