You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Vanilla {
public static void main(String[] args) {
List<Student> students = Collections.emptyList();
students.add(new Student("Pedro", 30));
students.add(new Student("João", 25));
Predicate<Student> p = s -> s.name == "Pedro";
Vanilla v = new Vanilla();
}
public List<Student> vanilla(List<Student> students, Predicate<Student> p, Function<Student, Student> f) {
List<Student> result = Collections.emptyList();
boolean over = false;
while(!over) {
List<Student> sub = auxState.subList(0, auxState.size());
if(p.test(auxState.get(0))) {
result.add(f.apply(auxState.get(0)));
}
auxState = sub;
}
return result;
}
public List<Student> withFStream(List<Student> students, Predicate<Student> p, Function<Student, Student> f) {
return Collections.emptyList();
}
An exception occurs:
java.util.EmptyStackException
at java.base/java.util.Stack.peek(Stack.java:102)
at java.base/java.util.Stack.pop(Stack.java:84)
at lang.jimple.internal.Decompiler$InstructionSetVisitor.returnIns(Decompiler.java:1269)
The text was updated successfully, but these errors were encountered:
When we try to decompile this code:
An exception occurs:
The text was updated successfully, but these errors were encountered: