Github user metatype commented on a diff in the pull request: https://github.com/apache/geode/pull/719#discussion_r135573704 --- Diff: geode-core/src/main/java/org/apache/geode/security/StreamAuthenticator.java --- @@ -46,6 +44,14 @@ void receiveMessage(InputStream inputStream, OutputStream outputStream, boolean isAuthenticated(); /** + * Return an authorization object which can be used to determine which permissions this stream has + * according to the provided securityManager. + * + * Calling this before authentication has succeeded may result in a null return object. --- End diff -- `Optional` doesn't really fix the problem, just introduces more GC pressure :-) Wouldn't it be better to throw `IllegalStateException` when the precondition is not met?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---