Skip to content

Commit

Permalink
Deprecate api with typo custommMetrics #55
Browse files Browse the repository at this point in the history
  • Loading branch information
brsanthu committed May 19, 2019
1 parent 930fb9a commit 3e4d516
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ protected void processCustomDimensionParameters(GoogleAnalyticsRequest<?> reques
*/
protected void processCustomMetricParameters(GoogleAnalyticsRequest<?> request, HttpRequest req) {
Map<String, String> customMetricParms = new HashMap<>();
for (String defaultCustomMetricKey : defaultRequest.custommMetrics().keySet()) {
customMetricParms.put(defaultCustomMetricKey, defaultRequest.custommMetrics().get(defaultCustomMetricKey));
for (String defaultCustomMetricKey : defaultRequest.customMetrics().keySet()) {
customMetricParms.put(defaultCustomMetricKey, defaultRequest.customMetrics().get(defaultCustomMetricKey));
}

Map<String, String> requestCustomMetrics = request.custommMetrics();
Map<String, String> requestCustomMetrics = request.customMetrics();
for (String requestCustomDimKey : requestCustomMetrics.keySet()) {
customMetricParms.put(requestCustomDimKey, requestCustomMetrics.get(requestCustomDimKey));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,20 @@ public Map<String, String> customDimensions() {
return customDimensions;
}

/**
* This method name has typo hence has been deprecated.
*
* @deprecated please use {@link #customMetrics}
*/
@Deprecated
public Map<String, String> custommMetrics() {
return customMetrics;
}

public Map<String, String> customMetrics() {
return customMetrics;
}

@Override
public String toString() {
StringBuilder builder = new StringBuilder();
Expand Down

0 comments on commit 3e4d516

Please sign in to comment.