{"action":"opened","issue":{"url":"https://api.github.com/repos/broadinstitute/barclay/issues/137","repository_url":"https://api.github.com/repos/broadinstitute/barclay","labels_url":"https://api.github.com/repos/broadinstitute/barclay/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/broadinstitute/barclay/issues/137/comments","events_url":"https://api.github.com/repos/broadinstitute/barclay/issues/137/events","html_url":"https://github.com/broadinstitute/barclay/issues/137","id":319852292,"number":137,"title":"Java 9 deprecation","user":{"login":"osallou","id":1024098,"avatar_url":"https://avatars2.githubusercontent.com/u/1024098?v=4","gravatar_id":"","url":"https://api.github.com/users/osallou","html_url":"https://github.com/osallou","followers_url":"https://api.github.com/users/osallou/followers","following_url":"https://api.github.com/users/osallou/following{/other_user}","gists_url":"https://api.github.com/users/osallou/gists{/gist_id}","starred_url":"https://api.github.com/users/osallou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osallou/subscriptions","organizations_url":"https://api.github.com/users/osallou/orgs","repos_url":"https://api.github.com/users/osallou/repos","events_url":"https://api.github.com/users/osallou/events{/privacy}","received_events_url":"https://api.github.com/users/osallou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-03T09:45:28Z","updated_at":"2018-05-03T09:45:28Z","closed_at":null,"author_association":"NONE","body":"While compiling with JDK 9, I got some deprecation warning that turned to errors.\r\n\r\nHere is patch to fix issue\r\n\r\n    --- a/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java\r\n    +++ b/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java\r\n    @@ -1066,7 +1066,7 @@\r\n         private void createCollection(final Field field, final Object callerArguments, final String annotationType)\r\n                 throws IllegalAccessException {\r\n             try {\r\n    -            field.set(callerArguments, field.getType().newInstance());\r\n    +            field.set(callerArguments, field.getType().getConstructor().newInstance());\r\n             } catch (final Exception ex) {\r\n                 try {\r\n                     field.set(callerArguments, new ArrayList<>());\r\n    --- a/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java\r\n    +++ b/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java\r\n    @@ -879,7 +879,7 @@\r\n          private void createCollection(final Field field, final Object callerOptions, final String annotationType)\r\n                 throws IllegalAccessException {\r\n             try {\r\n    -            field.set(callerOptions, field.getType().newInstance());\r\n    +            field.set(callerOptions, field.getType().getConstructor().newInstance());\r\n             } catch (final Exception ex) {\r\n                 try {\r\n                     field.set(callerOptions, new ArrayList<>());\r\n"}}
{"actor":{"display_login":"osallou"}}