{"action":"opened","issue":{"url":"https://api.github.com/repos/LeKaitoW/raox/issues/597","repository_url":"https://api.github.com/repos/LeKaitoW/raox","labels_url":"https://api.github.com/repos/LeKaitoW/raox/issues/597/labels{/name}","comments_url":"https://api.github.com/repos/LeKaitoW/raox/issues/597/comments","events_url":"https://api.github.com/repos/LeKaitoW/raox/issues/597/events","html_url":"https://github.com/LeKaitoW/raox/issues/597","id":320579292,"number":597,"title":"Varargs в аргументах метода недоспупны","user":{"login":"mikhailmineev","id":6087009,"avatar_url":"https://avatars0.githubusercontent.com/u/6087009?v=4","gravatar_id":"","url":"https://api.github.com/users/mikhailmineev","html_url":"https://github.com/mikhailmineev","followers_url":"https://api.github.com/users/mikhailmineev/followers","following_url":"https://api.github.com/users/mikhailmineev/following{/other_user}","gists_url":"https://api.github.com/users/mikhailmineev/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhailmineev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhailmineev/subscriptions","organizations_url":"https://api.github.com/users/mikhailmineev/orgs","repos_url":"https://api.github.com/users/mikhailmineev/repos","events_url":"https://api.github.com/users/mikhailmineev/events{/privacy}","received_events_url":"https://api.github.com/users/mikhailmineev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-06T10:06:45Z","updated_at":"2018-05-06T10:06:45Z","closed_at":null,"author_association":"COLLABORATOR","body":"Для логирования приходится сейчас писать что-то типа: \r\n```java\r\ninfo(String.format(\"Заказ обработан %d р. %s\\t\\tБаланс: %d %s\", price, order.resulted, orderStats.balance, order.original))\r\n```\r\n\r\n```java\r\nenum Level {DEBUG, INFO}\r\n\r\nvoid info(String text){\r\n\tif (logLevel.ordinal <= Level.INFO.ordinal)\r\n\t\tlog(Level.INFO + \"\\t\" + text)\r\n}\r\n```\r\nХочется же такое:\r\n```java\r\ninfo(\"Заказ обработан %d р. %s\\t\\tБаланс: %d %s\", price, order.resulted, orderStats.balance, order.original)\r\n```\r\n\r\n```java\r\nenum Level {DEBUG, INFO}\r\n\r\nvoid info(String text, Object... args){\r\n\tif (logLevel.ordinal <= Level.INFO.ordinal)\r\n\t\tlog(Level.INFO + \"\\t\" + String.format(text, args))\r\n}\r\n```\r\nНо при объявлении метода с varargs появляется ошибка:\r\nMultiple markers at this line\r\n- mismatched input '..' expecting RULE_ID\r\n- extraneous input 'args' expecting ')'\r\nВоспроизводится созданием метода:\r\n```java\r\nvoid info(String text, Object... args){\r\n}\r\n```"}}
{"actor":{"display_login":"mikhailmineev"}}