mirror of https://github.com/apache/druid.git
Enable Spotbugs: MS_OOI_PKGPROTECT (#8022)
This commit is contained in:
parent
2eee711653
commit
0aabeb4b1a
|
@ -55,7 +55,6 @@
|
|||
<Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/>
|
||||
<Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/>
|
||||
<Bug pattern="MS_FINAL_PKGPROTECT"/>
|
||||
<Bug pattern="MS_OOI_PKGPROTECT"/>
|
||||
<Bug pattern="MS_PKGPROTECT"/>
|
||||
<Bug pattern="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT"/>
|
||||
<Bug pattern="NP_GUARANTEED_DEREF"/>
|
||||
|
|
|
@ -23,6 +23,8 @@ package org.apache.druid.query.metadata.metadata;
|
|||
*/
|
||||
public class AllColumnIncluderator implements ColumnIncluderator
|
||||
{
|
||||
private static final byte[] ALL_CACHE_PREFIX = new byte[]{0x1};
|
||||
|
||||
@Override
|
||||
public boolean include(String columnName)
|
||||
{
|
||||
|
|
|
@ -32,10 +32,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|||
})
|
||||
public interface ColumnIncluderator
|
||||
{
|
||||
byte[] NONE_CACHE_PREFIX = new byte[]{0x0};
|
||||
byte[] ALL_CACHE_PREFIX = new byte[]{0x1};
|
||||
byte[] LIST_CACHE_PREFIX = new byte[]{0x2};
|
||||
|
||||
boolean include(String columnName);
|
||||
byte[] getCacheKey();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ import java.util.TreeSet;
|
|||
*/
|
||||
public class ListColumnIncluderator implements ColumnIncluderator
|
||||
{
|
||||
private static final byte[] LIST_CACHE_PREFIX = new byte[]{0x2};
|
||||
|
||||
private final Set<String> columns;
|
||||
|
||||
@JsonCreator
|
||||
|
@ -61,7 +63,7 @@ public class ListColumnIncluderator implements ColumnIncluderator
|
|||
public byte[] getCacheKey()
|
||||
{
|
||||
int size = 1;
|
||||
List<byte[]> columns = Lists.newArrayListWithExpectedSize(this.columns.size());
|
||||
final List<byte[]> columns = Lists.newArrayListWithExpectedSize(this.columns.size());
|
||||
|
||||
for (String column : this.columns) {
|
||||
final byte[] bytes = StringUtils.toUtf8(column);
|
||||
|
|
|
@ -23,6 +23,8 @@ package org.apache.druid.query.metadata.metadata;
|
|||
*/
|
||||
public class NoneColumnIncluderator implements ColumnIncluderator
|
||||
{
|
||||
private static final byte[] NONE_CACHE_PREFIX = new byte[]{0x0};
|
||||
|
||||
@Override
|
||||
public boolean include(String columnName)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue