Skip to content

Commit

Permalink
Merge pull request FongMi#367 from FongMi/pixeebot/drip-2024-03-19-pi…
Browse files Browse the repository at this point in the history
…xee-java/switch-literal-first

Switch order of literals to prevent NullPointerException
  • Loading branch information
FongMi committed Mar 19, 2024
2 parents 0705d25 + 9168b88 commit a1b27d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ public PageAdapter(@NonNull FragmentManager fm) {
public Fragment getItem(int position) {
if (position == 0) return new HomeFragment();
Class type = (Class) mAdapter.get(position);
return VodFragment.newInstance(getHome().getKey(), type.getTypeId(), type.getStyle(), type.getExtend(false), type.getTypeFlag().equals("1"));
return VodFragment.newInstance(getHome().getKey(), type.getTypeId(), type.getStyle(), type.getExtend(false), "1".equals(type.getTypeFlag()));
}

@Override
Expand All @@ -575,4 +575,4 @@ public int getCount() {
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
}
}
}
}

0 comments on commit a1b27d9

Please sign in to comment.