leventov opened a new issue #7780: Walk over IntelliJ's "constant conditions 
and expressions" inspection results which are unrelated to null
URL: https://github.com/apache/incubator-druid/issues/7780
 
 
   IntelliJ's "Constant conditions and expressions" inspection mixes 
nullability-related problems and other types of problems. In Druid, there are 
2500+ nullability related problems which makes the analysis impossible. [You 
can vote for this issue in 
YouTrack](https://youtrack.jetbrains.com/issue/IDEABKL-4141) to make it more 
likely that the problem is solved by IntelliJ developers.
   
   For now, I [worked that 
around](https://youtrack.jetbrains.com/issue/IDEABKL-4141#focus=streamItem-27-3506899.0-0)
 and we can analyze actual bugs, 49 of them below.
   
   Please go over the results below and fix the corresponding bugs.
   ```
   <problem>
     
<file>file://$PROJECT_DIR$/extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/AmbariMetricsEmitter.java</file>
     <line>195</line>
     <module>ambari-metrics-emitter</module>
     <package>org.apache.druid.emitter.ambari.metrics</package>
     <entry_point 
FQNAME="org.apache.druid.emitter.ambari.metrics.AmbariMetricsEmitter.ConsumerRunnable
 void run()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;e instanceof 
InterruptedException&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/main/java/org/apache/druid/math/expr/Parser.java</file>
     <line>111</line>
     <module>druid-core</module>
     <package>org.apache.druid.math.expr</package>
     <entry_point FQNAME="org.apache.druid.math.expr.Parser 
org.apache.druid.math.expr.Expr flatten(org.apache.druid.math.expr.Expr expr)" 
TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/java/util/common/NumbersTest.java</file>
     <line>120</line>
     <module>druid-core</module>
     <package>org.apache.druid.java.util.common</package>
     <entry_point FQNAME="org.apache.druid.java.util.common.NumbersTest void 
testParseBooleanWithNull()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'parseBoolean' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/java/util/common/NumbersTest.java</file>
     <line>112</line>
     <module>druid-core</module>
     <package>org.apache.druid.java.util.common</package>
     <entry_point FQNAME="org.apache.druid.java.util.common.NumbersTest void 
testParseBoolean()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;booleanVal&lt;/code&gt; is always 
'false'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/java/util/common/NumbersTest.java</file>
     <line>87</line>
     <module>druid-core</module>
     <package>org.apache.druid.java.util.common</package>
     <entry_point FQNAME="org.apache.druid.java.util.common.NumbersTest void 
testParseIntWithNull()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'parseInt' always fails, according to its method 
contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/java/util/common/NumbersTest.java</file>
     <line>51</line>
     <module>druid-core</module>
     <package>org.apache.druid.java.util.common</package>
     <entry_point FQNAME="org.apache.druid.java.util.common.NumbersTest void 
testParseLongWithNull()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'parseLong' always fails, according to its method 
contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/collections/CombiningIteratorTest.java</file>
     <line>59</line>
     <module>druid-core</module>
     <package>org.apache.druid.collections</package>
     <entry_point FQNAME="org.apache.druid.collections.CombiningIteratorTest 
void testHasNext()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;expected&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/collections/CombiningIteratorTest.java</file>
     <line>63</line>
     <module>druid-core</module>
     <package>org.apache.druid.collections</package>
     <entry_point FQNAME="org.apache.druid.collections.CombiningIteratorTest 
void testHasNext()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;expected&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/collections/CombiningIteratorTest.java</file>
     <line>83</line>
     <module>druid-core</module>
     <package>org.apache.druid.collections</package>
     <entry_point FQNAME="org.apache.druid.collections.CombiningIteratorTest 
void testNext()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;expected&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/collections/CombiningIteratorTest.java</file>
     <line>72</line>
     <module>druid-core</module>
     <package>org.apache.druid.collections</package>
     <entry_point FQNAME="org.apache.druid.collections.CombiningIteratorTest 
void testFalseBranchNext()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;expected&lt;/code&gt; is always 
'false'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/collections/CombiningIteratorTest.java</file>
     <line>70</line>
     <module>druid-core</module>
     <package>org.apache.druid.collections</package>
     <entry_point FQNAME="org.apache.druid.collections.CombiningIteratorTest 
void testFalseBranchNext()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;expected&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/core/src/test/java/org/apache/druid/collections/CombiningIteratorTest.java</file>
     <line>114</line>
     <module>druid-core</module>
     <package>org.apache.druid.collections</package>
     <entry_point FQNAME="org.apache.druid.collections.CombiningIteratorTest 
void testExceptionInNext()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;expected&lt;/code&gt; is always 
'false'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extensions-core/hdfs-storage/src/test/java/org/apache/druid/storage/hdfs/HdfsDataSegmentPusherTest.java</file>
     <line>116</line>
     <module>druid-hdfs-storage</module>
     <package>org.apache.druid.storage.hdfs</package>
     <entry_point 
FQNAME="org.apache.druid.storage.hdfs.HdfsDataSegmentPusherTest void 
testPushWithBadScheme()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'assertTrue' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-hadoop/src/test/java/org/apache/druid/indexer/UtilsTest.java</file>
     <line>122</line>
     <module>druid-indexing-hadoop</module>
     <package>org.apache.druid.indexer</package>
     <entry_point FQNAME="org.apache.druid.indexer.UtilsTest void 
testExceptionInMakePathAndOutputStream()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;overwrite&lt;/code&gt; is always 
'false'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-hadoop/src/test/java/org/apache/druid/indexer/UtilsCompressionTest.java</file>
     <line>116</line>
     <module>druid-indexing-hadoop</module>
     <package>org.apache.druid.indexer</package>
     <entry_point FQNAME="org.apache.druid.indexer.UtilsCompressionTest void 
testCompressedMakePathAndOutputStream()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;overwrite&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-hadoop/src/test/java/org/apache/druid/indexer/UtilsCompressionTest.java</file>
     <line>103</line>
     <module>druid-indexing-hadoop</module>
     <package>org.apache.druid.indexer</package>
     <entry_point FQNAME="org.apache.druid.indexer.UtilsCompressionTest void 
testCompressedOpenInputStream()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;overwrite&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-hadoop/src/test/java/org/apache/druid/indexer/HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest.java</file>
     <line>323</line>
     <module>druid-indexing-hadoop</module>
     <package>org.apache.druid.indexer</package>
     <entry_point 
FQNAME="org.apache.druid.indexer.HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest
 org.apache.druid.indexer.HadoopDruidIndexerConfig 
testRunUpdateSegmentListIfDatasourcePathSpecIsUsed(org.apache.druid.indexer.path.PathSpec
 datasourcePathSpec, org.joda.time.Interval jobInterval)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java</file>
     <line>813</line>
     <module>druid-indexing-service</module>
     <package>org.apache.druid.indexing.common.task</package>
     <entry_point FQNAME="org.apache.druid.indexing.common.task.IndexTask 
java.util.Map&lt;org.joda.time.Interval,com.google.common.base.Optional&lt;org.apache.druid.hll.HyperLogLogCollector&gt;&gt;
 collectIntervalsAndShardSpecs(com.fasterxml.jackson.databind.ObjectMapper 
jsonMapper, org.apache.druid.indexing.common.task.IndexTask.IndexIngestionSpec 
ingestionSchema, org.apache.druid.data.input.FirehoseFactory firehoseFactory, 
java.io.File firehoseTempDir, 
org.apache.druid.segment.indexing.granularity.GranularitySpec granularitySpec, 
boolean determineIntervals, boolean determineNumPartitions)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;unparseable &gt; 0&lt;/code&gt; is 
always &lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java</file>
     <line>810</line>
     <module>druid-indexing-service</module>
     <package>org.apache.druid.indexing.common.task</package>
     <entry_point FQNAME="org.apache.druid.indexing.common.task.IndexTask 
java.util.Map&lt;org.joda.time.Interval,com.google.common.base.Optional&lt;org.apache.druid.hll.HyperLogLogCollector&gt;&gt;
 collectIntervalsAndShardSpecs(com.fasterxml.jackson.databind.ObjectMapper 
jsonMapper, org.apache.druid.indexing.common.task.IndexTask.IndexIngestionSpec 
ingestionSchema, org.apache.druid.data.input.FirehoseFactory firehoseFactory, 
java.io.File firehoseTempDir, 
org.apache.druid.segment.indexing.granularity.GranularitySpec granularitySpec, 
boolean determineIntervals, boolean determineNumPartitions)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;thrownAway &gt; 0&lt;/code&gt; is 
always &lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopIndexTask.java</file>
     <line>278</line>
     <module>druid-indexing-service</module>
     <package>org.apache.druid.indexing.common.task</package>
     <entry_point FQNAME="org.apache.druid.indexing.common.task.HadoopIndexTask 
org.apache.druid.indexer.TaskStatus 
runInternal(org.apache.druid.indexing.common.TaskToolbox toolbox)" 
TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-service/src/main/java/org/apache/druid/indexing/worker/WorkerTaskManager.java</file>
     <line>184</line>
     <module>druid-indexing-service</module>
     <package>org.apache.druid.indexing.worker</package>
     <entry_point FQNAME="org.apache.druid.indexing.worker.WorkerTaskManager 
void 
submitNoticeToExec(org.apache.druid.indexing.worker.WorkerTaskManager.Notice 
notice)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;e instanceof 
InterruptedException&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java</file>
     <line>656</line>
     <module>druid-indexing-service</module>
     <package>org.apache.druid.indexing.overlord.hrtr</package>
     <entry_point 
FQNAME="org.apache.druid.indexing.overlord.hrtr.HttpRemoteTaskRunner void 
scheduleSyncMonitoring()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;ex instanceof 
InterruptedException&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java</file>
     <line>335</line>
     <module>druid-indexing-service</module>
     <package>org.apache.druid.indexing.seekablestream</package>
     <entry_point 
FQNAME="org.apache.druid.indexing.seekablestream.SeekableStreamIndexTaskRunner 
org.apache.druid.indexer.TaskStatus 
runInternal(org.apache.druid.indexing.common.TaskToolbox toolbox)" 
TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Method &lt;code&gt;runInternal&lt;/code&gt; is too complex to 
analyze by data flow algorithm</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/query/filter/LikeDimFilter.java</file>
     <line>69</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.filter</package>
     <entry_point FQNAME="org.apache.druid.query.filter.LikeDimFilter 
LikeDimFilter(java.lang.String dimension, java.lang.String pattern, 
java.lang.String escape, org.apache.druid.query.extraction.ExtractionFn 
extractionFn)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;escape.isEmpty()&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt; when reached</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryQueryToolChest.java</file>
     <line>299</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.groupby</package>
     <entry_point 
FQNAME="org.apache.druid.query.groupby.GroupByQueryQueryToolChest boolean 
isNestedQueryPushDown(org.apache.druid.query.groupby.GroupByQuery q, 
org.apache.druid.query.groupby.strategy.GroupByStrategy strategy)" 
TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;q.getDataSource() instanceof 
QueryDataSource &amp;&amp; 
q.getContextBoolean(GroupByQueryConfig.CT...&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ByteBufferMinMaxOffsetHeap.java</file>
     <line>299</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.groupby.epinephelinae</package>
     <entry_point 
FQNAME="org.apache.druid.query.groupby.epinephelinae.ByteBufferMinMaxOffsetHeap 
void siftDown(java.util.Comparator comparator, int pos)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;minChild &gt; -1&lt;/code&gt; is always 
&lt;code&gt;true&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/server/src/main/java/org/apache/druid/client/HttpServerInventoryView.java</file>
     <line>462</line>
     <module>druid-server</module>
     <package>org.apache.druid.client</package>
     <entry_point FQNAME="org.apache.druid.client.HttpServerInventoryView void 
scheduleSyncMonitoring()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;ex instanceof 
InterruptedException&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/segment/DimensionHandlerUtils.java</file>
     <line>73</line>
     <module>druid-processing</module>
     <package>org.apache.druid.segment</package>
     <entry_point FQNAME="org.apache.druid.segment.DimensionHandlerUtils 
org.apache.druid.segment.DimensionHandler 
getHandlerFromCapabilities(java.lang.String dimensionName, 
org.apache.druid.segment.column.ColumnCapabilities capabilities, 
org.apache.druid.data.input.impl.DimensionSchema.MultiValueHandling 
multiValueHandling)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/segment/Metadata.java</file>
     <line>203</line>
     <module>druid-processing</module>
     <package>org.apache.druid.segment</package>
     <entry_point FQNAME="org.apache.druid.segment.Metadata 
org.apache.druid.segment.Metadata 
merge(java.util.List&lt;org.apache.druid.segment.Metadata&gt; toBeMerged, 
org.apache.druid.query.aggregation.AggregatorFactory[] 
overrideMergedAggregators)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexStorageAdapter.java</file>
     <line>374</line>
     <module>druid-processing</module>
     <package>org.apache.druid.segment.incremental</package>
     <entry_point 
FQNAME="org.apache.druid.segment.incremental.IncrementalIndexStorageAdapter.IncrementalIndexCursor
 void reset()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;emptyRange || 
!baseIter.hasNext()&lt;/code&gt; is always &lt;code&gt;true&lt;/code&gt; when 
reached</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexStorageAdapter.java</file>
     <line>374</line>
     <module>druid-processing</module>
     <package>org.apache.druid.segment.incremental</package>
     <entry_point 
FQNAME="org.apache.druid.segment.incremental.IncrementalIndexStorageAdapter.IncrementalIndexCursor
 void reset()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Result of &lt;code&gt;baseIter.hasNext()&lt;/code&gt; is 
always 'false'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexStorageAdapter.java</file>
     <line>374</line>
     <module>druid-processing</module>
     <package>org.apache.druid.segment.incremental</package>
     <entry_point 
FQNAME="org.apache.druid.segment.incremental.IncrementalIndexStorageAdapter.IncrementalIndexCursor
 void reset()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;!baseIter.hasNext()&lt;/code&gt; is 
always &lt;code&gt;true&lt;/code&gt; when reached</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/scan/ScanQueryRunnerTest.java</file>
     <line>923</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.scan</package>
     <entry_point FQNAME="org.apache.druid.query.scan.ScanQueryRunnerTest 
java.util.List&lt;java.util.List&lt;java.util.Map&lt;java.lang.String,java.lang.Object&gt;&gt;&gt;
 toEvents(java.lang.String[] dimSpecs, java.lang.String[]... valueSet)" 
TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;i &gt;= dimSpecs.length&lt;/code&gt; is 
always &lt;code&gt;false&lt;/code&gt; when reached</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/filter/JavaScriptDimFilterTest.java</file>
     <line>107</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.filter</package>
     <entry_point FQNAME="org.apache.druid.query.filter.JavaScriptDimFilterTest 
void testToFilterNotAllowed()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'assertTrue' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/lookup/LookupExtractionFnTest.java</file>
     <line>153</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.lookup</package>
     <entry_point FQNAME="org.apache.druid.query.lookup.LookupExtractionFnTest 
void testIllegalArgs()" TYPE="method" />
     <problem_class attribute_key="INFO_ATTRIBUTES" severity="WEAK 
WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Value &lt;code&gt;retainMissing&lt;/code&gt; is always 
'true'</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/select/SelectQueryRunnerTest.java</file>
     <line>967</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.select</package>
     <entry_point FQNAME="org.apache.druid.query.select.SelectQueryRunnerTest$1 
java.util.Map&lt;java.lang.String,java.lang.Object&gt; apply(java.lang.String 
input)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;i &gt;= dimSpecs.length&lt;/code&gt; is 
always &lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/select/MultiSegmentSelectQueryTest.java</file>
     <line>341</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.select</package>
     <entry_point 
FQNAME="org.apache.druid.query.select.MultiSegmentSelectQueryTest 
org.apache.druid.query.select.PagingSpec 
toNextCursor(java.util.Map&lt;java.lang.String,java.lang.Integer&gt; merged, 
org.apache.druid.query.select.SelectQuery query, int threshold)" TYPE="method" 
/>
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/groupby/having/DimFilterHavingSpecTest.java</file>
     <line>111</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.groupby.having</package>
     <entry_point 
FQNAME="org.apache.druid.query.groupby.having.DimFilterHavingSpecTest void 
testConcurrentUsage()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'assertTrue' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/extraction/JavaScriptExtractionFnTest.java</file>
     <line>74</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.extraction</package>
     <entry_point 
FQNAME="org.apache.druid.query.extraction.JavaScriptExtractionFnTest void 
testJavascriptNotAllowed()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'assertTrue' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/aggregation/JavaScriptAggregatorTest.java</file>
     <line>268</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.aggregation</package>
     <entry_point 
FQNAME="org.apache.druid.query.aggregation.JavaScriptAggregatorTest void 
testJavaScriptDisabledFactorize()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'assertTrue' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/processing/src/test/java/org/apache/druid/query/aggregation/JavaScriptAggregatorTest.java</file>
     <line>286</line>
     <module>druid-processing</module>
     <package>org.apache.druid.query.aggregation</package>
     <entry_point 
FQNAME="org.apache.druid.query.aggregation.JavaScriptAggregatorTest void 
testJavaScriptDisabledFactorizeBuffered()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>The call to 'assertTrue' always fails, according to its 
method contracts</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extensions-core/stats/src/test/java/org/apache/druid/query/aggregation/variance/VarianceAggregatorCollectorTest.java</file>
     <line>129</line>
     <module>druid-stats</module>
     <package>org.apache.druid.query.aggregation.variance</package>
     <entry_point 
FQNAME="org.apache.druid.query.aggregation.variance.VarianceAggregatorCollectorTest
 void testVariance()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Variable is already assigned to this value</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java</file>
     <line>309</line>
     <module>druid-sql</module>
     <package>org.apache.druid.sql.calcite.planner</package>
     <entry_point FQNAME="org.apache.druid.sql.calcite.planner.Calcites 
org.joda.time.DateTime 
calciteDateTimeLiteralToJoda(org.apache.calcite.rex.RexNode literal, 
org.joda.time.DateTimeZone timeZone)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;typeName == 
SqlTypeName.DATE&lt;/code&gt; is always 
&lt;code&gt;true&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/sql/src/main/java/org/apache/druid/sql/calcite/filtration/MoveTimeFiltersToIntervals.java</file>
     <line>163</line>
     <module>druid-sql</module>
     <package>org.apache.druid.sql.calcite.filtration</package>
     <entry_point 
FQNAME="org.apache.druid.sql.calcite.filtration.MoveTimeFiltersToIntervals 
com.google.common.collect.Range&lt;java.lang.Long&gt; 
toLongRange(com.google.common.collect.Range&lt;org.apache.druid.sql.calcite.filtration.BoundValue&gt;
 range)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;range.hasLowerBound()&lt;/code&gt; is 
always &lt;code&gt;true&lt;/code&gt; when reached</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extendedset/src/main/java/org/apache/druid/extendedset/intset/ConciseSetUtils.java</file>
     <line>111</line>
     <module>extendedset</module>
     <package>org.apache.druid.extendedset.intset</package>
     <entry_point FQNAME="org.apache.druid.extendedset.intset.ConciseSetUtils 
int maxLiteralLengthModulus(int n)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;m &lt;= 31&lt;/code&gt; is always 
&lt;code&gt;true&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extendedset/src/main/java/org/apache/druid/extendedset/intset/ConciseSetUtils.java</file>
     <line>112</line>
     <module>extendedset</module>
     <package>org.apache.druid.extendedset.intset</package>
     <entry_point FQNAME="org.apache.druid.extendedset.intset.ConciseSetUtils 
int maxLiteralLengthModulus(int n)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;m == 31&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extendedset/src/main/java/org/apache/druid/extendedset/intset/ConciseSet.java</file>
     <line>161</line>
     <module>extendedset</module>
     <package>org.apache.druid.extendedset.intset</package>
     <entry_point FQNAME="org.apache.druid.extendedset.intset.ConciseSet int 
maxLiteralLengthModulus(int n)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;m &lt;= 31&lt;/code&gt; is always 
&lt;code&gt;true&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extendedset/src/main/java/org/apache/druid/extendedset/intset/ConciseSet.java</file>
     <line>162</line>
     <module>extendedset</module>
     <package>org.apache.druid.extendedset.intset</package>
     <entry_point FQNAME="org.apache.druid.extendedset.intset.ConciseSet int 
maxLiteralLengthModulus(int n)" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;m == 31&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   
   <problem>
     
<file>file://$PROJECT_DIR$/extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/GraphiteEmitter.java</file>
     <line>212</line>
     <module>graphite-emitter</module>
     <package>org.apache.druid.emitter.graphite</package>
     <entry_point 
FQNAME="org.apache.druid.emitter.graphite.GraphiteEmitter.ConsumerRunnable void 
run()" TYPE="method" />
     <problem_class attribute_key="WARNING_ATTRIBUTES" 
severity="WARNING">Constant conditions &amp; exceptions</problem_class>
     <description>Condition &lt;code&gt;e instanceof 
InterruptedException&lt;/code&gt; is always 
&lt;code&gt;false&lt;/code&gt;</description>
   </problem>
   ```

----------------------------------------------------------------
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