Feuermagier / autograder

Automatic grading of student's Java code
MIT License
13 stars 7 forks source link

Generalize the `addAll` check #571

Open Luro02 opened 1 month ago

Luro02 commented 1 month ago

Description

This check:

for (var elem : collection) {
    list.add(elem);
}
// -> can be written as:
list.addAll(collection);

can be generalized to work with other methods like