Skip to content

Commit a620622

Browse files
committed
Don't initialize instance variables to their default values
1 parent 4a3232d commit a620622

17 files changed

+25
-25
lines changed

src/main/java/org/apache/commons/beanutils/BasicDynaBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class BasicDynaBean implements DynaBean, Serializable {
5050
* The <code>DynaClass</code> "base class" that this DynaBean
5151
* is associated with.
5252
*/
53-
protected DynaClass dynaClass = null;
53+
protected DynaClass dynaClass;
5454

5555

5656

src/main/java/org/apache/commons/beanutils/DynaProperty.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class DynaProperty implements Serializable {
6565

6666

6767
/** Property name */
68-
protected String name = null;
68+
protected String name;
6969

7070

7171
/** Property type */

src/main/java/org/apache/commons/beanutils/ResultSetDynaClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class ResultSetDynaClass extends JDBCDynaClass {
9090
/**
9191
* <p>The <code>ResultSet</code> we are wrapping.</p>
9292
*/
93-
protected ResultSet resultSet = null;
93+
protected ResultSet resultSet;
9494

9595

9696
/**

src/main/java/org/apache/commons/beanutils/ResultSetIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class ResultSetIterator implements DynaBean, Iterator<DynaBean> {
3939
/**
4040
* <p>The {@link ResultSetDynaClass} we are associated with.</p>
4141
*/
42-
protected ResultSetDynaClass dynaClass = null;
42+
protected ResultSetDynaClass dynaClass;
4343

4444
/**
4545
* <p>Flag indicating whether the result set has indicated that there are

src/main/java/org/apache/commons/beanutils/WrapDynaBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class WrapDynaBean implements DynaBean, Serializable {
5555
/**
5656
* The JavaBean instance wrapped by this WrapDynaBean.
5757
*/
58-
protected Object instance = null;
58+
protected Object instance;
5959

6060
/**
6161
* Construct a new <code>DynaBean</code> associated with the specified

src/main/java/org/apache/commons/beanutils/converters/AbstractArrayConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public abstract class AbstractArrayConverter implements Converter {
7272
/**
7373
* The default value specified to our Constructor, if any.
7474
*/
75-
protected Object defaultValue = null;
75+
protected Object defaultValue;
7676

7777

7878

src/main/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private static <T> T checkConversionResult(final Class<T> type, final Object res
8181
protected Locale locale = Locale.getDefault();
8282

8383
/** The default pattern specified to our Constructor, if any. */
84-
protected String pattern = null;
84+
protected String pattern;
8585

8686

8787
/** The flag indicating whether the given pattern string is localized or not. */

src/test/java/org/apache/commons/beanutils/BasicDynaBeanTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static Test suite() {
8585
/**
8686
* The basic test bean for each test.
8787
*/
88-
protected DynaBean bean = null;
88+
protected DynaBean bean;
8989

9090

9191

src/test/java/org/apache/commons/beanutils/BeanComparatorTestCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public static Test suite() {
4141
/**
4242
* The test beans for each test.
4343
*/
44-
protected TestBean bean = null;
45-
protected AlphaBean alphaBean1 = null;
44+
protected TestBean bean;
45+
protected AlphaBean alphaBean1;
4646

4747

4848

49-
protected AlphaBean alphaBean2 = null;
49+
protected AlphaBean alphaBean2;
5050

5151

5252

src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static Test suite() {
7171
/**
7272
* The test bean for each test.
7373
*/
74-
protected TestBean bean = null;
74+
protected TestBean bean;
7575

7676
/**
7777
* The set of properties that should be described.

0 commit comments

Comments
 (0)