Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Code quality fix - Array designators "[]" should be on the type, not the variable. #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public JSONObject(Object bean) {
* An array of strings, the names of the fields to be obtained from
* the object.
*/
public JSONObject(Object object, String names[]) {
public JSONObject(Object object, String[] names) {
this();
Class<? extends Object> c = object.getClass();
for (int i = 0; i < names.length; i += 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/json/JSONWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class JSONWriter {
/**
* The object/array stack.
*/
private JSONObject stack[];
private JSONObject[] stack;

/**
* The stack top index. A value of 0 indicates that the stack is empty.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/us/monoid/web/jp/javacc/SimpleCharStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public class SimpleCharStream
int tokenBegin;
/** Position in buffer. */
public int bufpos = -1;
protected int bufline[];
protected int bufcolumn[];
protected int[] bufline;
protected int[] bufcolumn;

protected int column = 0;
protected int line = 1;
Expand All @@ -39,8 +39,8 @@ public class SimpleCharStream
protected void ExpandBuff(boolean wrapAround)
{
char[] newbuffer = new char[bufsize + 2048];
int newbufline[] = new int[bufsize + 2048];
int newbufcolumn[] = new int[bufsize + 2048];
int[] newbufline = new int[bufsize + 2048];
int[] newbufcolumn = new int[bufsize + 2048];

try
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/web/jp/javacc/SimpleNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void jjtAddChild(Node n, int i) {
if (children == null) {
children = new Node[i + 1];
} else if (i >= children.length) {
Node c[] = new Node[i + 1];
Node[] c = new Node[i + 1];
System.arraycopy(children, 0, c, 0, children.length);
children = c;
}
Expand Down