aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/LogEntry.java9
-rw-r--r--main/src/cgeo/geocaching/connector/NoLoggingManager.java1
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheAttribute.java7
-rw-r--r--main/src/cgeo/geocaching/files/ProgressInputStream.java6
4 files changed, 7 insertions, 16 deletions
diff --git a/main/src/cgeo/geocaching/LogEntry.java b/main/src/cgeo/geocaching/LogEntry.java
index b4b346c..41c222b 100644
--- a/main/src/cgeo/geocaching/LogEntry.java
+++ b/main/src/cgeo/geocaching/LogEntry.java
@@ -2,7 +2,6 @@ package cgeo.geocaching;
import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.settings.Settings;
-import cgeo.geocaching.utils.DateUtils;
import cgeo.geocaching.utils.HtmlUtils;
import cgeo.geocaching.utils.MatcherWrapper;
@@ -89,7 +88,7 @@ public final class LogEntry {
public CharSequence getImageTitles() {
final List<String> titles = new ArrayList<>(5);
- for (Image image : getLogImages()) {
+ for (final Image image : getLogImages()) {
if (StringUtils.isNotBlank(image.getTitle())) {
titles.add(HtmlUtils.extractText(image.getTitle()));
}
@@ -100,16 +99,12 @@ public final class LogEntry {
return StringUtils.join(titles, ", ");
}
- public int daysSinceLog() {
- return DateUtils.daysSince(date);
- }
-
/**
* Get the log text to be displayed. Depending on the settings, color tags might be removed.
*/
public String getDisplayText() {
if (Settings.getPlainLogs()) {
- MatcherWrapper matcher = new MatcherWrapper(PATTERN_REMOVE_COLORS, log);
+ final MatcherWrapper matcher = new MatcherWrapper(PATTERN_REMOVE_COLORS, log);
return matcher.replaceAll(StringUtils.EMPTY);
}
return log;
diff --git a/main/src/cgeo/geocaching/connector/NoLoggingManager.java b/main/src/cgeo/geocaching/connector/NoLoggingManager.java
index 54d5a10..ff8b33a 100644
--- a/main/src/cgeo/geocaching/connector/NoLoggingManager.java
+++ b/main/src/cgeo/geocaching/connector/NoLoggingManager.java
@@ -1,6 +1,5 @@
package cgeo.geocaching.connector;
-import cgeo.geocaching.Geocache;
import cgeo.geocaching.TrackableLog;
import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.enumerations.StatusCode;
diff --git a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
index 1fdb0ac..771a508 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
@@ -167,7 +167,7 @@ public enum CacheAttribute {
private final static SparseArray<CacheAttribute> FIND_BY_OCACODE = new SparseArray<>();
static {
final HashMap<String, CacheAttribute> mapGcRawNames = new HashMap<>();
- for (CacheAttribute attr : values()) {
+ for (final CacheAttribute attr : values()) {
mapGcRawNames.put(attr.rawName, attr);
if (attr.ocacode != NO_ID) {
FIND_BY_OCACODE.put(attr.ocacode, attr);
@@ -184,7 +184,7 @@ public enum CacheAttribute {
return FIND_BY_OCACODE.get(ocAcode);
}
- public static String trimAttributeName(String attributeName) {
+ public static String trimAttributeName(final String attributeName) {
if (null == attributeName) {
return "";
}
@@ -195,7 +195,4 @@ public enum CacheAttribute {
return !StringUtils.endsWithIgnoreCase(attributeName, INTERNAL_NO);
}
- public String getAttributeName(final boolean yes) {
- return rawName + (yes ? INTERNAL_YES : INTERNAL_NO);
- }
}
diff --git a/main/src/cgeo/geocaching/files/ProgressInputStream.java b/main/src/cgeo/geocaching/files/ProgressInputStream.java
index 552aee0..3b249a1 100644
--- a/main/src/cgeo/geocaching/files/ProgressInputStream.java
+++ b/main/src/cgeo/geocaching/files/ProgressInputStream.java
@@ -16,12 +16,12 @@ public class ProgressInputStream extends FilterInputStream {
private int progress = 0;
- protected ProgressInputStream(InputStream in) {
+ protected ProgressInputStream(final InputStream in) {
super(in);
}
@Override
- public int read() throws IOException {
+ public int read() throws IOException { // NO_UCD This method is called from the framework
final int read = super.read();
if (read >= 0) {
progress++;
@@ -30,7 +30,7 @@ public class ProgressInputStream extends FilterInputStream {
}
@Override
- public int read(byte[] buffer, int offset, int count) throws IOException {
+ public int read(final byte[] buffer, final int offset, final int count) throws IOException {
final int read = super.read(buffer, offset, count);
progress += read;
return read;