{"action":"opened","issue":{"url":"https://api.github.com/repos/google/error-prone/issues/325","labels_url":"https://api.github.com/repos/google/error-prone/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/google/error-prone/issues/325/comments","events_url":"https://api.github.com/repos/google/error-prone/issues/325/events","html_url":"https://github.com/google/error-prone/issues/325","id":75307319,"number":325,"title":"OutputStream implements flush() but close() does not invoke it","user":{"login":"kevinb9n","id":934551,"avatar_url":"https://avatars.githubusercontent.com/u/934551?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinb9n","html_url":"https://github.com/kevinb9n","followers_url":"https://api.github.com/users/kevinb9n/followers","following_url":"https://api.github.com/users/kevinb9n/following{/other_user}","gists_url":"https://api.github.com/users/kevinb9n/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinb9n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinb9n/subscriptions","organizations_url":"https://api.github.com/users/kevinb9n/orgs","repos_url":"https://api.github.com/users/kevinb9n/repos","events_url":"https://api.github.com/users/kevinb9n/events{/privacy}","received_events_url":"https://api.github.com/users/kevinb9n/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-11T18:03:13Z","updated_at":"2015-05-11T18:03:13Z","closed_at":null,"body":"Closing an OutputStream could discard unflushed bytes. While nothing in the spec explicitly forbids that behavior, no user would expect it, and an \"always flush before you close\" guideline would be a burden that would never pay for itself.\r\n\r\nCan we detect OutputStreams that have this problematic behavior somehow?  Unfortunately, I'm sure we can't detect it very reliably, but we could do a smell test and accept some false positives....\r\n\r\nI wanted to capture this idea but I am not sure it is worth worrying about."}}