浏览代码

Fix Warning

zhpanvip 4 年之前
父节点
当前提交
32e74a1941

+ 0 - 3
bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java

@@ -32,13 +32,11 @@ import com.zhpan.indicator.IndicatorView;
 import com.zhpan.indicator.annotation.AIndicatorSlideMode;
 import com.zhpan.indicator.annotation.AIndicatorStyle;
 import com.zhpan.indicator.base.IIndicator;
-import com.zhpan.indicator.enums.IndicatorOrientation;
 import com.zhpan.indicator.option.IndicatorOptions;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
 import static com.zhpan.bannerview.BaseBannerAdapter.MAX_VALUE;
 import static com.zhpan.bannerview.constants.IndicatorGravity.CENTER;
 import static com.zhpan.bannerview.constants.IndicatorGravity.END;
@@ -930,7 +928,6 @@ public class BannerViewPager<T> extends RelativeLayout implements LifecycleObser
     /**
      * Set Page Style for Banner
      * {@link PageStyle#NORMAL}
-     * {@link PageStyle#MULTI_PAGE}
      *
      * @return BannerViewPager
      */

+ 1 - 3
bannerview/src/main/java/com/zhpan/bannerview/provider/ReflectLayoutManager.java

@@ -48,9 +48,7 @@ public class ReflectLayoutManager {
                 layoutManager.setAccessible(true);
                 layoutManager.set(mScrollEventAdapter, scrollDurationManger);
             }
-        } catch (NoSuchFieldException e) {
-            e.printStackTrace();
-        } catch (IllegalAccessException e) {
+        } catch (NoSuchFieldException | IllegalAccessException e) {
             e.printStackTrace();
         }
     }

+ 4 - 8
bannerview/src/main/java/com/zhpan/bannerview/provider/ScrollDurationManger.java

@@ -60,16 +60,12 @@ public class ScrollDurationManger extends LinearLayoutManager {
     protected void calculateExtraLayoutSpace(@NonNull RecyclerView.State state,
                                              @NonNull int[] extraLayoutSpace) {
         try {
-            Method method = mParent.getClass().getDeclaredMethod("calculateExtraLayoutSpace", state.getClass(), extraLayoutSpace.getClass());
+            Method method = mParent.getClass()
+                    .getDeclaredMethod("calculateExtraLayoutSpace",
+                            state.getClass(), extraLayoutSpace.getClass());
             method.setAccessible(true);
             method.invoke(mParent, state, extraLayoutSpace);
-        } catch (NoSuchMethodException e) {
-            e.printStackTrace();
-            BannerUtils.log(e.getMessage());
-        } catch (IllegalAccessException e) {
-            e.printStackTrace();
-            BannerUtils.log(e.getMessage());
-        } catch (InvocationTargetException e) {
+        } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
             e.printStackTrace();
             BannerUtils.log(e.getMessage());
         }