{"action":"created","issue":{"url":"https://api.github.com/repos/jqno/equalsverifier/issues/152","repository_url":"https://api.github.com/repos/jqno/equalsverifier","labels_url":"https://api.github.com/repos/jqno/equalsverifier/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/jqno/equalsverifier/issues/152/comments","events_url":"https://api.github.com/repos/jqno/equalsverifier/issues/152/events","html_url":"https://github.com/jqno/equalsverifier/issues/152","id":174412417,"number":152,"title":"ReflectionException: Cannot read class file for some JDK9 classes","user":{"login":"don-vip","id":596867,"avatar_url":"https://avatars.githubusercontent.com/u/596867?v=3","gravatar_id":"","url":"https://api.github.com/users/don-vip","html_url":"https://github.com/don-vip","followers_url":"https://api.github.com/users/don-vip/followers","following_url":"https://api.github.com/users/don-vip/following{/other_user}","gists_url":"https://api.github.com/users/don-vip/gists{/gist_id}","starred_url":"https://api.github.com/users/don-vip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don-vip/subscriptions","organizations_url":"https://api.github.com/users/don-vip/orgs","repos_url":"https://api.github.com/users/don-vip/repos","events_url":"https://api.github.com/users/don-vip/events{/privacy}","received_events_url":"https://api.github.com/users/don-vip/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jqno/equalsverifier/labels/accepted","name":"accepted","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-01T00:51:01Z","updated_at":"2016-09-04T14:34:30Z","closed_at":null,"body":"# What steps will reproduce the problem?\r\n\r\nRun JOSM JUnit tests with JDK9: https://josm.openstreetmap.de/jenkins/job/Java-EarlyAccess-JOSM/jdk=JDK9/lastCompletedBuild/testReport/\r\n\r\n# What is the code that triggers this problem? (first case)\r\n```java\r\n@FunctionalInterface\r\npublic interface Destroyable {\r\n    void destroy();\r\n}\r\n\r\npublic abstract class JosmAction extends javax.swing.AbstractAction implements Destroyable {\r\n}\r\n\r\npublic class CombineWayAction extends JosmAction {\r\n\r\n    /**\r\n     * A pair of nodes.\r\n     */\r\n    public static class NodePair {\r\n        private final Node a;\r\n        private final Node b;\r\n\r\n        /**\r\n         * Constructs a new {@code NodePair}.\r\n         * @param a The first node\r\n         * @param b The second node\r\n         */\r\n        public NodePair(Node a, Node b) {\r\n            this.a = a;\r\n            this.b = b;\r\n        }\r\n\r\n        @Override\r\n        public int hashCode() {\r\n            return Objects.hash(a, b);\r\n        }\r\n\r\n        @Override\r\n        public boolean equals(Object obj) {\r\n            if (this == obj) return true;\r\n            if (obj == null || getClass() != obj.getClass()) return false;\r\n            NodePair nodePair = (NodePair) obj;\r\n            return Objects.equals(a, nodePair.a) && Objects.equals(b, nodePair.b);\r\n        }\r\n    }\r\n}\r\n\r\n    /**\r\n     * Unit test of methods {@link NodePair#equals} and {@link NodePair#hashCode}.\r\n     */\r\n    @Test\r\n    public void testEqualsContract() {\r\n        EqualsVerifier.forClass(NodePair.class).usingGetClass()\r\n            .withPrefabValues(Node.class, new Node(1), new Node(2))\r\n            .verify();\r\n    }\r\n```\r\n# What is the code that triggers this problem? (second case)\r\n```java\r\npublic class ExtensionFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter {\r\n\r\n    private final String extensions;\r\n    private final String description;\r\n    private final String defaultExtension;\r\n\r\n    @Override\r\n    public int hashCode() {\r\n        return Objects.hash(extensions, description, defaultExtension);\r\n    }\r\n\r\n    @Override\r\n    public boolean equals(Object obj) {\r\n        if (this == obj) return true;\r\n        if (obj == null || getClass() != obj.getClass()) return false;\r\n        ExtensionFileFilter that = (ExtensionFileFilter) obj;\r\n        return Objects.equals(extensions, that.extensions) &&\r\n               Objects.equals(description, that.description) &&\r\n               Objects.equals(defaultExtension, that.defaultExtension);\r\n    }\r\n}\r\n\r\n    /**\r\n     * Unit test of methods {@link ExtensionFileFilter#equals} and {@link ExtensionFileFilter#hashCode}.\r\n     */\r\n    @Test\r\n    public void testEqualsContract() {\r\n        EqualsVerifier.forClass(ExtensionFileFilter.class).usingGetClass()\r\n            .verify();\r\n    }\r\n```\r\n# What error message or stack trace does EqualsVerifier give?\r\n```\r\njunit.framework.AssertionFailedError: ReflectionException: Cannot read class file for AbstractAction.\r\nSuppress Warning.ANNOTATION to skip annotation processing phase.\r\n\tat nl.jqno.equalsverifier.EqualsVerifier.handleError(EqualsVerifier.java:381)\r\n\tat nl.jqno.equalsverifier.EqualsVerifier.verify(EqualsVerifier.java:370)\r\n\tat org.openstreetmap.josm.actions.CombineWayActionTest.testEqualsContract(CombineWayActionTest.java:67)\r\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)\r\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)\r\n\tat jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)\r\n\r\njunit.framework.AssertionFailedError: ReflectionException: Cannot read class file for FileFilter.\r\nSuppress Warning.ANNOTATION to skip annotation processing phase.\r\n\tat nl.jqno.equalsverifier.EqualsVerifier.handleError(EqualsVerifier.java:381)\r\n\tat nl.jqno.equalsverifier.EqualsVerifier.verify(EqualsVerifier.java:370)\r\n\tat org.openstreetmap.josm.actions.ExtensionFileFilterTest.testEqualsContract(ExtensionFileFilterTest.java:45)\r\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)\r\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)\r\n\tat jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)\r\n```\r\n# What did you expect?\r\n\r\nTest success, like with JDK8\r\n\r\n# Which version of EqualsVerifier are you using?\r\n\r\n2.1.5\r\n\r\n# Please provide any additional information below.\r\n\r\nComplete source code:\r\nhttps://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java\r\nhttps://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java"},"comment":{"url":"https://api.github.com/repos/jqno/equalsverifier/issues/comments/244606831","html_url":"https://github.com/jqno/equalsverifier/issues/152#issuecomment-244606831","issue_url":"https://api.github.com/repos/jqno/equalsverifier/issues/152","id":244606831,"user":{"login":"jqno","id":862385,"avatar_url":"https://avatars.githubusercontent.com/u/862385?v=3","gravatar_id":"","url":"https://api.github.com/users/jqno","html_url":"https://github.com/jqno","followers_url":"https://api.github.com/users/jqno/followers","following_url":"https://api.github.com/users/jqno/following{/other_user}","gists_url":"https://api.github.com/users/jqno/gists{/gist_id}","starred_url":"https://api.github.com/users/jqno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jqno/subscriptions","organizations_url":"https://api.github.com/users/jqno/orgs","repos_url":"https://api.github.com/users/jqno/repos","events_url":"https://api.github.com/users/jqno/events{/privacy}","received_events_url":"https://api.github.com/users/jqno/received_events","type":"User","site_admin":false},"created_at":"2016-09-04T14:34:29Z","updated_at":"2016-09-04T14:34:29Z","body":"Perhaps the particular use case that I use ASM for, doesn't come up with FindBugs. I tried replacing EqualsVerifier's version of ASM with the 6.0_ALPHA, but that didn't work, unfortunately.\r\n\r\nI'll let you know when I find a solution."}}
{"actor":{"display_login":"jqno"}}