Add final modifier to private fields.
This commit is contained in:
parent
4f82195afd
commit
607e3447c9
|
@ -71,7 +71,7 @@ public class MultilineRecursiveToStringStyle extends RecursiveToStringStyle {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Indenting of inner lines. */
|
||||
private int indent = 2;
|
||||
private final int indent = 2;
|
||||
|
||||
/** Current indenting. */
|
||||
private int spaces = 2;
|
||||
|
|
|
@ -2367,7 +2367,7 @@ public abstract class ToStringStyle implements Serializable {
|
|||
/**
|
||||
* The summary size text start <code>'>'</code>.
|
||||
*/
|
||||
private String FIELD_NAME_PREFIX = "\"";
|
||||
private final String FIELD_NAME_PREFIX = "\"";
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
|
@ -1150,8 +1150,8 @@ public class EqualsBuilderTest {
|
|||
|
||||
static class TestObjectEqualsExclude {
|
||||
@EqualsExclude
|
||||
private int a;
|
||||
private int b;
|
||||
private final int a;
|
||||
private final int b;
|
||||
|
||||
public TestObjectEqualsExclude(int a, int b) {
|
||||
this.a = a;
|
||||
|
|
|
@ -565,8 +565,8 @@ public class HashCodeBuilderTest {
|
|||
|
||||
static class TestObjectHashCodeExclude {
|
||||
@HashCodeExclude
|
||||
private int a;
|
||||
private int b;
|
||||
private final int a;
|
||||
private final int b;
|
||||
|
||||
public TestObjectHashCodeExclude(int a, int b) {
|
||||
this.a = a;
|
||||
|
@ -584,9 +584,9 @@ public class HashCodeBuilderTest {
|
|||
|
||||
static class TestObjectHashCodeExclude2 {
|
||||
@HashCodeExclude
|
||||
private int a;
|
||||
private final int a;
|
||||
@HashCodeExclude
|
||||
private int b;
|
||||
private final int b;
|
||||
|
||||
public TestObjectHashCodeExclude2(int a, int b) {
|
||||
this.a = a;
|
||||
|
|
|
@ -44,7 +44,7 @@ public class FastDatePrinterTimeZonesTest {
|
|||
return timeZones;
|
||||
}
|
||||
|
||||
private TimeZone timeZone;
|
||||
private final TimeZone timeZone;
|
||||
|
||||
public FastDatePrinterTimeZonesTest(TimeZone timeZone) {
|
||||
this.timeZone = timeZone;
|
||||
|
|
Loading…
Reference in New Issue