title: finall() in Spring services
body: <p>Yesterday I've got access to the new project in my company and I have found this</p>
  
  <pre><code>public List&lt;User&gt; findNotActiveUsers() {
      return this.userRepository.findAll().splititerator()
              .filter(u -&gt; u.isActive())
              .collect(Collect.toList());
  }
  </code></pre>
  
  <p>Is this a good way to find all the active users? Or should it be done in a repository like this?</p>
  
  <pre><code>public interface UserRepository extends JpaRepository&lt;Long, User&gt; {
      @Query("SELECT user FROM User user WHERE user.active IS TRUE")
      List&lt;User&gt; findActiveUsers();
  }
  </code></pre>
  
  <p>And If first solution is correct what about performance?</p>