Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29453722: Noissue - Lint adjustments and optimizations (Closed)

Created:
June 1, 2017, 9:30 p.m. by diegocarloslima
Modified:
July 20, 2017, 12:20 p.m.
Reviewers:
anton, jens
CC:
Felix Dahlke, René Jeschke
Visibility:
Public.

Description

Noissue - Lint adjustments and optimizations

Patch Set 1 #

Total comments: 23

Patch Set 2 : Adjustments based on review comments #

Total comments: 2

Patch Set 3 : Adjusting HashSet initialization in Subscription #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -81 lines) Patch
M adblockplussbrowser/res/values/sysarrays.xml View 1 chunk +2 lines, -2 lines 0 comments Download
M adblockplussbrowser/res/values/sysstrings.xml View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M adblockplussbrowser/res/xml/preferences_main.xml View 1 2 1 chunk +1 line, -1 line 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java View 1 2 3 chunks +13 lines, -12 lines 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java View 1 2 1 chunk +1 line, -1 line 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MoreBlockingPreferenceCategory.java View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/DefaultSubscriptionInfo.java View 2 chunks +3 lines, -1 line 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Downloader.java View 4 chunks +6 lines, -10 lines 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java View 1 2 6 chunks +14 lines, -18 lines 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java View 1 2 6 chunks +22 lines, -27 lines 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/SubscriptionInfo.java View 1 3 chunks +4 lines, -2 lines 0 comments Download
M adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java View 1 3 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 11
diegocarloslima
June 1, 2017, 9:32 p.m. (2017-06-01 21:32:23 UTC) #1
anton
https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java File adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java (right): https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java#newcode194 adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java:194: final boolean enabled = ((Boolean) newValue); minor: double brackets ...
June 2, 2017, 7:39 a.m. (2017-06-02 07:39:56 UTC) #2
jens
https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java File adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java (left): https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java#oldcode69 adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java:69: final boolean applicationActived = getBooleanPref(prefs, key, false); minor, but ...
June 2, 2017, 10:50 a.m. (2017-06-02 10:50:01 UTC) #3
diegocarloslima
https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java File adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java (left): https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java#oldcode69 adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java:69: final boolean applicationActived = getBooleanPref(prefs, key, false); On 2017/06/02 ...
June 2, 2017, 9:03 p.m. (2017-06-02 21:03:42 UTC) #4
jens
https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java File adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java (right): https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java#newcode47 adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java:47: import org.adblockplus.sbrowser.contentblocker.MainPreferences; On 2017/06/02 21:03:42, diegocarloslima wrote: > On ...
June 6, 2017, 9:39 a.m. (2017-06-06 09:39:56 UTC) #5
jens
On 2017/06/06 09:39:56, jens wrote: > https://codereview.adblockplus.org/29453722/diff/29453723/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java > File > adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java > (right): > > ...
June 14, 2017, 10:43 a.m. (2017-06-14 10:43:22 UTC) #6
anton
https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java File adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java (right): https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java#newcode96 adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java:96: Collections.addAll(ALLOWED_META_KEYS, ALLOWED_META_KEYS_ARRAY); Can we replace: ``` private static final ...
June 16, 2017, 1:38 p.m. (2017-06-16 13:38:44 UTC) #7
diegocarloslima
https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java File adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java (right): https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java#newcode96 adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java:96: Collections.addAll(ALLOWED_META_KEYS, ALLOWED_META_KEYS_ARRAY); On 2017/06/16 13:38:44, anton wrote: > Can ...
July 19, 2017, 4:39 p.m. (2017-07-19 16:39:24 UTC) #8
anton
On 2017/07/19 16:39:24, diegocarloslima wrote: > https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java > File > adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java > (right): > > ...
July 20, 2017, 5:39 a.m. (2017-07-20 05:39:29 UTC) #9
diegocarloslima
On 2017/07/20 05:39:29, anton wrote: > On 2017/07/19 16:39:24, diegocarloslima wrote: > > > https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java ...
July 20, 2017, 11:42 a.m. (2017-07-20 11:42:36 UTC) #10
anton
July 20, 2017, 11:44 a.m. (2017-07-20 11:44:25 UTC) #11
On 2017/07/20 11:42:36, diegocarloslima wrote:
> On 2017/07/20 05:39:29, anton wrote:
> > On 2017/07/19 16:39:24, diegocarloslima wrote:
> > >
> >
>
https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser...
> > > File
> > >
> >
>
adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java
> > > (right):
> > > 
> > >
> >
>
https://codereview.adblockplus.org/29453722/diff/29464683/adblockplussbrowser...
> > >
> >
>
adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java:96:
> > > Collections.addAll(ALLOWED_META_KEYS, ALLOWED_META_KEYS_ARRAY);
> > > On 2017/06/16 13:38:44, anton wrote:
> > > > Can we replace:
> > > > ```
> > > > private static final HashSet<String> ALLOWED_META_KEYS = new
HashSet<>();
> > > > ...
> > > > Collections.addAll(ALLOWED_META_KEYS, ALLOWED_META_KEYS_ARRAY);
> > > > ```
> > > > 
> > > > with just:
> > > > ```
> > > > private static final HashSet<String> ALLOWED_META_KEYS = new
> > > > HashSet<>(ALLOWED_META_KEYS_ARRAY);
> > > > ```
> > > > ?
> > > 
> > > Yeah its possible to initialize the HashSet without the static block. Just
> > need
> > > a few more adjustments. I'll upload a new patch
> > 
> > If it was patch 3 to init arrays in ctor then it contains too much other
> > changes. Was it intentionally?
> 
> This is because the patch 2 was a while a go. I was unsure on which revision
it
> was made the diff, so I rebased the changes to the 'master' revision, that's
why
> some files have changed. But if you click on the diffs individually, you'll
see
> that the only change from patch 2 to 3 made by this review was on Subscription
> class

Got it. LGTM then

Powered by Google App Engine
This is Rietveld