{"action":"opened","issue":{"url":"https://api.github.com/repos/codenvy/che-core/issues/212","labels_url":"https://api.github.com/repos/codenvy/che-core/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/codenvy/che-core/issues/212/comments","events_url":"https://api.github.com/repos/codenvy/che-core/issues/212/events","html_url":"https://github.com/codenvy/che-core/issues/212","id":103544203,"number":212,"title":"Probable problems in CronExpression.java","user":{"login":"alexVengrovsk","id":8675954,"avatar_url":"https://avatars.githubusercontent.com/u/8675954?v=3","gravatar_id":"","url":"https://api.github.com/users/alexVengrovsk","html_url":"https://github.com/alexVengrovsk","followers_url":"https://api.github.com/users/alexVengrovsk/followers","following_url":"https://api.github.com/users/alexVengrovsk/following{/other_user}","gists_url":"https://api.github.com/users/alexVengrovsk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexVengrovsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexVengrovsk/subscriptions","organizations_url":"https://api.github.com/users/alexVengrovsk/orgs","repos_url":"https://api.github.com/users/alexVengrovsk/repos","events_url":"https://api.github.com/users/alexVengrovsk/events{/privacy}","received_events_url":"https://api.github.com/users/alexVengrovsk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-27T16:12:31Z","updated_at":"2015-08-27T16:12:31Z","closed_at":null,"body":"Here is a method, that looks very strange for me (even if it wasn't use so far):\r\n```\r\n/**\r\n     * Indicates whether the specified cron expression can be parsed into a\r\n     * valid cron expression\r\n     *\r\n     * @param cronExpression\r\n     *         the expression to evaluate\r\n     * @return a boolean indicating whether the given expression is a valid cron\r\n     * expression\r\n     */\r\n    public static boolean isValidExpression(String cronExpression) {\r\n        new CronExpression(cronExpression);\r\n        return true;\r\n    }\r\n```\r\nIt seems to be a validator for String parameter. It returns boolean. But, here is a thing - this method returns or true or a RuntimeException (IllegalArgumentException) and never returns false.\r\n\r\nNot a very good behavior for validation. Especially, when no such information about this way of behavior in the method's contract (I mean - Javadoc).\r\n\r\nAnd one more serious issue - productivity overhead, caused by creation of the new instance of IllegalArgumentException class.\r\n\r\n"}}