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

Fixing squid:S1444 - "public static" fields should be constant #605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Host implements Comparable<Host> {
private Set<String> alternateIpAddress = Sets.newHashSet();
private List<TokenRange> ranges = Lists.newArrayList();

public static Pattern IP_ADDR_PATTERN = Pattern
public static final Pattern IP_ADDR_PATTERN = Pattern
.compile("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$");

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.apache.commons.lang.builder.ToStringBuilder;

public class RunOnce implements RetryPolicy {
public static RunOnce instance = new RunOnce();
public static final RunOnce instance = new RunOnce();

public static RunOnce get() {
return instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

public class EmptyLatencyScoreStrategyImpl implements LatencyScoreStrategy {

public static EmptyLatencyScoreStrategyImpl instance = new EmptyLatencyScoreStrategyImpl();
public static final EmptyLatencyScoreStrategyImpl instance = new EmptyLatencyScoreStrategyImpl();

public static EmptyLatencyScoreStrategyImpl get() {
return instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AllRowsQueryTest extends KeyspaceTests {

private static final Logger LOG = LoggerFactory.getLogger(AllRowsQueryTest.class);

public static ColumnFamily<String, String> CF_ALL_ROWS = ColumnFamily
public static final ColumnFamily<String, String> CF_ALL_ROWS = ColumnFamily
.newColumnFamily(
"allrows",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public class CFStandardTests extends KeyspaceTests {

private static final Logger LOG = Logger.getLogger(CFStandardTests.class);

public static ColumnFamily<String, String> CF_STANDARD1 = ColumnFamily
public static final ColumnFamily<String, String> CF_STANDARD1 = ColumnFamily
.newColumnFamily(
"Standard1",
StringSerializer.get(),
StringSerializer.get());

public static ColumnFamily<String, String> CF_STANDARD2 = ColumnFamily
public static final ColumnFamily<String, String> CF_STANDARD2 = ColumnFamily
.newColumnFamily(
"Standard2",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

public class ClickStreamTests extends KeyspaceTests {

public static AnnotatedCompositeSerializer<SessionEvent> SE_SERIALIZER
public static final AnnotatedCompositeSerializer<SessionEvent> SE_SERIALIZER
= new AnnotatedCompositeSerializer<SessionEvent>(SessionEvent.class);

public static ColumnFamily<String, SessionEvent> CF_CLICK_STREAM =
public static final ColumnFamily<String, SessionEvent> CF_CLICK_STREAM =
ColumnFamily.newColumnFamily("ClickStream", StringSerializer.get(), SE_SERIALIZER);

@BeforeClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class CounterColumnTests extends KeyspaceTests {

public static ColumnFamily<String, String> CF_COUNTER1 = ColumnFamily
public static final ColumnFamily<String, String> CF_COUNTER1 = ColumnFamily
.newColumnFamily(
"Counter1",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

public class DirectCqlTests extends KeyspaceTests {

public static ColumnFamily<Integer, String> CF_DIRECT = ColumnFamily
public static final ColumnFamily<Integer, String> CF_DIRECT = ColumnFamily
.newColumnFamily(
"cfdirect",
IntegerSerializer.get(),
StringSerializer.get());

public static ColumnFamily<String, String> CF_EMPTY_TABLE = ColumnFamily
public static final ColumnFamily<String, String> CF_EMPTY_TABLE = ColumnFamily
.newColumnFamily(
"empty_table",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

public class LongColumnPaginationTests extends KeyspaceTests {

public static ColumnFamily<String, Long> CF_LONGCOLUMN = ColumnFamily
public static final ColumnFamily<String, Long> CF_LONGCOLUMN = ColumnFamily
.newColumnFamily(
"LongColumn1",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

public class RowUniquenessConstraintTest extends KeyspaceTests {

public static ColumnFamily<Long, String> CF_UNIQUE_CONSTRAINT = ColumnFamily
public static final ColumnFamily<Long, String> CF_UNIQUE_CONSTRAINT = ColumnFamily
.newColumnFamily(
"cfunique",
LongSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SerializerPackageTests extends KeyspaceTests {

private static final Logger LOG = Logger.getLogger(SerializerPackageTests.class);

public static ColumnFamily<String, Long> CF_SERIALIZER1 = ColumnFamily
public static final ColumnFamily<String, Long> CF_SERIALIZER1 = ColumnFamily
.newColumnFamily(
"Serializer1",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class SingleColumnMutationTests extends KeyspaceTests {

public static ColumnFamily<Long, String> CF_SINGLE_COLUMN = ColumnFamily
public static final ColumnFamily<Long, String> CF_SINGLE_COLUMN = ColumnFamily
.newColumnFamily(
"cfsinglecolmutation",
LongSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class TimeUUIDTests extends KeyspaceTests {

private static final Logger LOG = Logger.getLogger(TimeUUIDTests.class);

public static ColumnFamily<String, UUID> CF_TIME_UUID = ColumnFamily
public static final ColumnFamily<String, UUID> CF_TIME_UUID = ColumnFamily
.newColumnFamily(
"TimeUUID1",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public class ChunkedObjectStoreTest extends KeyspaceTests {

public static ColumnFamily<String, String> CF_CHUNK = ColumnFamily.newColumnFamily("cfchunk", StringSerializer.get(), StringSerializer.get());
public static final ColumnFamily<String, String> CF_CHUNK = ColumnFamily.newColumnFamily("cfchunk", StringSerializer.get(), StringSerializer.get());

@BeforeClass
public static void init() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class ColumnPrefixDistributedLockTest extends KeyspaceTests {

public static ColumnFamily<String, String> CF_DIST_LOCK = ColumnFamily
public static final ColumnFamily<String, String> CF_DIST_LOCK = ColumnFamily
.newColumnFamily(
"distlock",
StringSerializer.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

public class ColumnPrefixUniquenessConstraintTest extends KeyspaceTests {

public static ColumnFamily<Long, String> CF_UNIQUE_CONSTRAINT = ColumnFamily
public static final ColumnFamily<Long, String> CF_UNIQUE_CONSTRAINT = ColumnFamily
.newColumnFamily(
"cfunique2",
LongSerializer.get(),
Expand Down