leventov commented on a change in pull request #8138: Add SuppressWarnings 
SS_SHOULD_BE_STATIC
URL: https://github.com/apache/incubator-druid/pull/8138#discussion_r308809175
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/worker/config/WorkerConfig.java
 ##########
 @@ -33,30 +34,32 @@
 {
   @JsonProperty
   @NotNull
-  private final String ip = DruidNode.getDefaultHost();
+  private String ip = DruidNode.getDefaultHost();
 
   @JsonProperty
   @NotNull
-  private final String version = "0";
+  private String version = "0";
 
   @JsonProperty
   @Min(1)
-  private final int capacity = Math.max(1, 
JvmUtils.getRuntimeInfo().getAvailableProcessors() - 1);
+  private int capacity = Math.max(1, 
JvmUtils.getRuntimeInfo().getAvailableProcessors() - 1);
 
   @JsonProperty
-  private final long intermediaryPartitionDiscoveryPeriodSec = 60L;
+  private long intermediaryPartitionDiscoveryPeriodSec = 60L;
 
   @JsonProperty
-  private final long intermediaryPartitionCleanupPeriodSec = 300L;
+  private long intermediaryPartitionCleanupPeriodSec = 300L;
 
   @JsonProperty
-  private final Period intermediaryPartitionTimeout = new Period("P1D");
+  private Period intermediaryPartitionTimeout = new Period("P1D");
 
+  @Nonnull
 
 Review comment:
   Is this necessary? In general, we add `@EverythingIsNonnullByDefault` on the 
package declaration in `package-info.java` instead and assume that everything 
that is not explicitly annotated `@Nullable` is non-null. (Actually, it's 
violated in a lot of places, and it' a many years-long quest to eliminate those 
discrepancies, but still.)
   
   `javax.validation.constraints.NotNull` on json properties is something 
different.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to