Enable Spotbugs: MS_OOI_PKGPROTECT (#8022)

This commit is contained in:
Fokko Driesprong 2019-07-08 09:47:56 +02:00 committed by Nishant Bangarwa
parent 2eee711653
commit 0aabeb4b1a
5 changed files with 7 additions and 6 deletions

View File

@ -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"/>

View File

@ -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)
{

View File

@ -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();
}

View File

@ -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);

View File

@ -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)
{