 Issue 29453722:
  Noissue - Lint adjustments and optimizations  (Closed)
    
  
    Issue 29453722:
  Noissue - Lint adjustments and optimizations  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH | 
| 4 * | 4 * | 
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as | 
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. | 
| 8 * | 8 * | 
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, | 
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. | 
| 13 * | 13 * | 
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License | 
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 
| 16 */ | 16 */ | 
| 17 | 17 | 
| 18 package org.adblockplus.sbrowser.contentblocker.engine; | 18 package org.adblockplus.sbrowser.contentblocker.engine; | 
| 19 | 19 | 
| 20 import android.support.annotation.NonNull; | |
| 21 | |
| 20 /** | 22 /** | 
| 21 * Class for querying subscription information from the engine. | 23 * Class for querying subscription information from the engine. | 
| 22 */ | 24 */ | 
| 23 public class SubscriptionInfo implements Comparable<SubscriptionInfo> | 25 public class SubscriptionInfo implements Comparable<SubscriptionInfo> | 
| 24 { | 26 { | 
| 25 public enum Type | 27 public enum Type | 
| 26 { | 28 { | 
| 27 ADS, | 29 ADS, | 
| 28 OTHER, | 30 OTHER, | 
| 29 CUSTOM, | 31 CUSTOM, | 
| 30 INITIALIZING, | 32 INITIALIZING, | 
| 31 USER_FILTERS, | 33 USER_FILTERS, | 
| 32 USER_EXCEPTIONS, | 34 USER_EXCEPTIONS, | 
| 33 ACCEPTABLE_ADS | 35 ACCEPTABLE_ADS | 
| 34 } | 36 } | 
| 35 | 37 | 
| 36 private final Type type; | 38 private final Type type; | 
| 37 private final String id; | 39 private final String id; | 
| 38 private final String url; | 40 private final String url; | 
| 39 private String title; | 41 private String title; | 
| 40 private boolean enabled = false; | 42 private boolean enabled = false; | 
| 41 private long lastUpdate; | 43 private long lastUpdate; | 
| 42 | 44 | 
| 43 SubscriptionInfo(final Type type, final String id, final String url, final Str ing title, final boolean enabled, final long lastUpdate) | 45 SubscriptionInfo(final Type type, final String id, final String url, final Str ing title, final boolean enabled, final long lastUpdate) | 
| 
jens
2017/06/02 10:50:01
I think this constructor can be private, as we onl
 
diegocarloslima
2017/06/02 21:03:42
Acknowledged.
 | |
| 44 { | 46 { | 
| 45 this.type = type; | 47 this.type = type; | 
| 46 this.id = id; | 48 this.id = id; | 
| 47 this.url = url; | 49 this.url = url; | 
| 48 this.title = title; | 50 this.title = title; | 
| 49 this.enabled = enabled; | 51 this.enabled = enabled; | 
| 50 this.lastUpdate = lastUpdate; | 52 this.lastUpdate = lastUpdate; | 
| 51 } | 53 } | 
| 52 | 54 | 
| 53 public Type getType() | 55 public Type getType() | 
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 | 143 | 
| 142 return new SubscriptionInfo(type, | 144 return new SubscriptionInfo(type, | 
| 143 subscription.getId(), | 145 subscription.getId(), | 
| 144 url, | 146 url, | 
| 145 title, | 147 title, | 
| 146 subscription.isEnabled(), | 148 subscription.isEnabled(), | 
| 147 subscription.getLastUpdateTimestamp()); | 149 subscription.getLastUpdateTimestamp()); | 
| 148 } | 150 } | 
| 149 | 151 | 
| 150 @Override | 152 @Override | 
| 151 public int compareTo(final SubscriptionInfo another) | 153 public int compareTo(@NonNull final SubscriptionInfo another) | 
| 152 { | 154 { | 
| 153 return this.getTitle().compareTo(another.getTitle()); | 155 return this.getTitle().compareTo(another.getTitle()); | 
| 154 } | 156 } | 
| 155 } | 157 } | 
| OLD | NEW |