diff --git a/backtrace-library/src/main/java/backtraceio/library/common/ApplicationMetadataCache.java b/backtrace-library/src/main/java/backtraceio/library/common/ApplicationMetadataCache.java index 6b581d95..34637180 100644 --- a/backtrace-library/src/main/java/backtraceio/library/common/ApplicationMetadataCache.java +++ b/backtrace-library/src/main/java/backtraceio/library/common/ApplicationMetadataCache.java @@ -27,6 +27,12 @@ public class ApplicationMetadataCache { */ private String packageName; + private final Context context; + + private ApplicationMetadataCache(Context context) { + this.context = context; + } + /** * Returns current application cache. This instance is a singleton since we can only operate * in a single application scope. @@ -45,12 +51,6 @@ public static ApplicationMetadataCache getInstance(Context context) { return instance; } - private final Context context; - - public ApplicationMetadataCache(Context context) { - this.context = context; - } - /** * Retrieves application name from context. The name will be cached over checks * diff --git a/backtrace-library/src/main/java/backtraceio/library/models/Tuple.java b/backtrace-library/src/main/java/backtraceio/library/models/Tuple.java deleted file mode 100644 index c25386d4..00000000 --- a/backtrace-library/src/main/java/backtraceio/library/models/Tuple.java +++ /dev/null @@ -1,11 +0,0 @@ -package backtraceio.library.models; - -public class Tuple { - public final T1 first; - public final T2 second; - - public Tuple(T1 first, T2 second) { - this.first = first; - this.second = second; - } -} diff --git a/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataAttributes.java b/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataAttributes.java index 01189b50..889c82d1 100644 --- a/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataAttributes.java +++ b/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataAttributes.java @@ -1,11 +1,12 @@ package backtraceio.library.models.attributes; import java.util.HashMap; +import java.util.Map; public class ReportDataAttributes { - private final HashMap reportAttributes = new HashMap<>(); + private final Map reportAttributes = new HashMap<>(); - private final HashMap reportAnnotations = new HashMap<>(); + private final Map reportAnnotations = new HashMap<>(); public void addAnnotation(String key, Object value) { @@ -16,12 +17,11 @@ public void addAttribute(String key, String value) { reportAttributes.put(key, value); } - public HashMap getAttributes() { + public Map getAttributes() { return reportAttributes; } - public HashMap getAnnotations() { + public Map getAnnotations() { return reportAnnotations; } - } diff --git a/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataBuilder.java b/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataBuilder.java index a20cceb0..b6922ce2 100644 --- a/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataBuilder.java +++ b/backtrace-library/src/main/java/backtraceio/library/models/attributes/ReportDataBuilder.java @@ -19,10 +19,10 @@ public static ReportDataAttributes getReportAttributes(Map attri /** * Divide custom user attributes into primitive and complex attributes and add to this object * - * @param attributes client's attributes - * @param skipNull define attributes behavior on null value. By default all null values - * will be included in the report. For some features like metrics, we don't want to send - * null values, because they can generate invalid behavior/incorrect information. + * @param attributes client's attributes + * @param skipNull define attributes behavior on null value. By default all null values + * will be included in the report. For some features like metrics, we don't want to send + * null values, because they can generate invalid behavior/incorrect information. * @return Report data attributes divided into attributes and annotations */ public static ReportDataAttributes getReportAttributes(Map attributes, boolean skipNull) { @@ -49,6 +49,5 @@ public static ReportDataAttributes getReportAttributes(Map attri } return reportDataAttributes; - } }