diff --git a/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
index d54e8b9cc..a2e4d4d7d 100644
--- a/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
+++ b/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java
@@ -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;
diff --git a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
index 8a8e653e1..4e43e52a6 100644
--- a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
+++ b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
@@ -2367,7 +2367,7 @@ public abstract class ToStringStyle implements Serializable {
/**
* The summary size text start '>'
.
*/
- private String FIELD_NAME_PREFIX = "\"";
+ private final String FIELD_NAME_PREFIX = "\"";
/**
*
diff --git a/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java index 82aac5ee9..1f29a57ff 100644 --- a/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java @@ -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; diff --git a/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java index b26854682..1ad2116ed 100644 --- a/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/HashCodeBuilderTest.java @@ -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; diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java index e669a24e2..e13e78079 100644 --- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java +++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTimeZonesTest.java @@ -44,7 +44,7 @@ public class FastDatePrinterTimeZonesTest { return timeZones; } - private TimeZone timeZone; + private final TimeZone timeZone; public FastDatePrinterTimeZonesTest(TimeZone timeZone) { this.timeZone = timeZone;