Skip to content

Commit 1bdb52b

Browse files
author
Igor Polevoy
committed
Merge pull request #508 from DevFactory/release/reduntant-field-initializer-fix-1
Code quality fix - Redundant Field Initializer.
2 parents c5f0aa6 + c05b130 commit 1bdb52b

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

activejdbc/src/main/java/org/javalite/activejdbc/Model.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ public abstract class Model extends CallbackSupport implements Externalizable {
6161

6262
private Map<String, Object> attributes = new CaseInsensitiveMap<Object>();
6363
private final Set<String> dirtyAttributeNames = new CaseInsensitiveSet();
64-
private boolean frozen = false;
64+
private boolean frozen;
6565
private MetaModel metaModelLocal;
6666
private ModelRegistry modelRegistryLocal;
6767
private final Map<Class, Model> cachedParents = new HashMap<Class, Model>();
6868
private final Map<Class, List<Model>> cachedChildren = new HashMap<Class, List<Model>>();
6969
private boolean manageTime = true;
70-
private boolean compositeKeyPersisted = false;
70+
private boolean compositeKeyPersisted;
7171
private Errors errors = new Errors();
7272

7373
protected Model() {

activejdbc/src/main/java/org/javalite/activejdbc/Paginator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class Paginator<T extends Model> implements Serializable {
4747
private int currentPage;
4848
private final boolean fullQuery;
4949
private final String countQuery;
50-
private boolean suppressCounts = false;
50+
private boolean suppressCounts;
5151
private Long count = 0L;
5252

5353

activejdbc/src/main/java/org/javalite/activejdbc/validation/NumericValidator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
public class NumericValidator extends ValidatorAdapter {
2929
private final String attribute;
3030

31-
private Double min = null;
32-
private Double max = null;
33-
private boolean allowNull = false, onlyInteger = false, convertNullIfEmpty = false;
31+
private Double min;
32+
private Double max;
33+
private boolean allowNull, onlyInteger, convertNullIfEmpty;
3434

3535

3636
public NumericValidator(String attribute) {

javalite-common/src/main/java/org/javalite/common/Base64.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -733,15 +733,15 @@ private int decode0(byte[] src, int sp, int sl, byte[] dst) {
733733
*/
734734
private static class EncOutputStream extends FilterOutputStream {
735735

736-
private int leftover = 0;
736+
private int leftover;
737737
private int b0, b1, b2;
738-
private boolean closed = false;
738+
private boolean closed;
739739

740740
private final char[] base64; // byte->base64 mapping
741741
private final byte[] newline; // line separator, if needed
742742
private final int linemax;
743743
private final boolean doPadding;// whether or not to pad
744-
private int linepos = 0;
744+
private int linepos;
745745

746746
EncOutputStream(OutputStream os, char[] base64,
747747
byte[] newline, int linemax, boolean doPadding) {
@@ -848,13 +848,13 @@ private static class DecInputStream extends InputStream {
848848
private final InputStream is;
849849
private final boolean isMIME;
850850
private final int[] base64; // base64 -> byte mapping
851-
private int bits = 0; // 24-bit buffer for decoding
851+
private int bits; // 24-bit buffer for decoding
852852
private int nextin = 18; // next available "off" in "bits" for input;
853853
// -> 18, 12, 6, 0
854854
private int nextout = -8; // next available "off" in "bits" for output;
855855
// -> 8, 0, -8 (no byte for output)
856-
private boolean eof = false;
857-
private boolean closed = false;
856+
private boolean eof;
857+
private boolean closed;
858858

859859
DecInputStream(InputStream is, int[] base64, boolean isMIME) {
860860
this.is = is;

javalite-common/src/main/java/org/javalite/common/XmlEntities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static class ArrayEntityMap implements EntityMap {
245245
// TODO this class is not thread-safe
246246
protected final int growBy;
247247

248-
protected int size = 0;
248+
protected int size;
249249

250250
protected String[] names;
251251

javalite-common/src/main/java/org/javalite/http/Request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class Request<T extends Request> {
3535

3636
protected final HttpURLConnection connection;
3737
private boolean connected;
38-
protected boolean redirect = false;
38+
protected boolean redirect;
3939
protected final String url;
4040

4141
public Request(String url, int connectTimeout, int readTimeout) {

0 commit comments

Comments
 (0)