{"action":"created","issue":{"url":"https://api.github.com/repos/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964","labels_url":"https://api.github.com/repos/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964/labels{/name}","comments_url":"https://api.github.com/repos/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964/comments","events_url":"https://api.github.com/repos/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964/events","html_url":"https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964","id":115919340,"number":964,"title":"spring:message default text behaviour broken by JsonMessageSource ","user":{"login":"strangeweaver","id":10712510,"avatar_url":"https://avatars.githubusercontent.com/u/10712510?v=3","gravatar_id":"","url":"https://api.github.com/users/strangeweaver","html_url":"https://github.com/strangeweaver","followers_url":"https://api.github.com/users/strangeweaver/followers","following_url":"https://api.github.com/users/strangeweaver/following{/other_user}","gists_url":"https://api.github.com/users/strangeweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/strangeweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strangeweaver/subscriptions","organizations_url":"https://api.github.com/users/strangeweaver/orgs","repos_url":"https://api.github.com/users/strangeweaver/repos","events_url":"https://api.github.com/users/strangeweaver/events{/privacy}","received_events_url":"https://api.github.com/users/strangeweaver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-09T16:59:34Z","updated_at":"2015-11-09T17:31:55Z","closed_at":null,"body":"spring:message is supposed to output the resolved code or, failing resolution, should output the value in the text attribute. should both be empty it will output null.\r\n\r\nThis behaviour is broken by the current implementation of JsonMessageSource.resolveCode method which returns the code if the code fails to resolve contrary to the Javadoc in AbstractMessageSource which specifies.\r\n\r\n@return the MessageFormat for the message, or {@code null} if not found\r\n\r\nthis can be resolved by using the following resolveCode method body\r\n\r\n        JsonObject lang = getLanguageMap(locale);\r\n\r\n        String value = getValue(code, lang);\r\n\r\n        if (value == null) {\r\n            // if we haven't found anything, try the default locale\r\n            lang = getLanguageMap(fallbackLocale);\r\n            value = getValue(code, lang);\r\n        }\r\n\r\n        return value == null ? null : new MessageFormat(value, locale);"},"comment":{"url":"https://api.github.com/repos/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/comments/155133435","html_url":"https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964#issuecomment-155133435","issue_url":"https://api.github.com/repos/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues/964","id":155133435,"user":{"login":"strangeweaver","id":10712510,"avatar_url":"https://avatars.githubusercontent.com/u/10712510?v=3","gravatar_id":"","url":"https://api.github.com/users/strangeweaver","html_url":"https://github.com/strangeweaver","followers_url":"https://api.github.com/users/strangeweaver/followers","following_url":"https://api.github.com/users/strangeweaver/following{/other_user}","gists_url":"https://api.github.com/users/strangeweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/strangeweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strangeweaver/subscriptions","organizations_url":"https://api.github.com/users/strangeweaver/orgs","repos_url":"https://api.github.com/users/strangeweaver/repos","events_url":"https://api.github.com/users/strangeweaver/events{/privacy}","received_events_url":"https://api.github.com/users/strangeweaver/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T17:31:55Z","updated_at":"2015-11-09T17:31:55Z","body":"returning null means default message behaviour is handled from the AbstractMessageSource class this can be affected by for example setting the useCodeAsDefaultMessage however if the useCodeAsDefaultMessage is set false it will hand message resolution to the renderDefaultMessage which causes the spring:message tag to provide the default behaviour as specified in the spring.tld file.\r\n\r\n...\\org\\springframework\\spring-webmvc\\4.1.7.RELEASE\\spring-webmvc-4.1.7.RELEASE.jar!\\META-INF\\spring.tld"}}