Skip to content

Commit

Permalink
Fix some compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
h6ah4i committed Jul 27, 2015
1 parent 8d736ec commit fb7059b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,9 @@ dependencies {
compile 'com.android.support:recyclerview-v7:22.2.1'
}

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}

// NOTE: this line should be place at end of the file
apply from: '../common/android-maven-publish.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ private int getOriginalPosition(int position) {
//
// SwipeableItemAdapter implementations
//
@SuppressWarnings("unchecked")
@Override
public int onGetSwipeReactionType(VH holder, int position, int x, int y) {
RecyclerView.Adapter adapter = getWrappedAdapter();
Expand All @@ -403,6 +404,7 @@ public int onGetSwipeReactionType(VH holder, int position, int x, int y) {
return swipeableItemAdapter.onGetSwipeReactionType(holder, correctedPosition, x, y);
}

@SuppressWarnings("unchecked")
@Override
public void onSetSwipeBackground(VH holder, int position, int type) {
RecyclerView.Adapter adapter = getWrappedAdapter();
Expand All @@ -416,6 +418,7 @@ public void onSetSwipeBackground(VH holder, int position, int type) {
swipeableItemAdapter.onSetSwipeBackground(holder, correctedPosition, type);
}

@SuppressWarnings("unchecked")
@Override
public int onSwipeItem(VH holder, int position, int result) {
RecyclerView.Adapter adapter = getWrappedAdapter();
Expand All @@ -429,6 +432,7 @@ public int onSwipeItem(VH holder, int position, int result) {
return swipeableItemAdapter.onSwipeItem(holder, correctedPosition, result);
}

@SuppressWarnings("unchecked")
@Override
public void onPerformAfterSwipeReaction(VH holder, int position, int result, int reaction) {
RecyclerView.Adapter adapter = getWrappedAdapter();
Expand Down

0 comments on commit fb7059b

Please sign in to comment.