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

Issue 1712045: Fixes for findbugs issues in shindig/java/gadgets

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

Description

Incremental fix for https://issues.apache.org/jira/browse/SHINDIG-1374, which addresses the following bugs: Method org.apache.shindig.gadgets.uri.DefaultConcatUriManager.makeConcatUri(ConcatUriManager$ConcatUri, boolean, String) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead Method org.apache.shindig.gadgets.uri.DefaultConcatUriManager.process(Uri) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead org.apache.shindig.gadgets.servlet.HttpGadgetContext.getDebug(HttpServletRequest) has Boolean return type and returns explicit null org.apache.shindig.gadgets.servlet.HttpGadgetContext.getIgnoreCache(HttpServletRequest) has Boolean return type and returns explicit null org.apache.shindig.gadgets.servlet.ConcatProxyServlet.doFetchConcatResources(HttpServletResponse, ConcatUriManager$ConcatUri) may fail to close stream Suspicious comparison of Boolean references in org.apache.shindig.gadgets.features.FeatureRegistry$FeatureCacheKey.equals(Object) Call to equals() comparing different types in org.apache.shindig.gadgets.http.HttpResponseBuilder.setEncoding(Charset) Should org.apache.shindig.gadgets.servlet.ConcatProxyServlet$RequestContext be a _static_ inner class? org.apache.shindig.gadgets.uri.ProxyUriBase defines equals and uses Object.hashCode() org.apache.shindig.gadgets.uri.ProxyUriManager$ProxyUri defines equals and uses Object.hashCode()

Patch Set 1 #

Total comments: 2

Patch Set 2 : Second set of fixes #

Patch Set 3 : Patch which address non-transient non-serializable Servlet instance fields #

Patch Set 4 : Simplified patch for serialization issues flagged by Findbugs #

Messages

Total messages: 17
janluehe
13 years, 10 months ago (2010-06-24 00:47:46 UTC) #1
johnfargo
http://codereview.appspot.com/1712045/diff/1/2 File java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponseBuilder.java (right): http://codereview.appspot.com/1712045/diff/1/2#newcode117 java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponseBuilder.java:117: values.add(newContentType); FMI how is this impl any different?
13 years, 10 months ago (2010-06-24 01:03:46 UTC) #2
janluehe
http://codereview.appspot.com/1712045/diff/1/2 File java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponseBuilder.java (right): http://codereview.appspot.com/1712045/diff/1/2#newcode117 java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponseBuilder.java:117: values.add(newContentType); On 2010/06/24 01:03:46, johnfargo wrote: > FMI how ...
13 years, 10 months ago (2010-06-24 01:16:46 UTC) #3
johnfargo
Ah, missed the non-diffed lines. Lgtm. Will commit if nobody else has by the time ...
13 years, 10 months ago (2010-06-24 01:32:06 UTC) #4
janluehe
Thanks for committing, John! I'm about to create Patch Set 2, which contains fixes for ...
13 years, 10 months ago (2010-06-24 17:59:19 UTC) #5
johnfargo
Looks like Paul got to it before I did -- happy to look at patch ...
13 years, 10 months ago (2010-06-24 18:17:11 UTC) #6
janluehe
Second set of fixes
13 years, 10 months ago (2010-06-24 18:46:55 UTC) #7
plindner_linkedin.com
lgtm... committing. On Thu, Jun 24, 2010 at 11:46 AM, <janluehe@gmail.com> wrote: > Second set ...
13 years, 10 months ago (2010-06-24 19:31:03 UTC) #8
janluehe
The remaining Findbugs issues complain about non-transient non-serializable instance fields in the various Servlets of ...
13 years, 10 months ago (2010-06-25 04:36:43 UTC) #9
janluehe
Patch which address non-transient non-serializable Servlet instance fields
13 years, 10 months ago (2010-06-25 04:37:46 UTC) #10
plindner_linkedin.com
hmm. I'm not a big fan of how this is implemented. I think it might ...
13 years, 10 months ago (2010-06-26 00:44:29 UTC) #11
janluehe
Thanks, Paul. How would this work during deserialization, though? On 2010/06/26 00:44:29, plindner_linkedin.com wrote: > ...
13 years, 10 months ago (2010-06-26 00:56:07 UTC) #12
Paul Lindner
Hrm, that's true... Also note that the injector itself is stored in InjectedServlet, that would ...
13 years, 10 months ago (2010-06-26 01:29:51 UTC) #13
janluehe
I actually don't see any need for Injector to be an instance field of InjectedServlet: ...
13 years, 10 months ago (2010-06-26 02:36:01 UTC) #14
janluehe
I thought about this some more and reworked the patch: Any Servlet that is serialized ...
13 years, 10 months ago (2010-07-01 17:57:18 UTC) #15
janluehe
Simplified patch for serialization issues flagged by Findbugs
13 years, 10 months ago (2010-07-01 17:58:52 UTC) #16
Paul Lindner
13 years, 10 months ago (2010-07-02 00:50:50 UTC) #17
lgtm - patch applied.
Sign in to reply to this message.

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