{"action":"created","issue":{"url":"https://api.github.com/repos/JabRef/jabref/issues/1916","repository_url":"https://api.github.com/repos/JabRef/jabref","labels_url":"https://api.github.com/repos/JabRef/jabref/issues/1916/labels{/name}","comments_url":"https://api.github.com/repos/JabRef/jabref/issues/1916/comments","events_url":"https://api.github.com/repos/JabRef/jabref/issues/1916/events","html_url":"https://github.com/JabRef/jabref/issues/1916","id":174905388,"number":1916,"title":"Refactor Integrity Checker to use lamdbas","user":{"login":"Siedlerchr","id":320228,"avatar_url":"https://avatars.githubusercontent.com/u/320228?v=3","gravatar_id":"","url":"https://api.github.com/users/Siedlerchr","html_url":"https://github.com/Siedlerchr","followers_url":"https://api.github.com/users/Siedlerchr/followers","following_url":"https://api.github.com/users/Siedlerchr/following{/other_user}","gists_url":"https://api.github.com/users/Siedlerchr/gists{/gist_id}","starred_url":"https://api.github.com/users/Siedlerchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Siedlerchr/subscriptions","organizations_url":"https://api.github.com/users/Siedlerchr/orgs","repos_url":"https://api.github.com/users/Siedlerchr/repos","events_url":"https://api.github.com/users/Siedlerchr/events{/privacy}","received_events_url":"https://api.github.com/users/Siedlerchr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JabRef/jabref/labels/code-quality","name":"code-quality","color":"000000"},{"url":"https://api.github.com/repos/JabRef/jabref/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-03T16:50:35Z","updated_at":"2016-09-04T16:22:01Z","closed_at":null,"body":"Follow up from #1914 \r\nAs we have a nice functional interface (checker ) we could use lambdas instead of the private static class things... Would clean up the code, for example it would look like this:\r\n\r\n```java\r\n  Checker myTypeChecker = (BibEntry entry)->{\r\n        Optional<String> value = entry.getField(FieldName.PAGES);\r\n        if (!value.isPresent()) {\r\n            return Collections.emptyList();\r\n        }\r\n\r\n        if (\"proceedings\".equalsIgnoreCase(entry.getType())) {\r\n            return Collections.singletonList(new IntegrityMessage(\r\n                    Localization.lang(\"wrong entry type as proceedings has page numbers\"), entry, FieldName.PAGES));\r\n        }\r\n\r\n        return Collections.emptyList();\r\n    };\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JabRef/jabref/issues/comments/244612642","html_url":"https://github.com/JabRef/jabref/issues/1916#issuecomment-244612642","issue_url":"https://api.github.com/repos/JabRef/jabref/issues/1916","id":244612642,"user":{"login":"stefan-kolb","id":2141507,"avatar_url":"https://avatars.githubusercontent.com/u/2141507?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-kolb","html_url":"https://github.com/stefan-kolb","followers_url":"https://api.github.com/users/stefan-kolb/followers","following_url":"https://api.github.com/users/stefan-kolb/following{/other_user}","gists_url":"https://api.github.com/users/stefan-kolb/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-kolb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-kolb/subscriptions","organizations_url":"https://api.github.com/users/stefan-kolb/orgs","repos_url":"https://api.github.com/users/stefan-kolb/repos","events_url":"https://api.github.com/users/stefan-kolb/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-kolb/received_events","type":"User","site_admin":false},"created_at":"2016-09-04T16:22:01Z","updated_at":"2016-09-04T16:22:01Z","body":"+1 for extracting them to separate classes with explicit tests!"}}
{"actor":{"display_login":"stefan-kolb"}}