Skip to content

Commit 74a3e38

Browse files
committed
Code refactoring to fix some lint warnings
1 parent 696f945 commit 74a3e38

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/components/AxisBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ public void disableGridDashedLine() {
603603
* @return
604604
*/
605605
public boolean isGridDashedLineEnabled() {
606-
return mGridDashPathEffect == null ? false : true;
606+
return mGridDashPathEffect != null;
607607
}
608608

609609
/**
@@ -655,7 +655,7 @@ public void disableAxisLineDashedLine() {
655655
* @return
656656
*/
657657
public boolean isAxisLineDashedLineEnabled() {
658-
return mAxisLineDashPathEffect == null ? false : true;
658+
return mAxisLineDashPathEffect != null;
659659
}
660660

661661
/**

MPChartLib/src/main/java/com/github/mikephil/charting/data/BaseDataSet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ public abstract class BaseDataSet<T extends Entry> implements IDataSet<T> {
9292
* Default constructor.
9393
*/
9494
public BaseDataSet() {
95-
mColors = new ArrayList<Integer>();
96-
mValueColors = new ArrayList<Integer>();
95+
mColors = new ArrayList<>();
96+
mValueColors = new ArrayList<>();
9797

9898
// default color
9999
mColors.add(Color.rgb(140, 234, 255));
@@ -201,7 +201,7 @@ public void setColors(int[] colors, Context c) {
201201
*/
202202
public void addColor(int color) {
203203
if (mColors == null)
204-
mColors = new ArrayList<Integer>();
204+
mColors = new ArrayList<>();
205205
mColors.add(color);
206206
}
207207

@@ -244,7 +244,7 @@ public void setColors(int[] colors, int alpha) {
244244
*/
245245
public void resetColors() {
246246
if (mColors == null) {
247-
mColors = new ArrayList<Integer>();
247+
mColors = new ArrayList<>();
248248
}
249249
mColors.clear();
250250
}

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ protected void drawRoundedSlices(Canvas c) {
10551055
}
10561056

10571057
/**
1058-
* Releases the drawing bitmap. This should be called when {@link LineChart#onDetachedFromWindow()}.
1058+
* Releases the drawing bitmap. This should be called when .
10591059
*/
10601060
public void releaseBitmap() {
10611061
if (mBitmapCanvas != null) {

0 commit comments

Comments
 (0)