Skip to content

Commit

Permalink
fix pojo tests with final attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
frecco75 authored and sta-szek committed Jun 8, 2020
1 parent 5e54335 commit 0860ba7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.util.List;
import java.util.stream.Collectors;

import static pl.pojo.tester.internal.utils.FieldUtils.isFinal;

public class SetterTester extends AbstractTester {

public SetterTester() {
Expand Down Expand Up @@ -46,6 +48,7 @@ private void testSetterAndGetter(final SetterAndFieldPair eachPair, final Object
private List<SetterAndFieldPair> findSetterAndGetterPairsForFields(final Class<?> testedClass,
final List<Field> fields) {
return fields.stream()
.filter(field -> ! isFinal(field))
.map(fieldName -> findSetterAndGetterPairForField(testedClass, fieldName))
.collect(Collectors.toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private class GoodPojoSetter {
private int a;
private int b;
private int c;
private int d;
private final int d = 0;

}

Expand Down

0 comments on commit 0860ba7

Please sign in to comment.