Forward review request to dev@ - Henry
---------- Forwarded message ---------- Reviewers: dev-remailer_shindig.apache.org, johnfargo, Paul Lindner, Message: Hi, Propose to refactor AuthInfo class to a final AuthInfoUtil class which provides static utility methods instead of member instance methods. The reason is because all the usage for AuthInfo currently just creating new AuthInfo instance and call the method directly to get/set information from/to request object so its not necessary to have instance public methods. For example: new AuthInfo(req).setAuthType(handler.getName()).setSecurityToken(token); Any review/suggestion is welcomed. - Henry Description: The AuthInfo class does not need to provide instance methods because the way it was used just to extract authentication info from request class so the AuthInfo constructor injection with HttpServletReqest does not work or necessary: 1. Change the name from AuthInfo to AuthInfoUtil to reflect that it is just a utility class with static methods. 2. Change all the public methods to become public static. 3. Update the unit test file. 4. Update the caller of this class to use the new AuthInfoUtil class. Please review this at http://codereview.appspot.com/3305041/ Affected files: extras/src/test/java/org/apache/shindig/extras/as/dataservice/integration/AbstractActivityStreamsRestfulTests.java java/common/src/main/java/org/apache/shindig/auth/AuthInfo.java java/common/src/main/java/org/apache/shindig/auth/AuthInfoUtil.java java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java java/common/src/main/java/org/apache/shindig/protocol/ApiServlet.java java/common/src/test/java/org/apache/shindig/auth/AuthInfoTest.java java/common/src/test/java/org/apache/shindig/auth/AuthInfoUtilTest.java java/common/src/test/java/org/apache/shindig/protocol/DataServiceServletTest.java java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/HttpGadgetContext.java java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/HttpGadgetContextTest.java java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/AbstractLargeRestfulTests.java -- Thanks, Henry
