mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-07 18:48:39 +00:00
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 @@ private static final class JsonToStringStyle extends ToStringStyle {
|
||||
/**
|
||||
* The summary size text start <code>'>'</code>.
|
||||
*/
|
||||
private String FIELD_NAME_PREFIX = "\"";
|
||||
private final String FIELD_NAME_PREFIX = "\"";
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -1150,8 +1150,8 @@ public void testReflectionArrays() throws Exception {
|
||||
|
||||
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 void testToHashCodeEqualsHashCode() {
|
||||
|
||||
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 int getB() {
|
||||
|
||||
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 static Collection<TimeZone> data() {
|
||||
return timeZones;
|
||||
}
|
||||
|
||||
private TimeZone timeZone;
|
||||
private final TimeZone timeZone;
|
||||
|
||||
public FastDatePrinterTimeZonesTest(TimeZone timeZone) {
|
||||
this.timeZone = timeZone;
|
||||
|
Loading…
x
Reference in New Issue
Block a user