Skip to content

Commit

Permalink
Merge pull request #7 from DevFactory/release/multiple-code-improveme…
Browse files Browse the repository at this point in the history
…nts-fix-1

Multiple code improvements - squid:UselessParenthesesCheck, squid:SwitchLastCaseIsDefaultCheck, squid:S1444
  • Loading branch information
julesbond007 committed Mar 7, 2016
2 parents 490ed60 + baba59f commit ca2da3a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
startActivity(new Intent(getApplicationContext(),
JigsawHistoryActivity.class));
return true;
default:
break;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private void openNewDrawingDialog() {
.title(R.string.action_new_drawing)
.positiveText(R.string.action_ok)
.negativeText(R.string.action_cancel)
.content((R.string.action_new_q))
.content(R.string.action_new_q)
.show();
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/jigdraw/draw/util/DBUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private DBUtil() {}
public static final String ORIGINAL_SELECTION_NULL = "original is null";

/** all columns selection */
public static String[] ALL_COLUMNS = new String[]{ID_COLUMN, NAME_COLUMN,
public final static String[] ALL_COLUMNS = new String[]{ID_COLUMN, NAME_COLUMN,
IMAGE_COLUMN, DESC_COLUMN, ORIGINAL_COLUMN};

/** arguments to set for the prepared statements */
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/jigdraw/draw/views/JigsawGridView.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public int getPositionForID(long itemId) {
}

private OrderableAdapter getAdapterInterface() {
return ((OrderableAdapter) getAdapter());
return (OrderableAdapter) getAdapter();
}

private long getId(int position) {
Expand Down Expand Up @@ -578,7 +578,7 @@ private void handleCellSwitch() {
View view = getViewForId(id);
if (view != null) {
Point targetColumnRowPair = getColumnAndRowForView(view);
if ((aboveRight(targetColumnRowPair, mobileColumnRowPair)
if (aboveRight(targetColumnRowPair, mobileColumnRowPair)
&& deltaYTotal < view.getBottom()
&& deltaXTotal > view.getLeft()
|| aboveLeft(targetColumnRowPair, mobileColumnRowPair)
Expand All @@ -601,7 +601,7 @@ private void handleCellSwitch() {
+ mOverlapIfSwitchStraightLine || left(
targetColumnRowPair, mobileColumnRowPair)
&& deltaXTotal < view.getRight()
- mOverlapIfSwitchStraightLine)) {
- mOverlapIfSwitchStraightLine) {
float xDiff = Math.abs(GridUtil.getViewX(view)
- GridUtil.getViewX(mMobileView));
float yDiff = Math.abs(GridUtil.getViewY(view)
Expand Down

0 comments on commit ca2da3a

Please sign in to comment.