Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(60)

Issue 3305041: Refactor AuthInfo class to final AuthInfoUtil class with static methods (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 3 months ago by henry.saputra
Modified:
14 years, 10 months ago
Reviewers:
johnfargo, Paul Lindner, dev-remailer, plindner1
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

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.

Patch Set 1 #

Patch Set 2 : Update the method names #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -281 lines) Patch
extras/src/test/java/org/apache/shindig/extras/as/dataservice/integration/AbstractActivityStreamsRestfulTests.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/auth/AuthInfo.java View 1 1 chunk +0 lines, -121 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/auth/AuthInfoUtil.java View 1 4 chunks +8 lines, -20 lines 0 comments Download
java/common/src/main/java/org/apache/shindig/auth/AuthenticationServletFilter.java View 1 1 chunk +2 lines, -1 line 0 comments Download
java/common/src/main/java/org/apache/shindig/protocol/ApiServlet.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/auth/AuthInfoTest.java View 1 1 chunk +0 lines, -81 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/auth/AuthInfoUtilTest.java View 1 2 chunks +5 lines, -38 lines 0 comments Download
java/common/src/test/java/org/apache/shindig/protocol/DataServiceServletTest.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/HttpGadgetContext.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/HttpGadgetContextTest.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java View 1 6 chunks +6 lines, -6 lines 0 comments Download
java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/AbstractLargeRestfulTests.java View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4
henry.saputra
Hi, Propose to refactor AuthInfo class to a final AuthInfoUtil class which provides static utility ...
15 years, 3 months ago (2010-11-24 17:30:46 UTC) #1
plindner1
seems okay to me. In general though both of these methods just feel wrong for ...
15 years, 3 months ago (2010-11-28 00:19:29 UTC) #2
henry.saputra
Committed as r1039836
15 years, 3 months ago (2010-11-28 06:49:35 UTC) #3
henry.saputra
15 years, 3 months ago (2010-11-28 06:50:35 UTC) #4
I can open a JIRA case if we want to move storing the auth info as
@requestscoped or as ThreadLocal.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b