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

Make findbugs happy #356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions library/src/com/viewpagerindicator/CirclePageIndicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ protected void onDraw(Canvas canvas) {
float dY;

float pageFillRadius = mRadius;
if (mPaintStroke.getStrokeWidth() > 0) {
boolean hasStroke = mPaintStroke.getStrokeWidth() > 0;
if (hasStroke) {
pageFillRadius -= mPaintStroke.getStrokeWidth() / 2.0f;
}

Expand All @@ -258,7 +259,7 @@ protected void onDraw(Canvas canvas) {
}

// Only paint stroke if a stroke width was non-zero
if (pageFillRadius != mRadius) {
if (hasStroke) {
canvas.drawCircle(dX, dY, mRadius, mPaintStroke);
}
}
Expand Down