Simplifiable conditional expression. (#941)

This commit is contained in:
Arturo Bernal 2022-08-21 14:51:09 +02:00 committed by GitHub
parent ef68684cb3
commit 3087acb929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ final class MemberUtils {
* @return {@code true} if {@code m} is accessible * @return {@code true} if {@code m} is accessible
*/ */
static boolean isAccessible(final Member member) { static boolean isAccessible(final Member member) {
return member != null && isPublic(member) && !member.isSynthetic(); return isPublic(member) && !member.isSynthetic();
} }
/** /**

View File

@ -165,7 +165,7 @@ public class Streams {
@Override @Override
public boolean tryAdvance(final Consumer<? super T> action) { public boolean tryAdvance(final Consumer<? super T> action) {
return enumeration.hasMoreElements() ? next(action) : false; return enumeration.hasMoreElements() && next(action);
} }
} }