Statement unnecessarily nested within else clause.
This commit is contained in:
parent
b2ec67b54a
commit
5e5ba1b812
|
@ -228,13 +228,7 @@ public static Collection<Thread> findThreadsByName(final String threadName) {
|
|||
*/
|
||||
public static Thread findThreadById(final long threadId) {
|
||||
final Collection<Thread> result = findThreads(new ThreadIdPredicate(threadId));
|
||||
|
||||
if(result.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
return result.iterator().next();
|
||||
}
|
||||
|
||||
return result.isEmpty() ? null : result.iterator().next();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue