----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/792/#review756 -----------------------------------------------------------
Hi Li -- thanks for doing this. A few structuring comments before I go ahead and patch/commit it. Best, John http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/PropertiesModule.java <https://reviews.apache.org/r/792/#comment1582> Why remove the Jetty properties? Not a big deal for me, but curious anyway. http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/Authority.java <https://reviews.apache.org/r/792/#comment1583> Nit: could call this "getOrigin()" since that term is typically used for schema://authority http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/AuthorityProvider.java <https://reviews.apache.org/r/792/#comment1587> Why not rename this BasicAuthorityProvider, and just @Inject a BasicAuthority into it? Then, BasicAuthority itself would have @Inject on its ctor w/ the shindig.host and shindig.port values. Others could still use the class w/o the annotations. http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java <https://reviews.apache.org/r/792/#comment1584> nits: prefer 2-space indent thru this file http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java <https://reviews.apache.org/r/792/#comment1585> Interesting, so you're just using the jetty values as a fallback in the default impl? Suppose that's fine. http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java <https://reviews.apache.org/r/792/#comment1586> I'd recommend pulling jetty.port and jetty.host strings into public static final Strings at the top of the class. http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/ServletRequestContext.java <https://reviews.apache.org/r/792/#comment1589> For better consistency, I'd put all these Strings into public static finals as well so that their value is defined only once throughout the class. http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/ServletRequestContext.java <https://reviews.apache.org/r/792/#comment1588> getServerPort().toString() - johnfargo On 2011-06-01 20:23:51, li xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/792/ > ----------------------------------------------------------- > > (Updated 2011-06-01 20:23:51) > > > Review request for shindig. > > > Summary > ------- > > This is a follow up for Issue 1534: > https://issues.apache.org/jira/browse/SHINDIG-1534 > > As discussed, default AuthorityProvider would implement following logic with > a Provider pattern > > 1. shindig.host & shindig.port defined in web.xml or system property > 2. host/port from HttpServletRequest > 3. Jetty host/port > > link to JIRA: https://issues.apache.org/jira/browse/SHINDIG-1541 > > > Diffs > ----- > > http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1125049 > > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/PropertiesModule.java > 1125049 > > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/Authority.java > PRE-CREATION > > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/AuthorityProvider.java > PRE-CREATION > > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/BasicAuthority.java > PRE-CREATION > > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/ServletRequestContext.java > 1124991 > > http://svn.apache.org/repos/asf/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/servlet/AuthorityProviderTest.java > PRE-CREATION > > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGuiceModule.java > 1124991 > > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultConcatUriManager.java > 1126359 > > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultIframeUriManager.java > 1124991 > > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java > 1124991 > > http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultProxyUriManager.java > 1126359 > > http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/webapp/WEB-INF/web.xml > 1124991 > > Diff: https://reviews.apache.org/r/792/diff > > > Testing > ------- > > built, passed unit tests. tested with > /samplecontainer/examples/commoncontainer/index.html > > > Thanks, > > li > >
