Commit 3f276e03 authored by Yusuke Iwaki's avatar Yusuke Iwaki

[skip ci] fix pmd error.

parent 5f5f057a
...@@ -20,7 +20,7 @@ public class OAuthProviderInfo { ...@@ -20,7 +20,7 @@ public class OAuthProviderInfo {
this.fragmentClass = fragmentClass; this.fragmentClass = fragmentClass;
} }
public static ArrayList<OAuthProviderInfo> LIST = new ArrayList<OAuthProviderInfo>() { public static final ArrayList<OAuthProviderInfo> LIST = new ArrayList<OAuthProviderInfo>() {
{ {
add(new OAuthProviderInfo( add(new OAuthProviderInfo(
"twitter", R.id.btn_login_with_twitter, TwitterOAuthFragment.class)); "twitter", R.id.btn_login_with_twitter, TwitterOAuthFragment.class));
......
...@@ -90,7 +90,7 @@ public class MethodCall extends RealmObject { ...@@ -90,7 +90,7 @@ public class MethodCall extends RealmObject {
} }
} }
private static final HashMap<String, RealmObjectObserver<MethodCall>> refMap = new HashMap<>(); private static final HashMap<String, RealmObjectObserver<MethodCall>> REF_MAP = new HashMap<>();
/** /**
* insert a new record to request a method call. * insert a new record to request a method call.
...@@ -125,17 +125,17 @@ public class MethodCall extends RealmObject { ...@@ -125,17 +125,17 @@ public class MethodCall extends RealmObject {
task.setResult(resultJson); task.setResult(resultJson);
} }
observer.unsub(); observer.unsub();
refMap.remove(methodCall.getMethodCallId()); REF_MAP.remove(methodCall.getMethodCallId());
remove(realmHelper, methodCall.getMethodCallId()).continueWith(new LogcatIfError()); remove(realmHelper, methodCall.getMethodCallId()).continueWith(new LogcatIfError());
} else if (syncstate == SyncState.FAILED) { } else if (syncstate == SyncState.FAILED) {
task.setError(new Error(methodCall.getResultJson())); task.setError(new Error(methodCall.getResultJson()));
observer.unsub(); observer.unsub();
refMap.remove(methodCall.getMethodCallId()); REF_MAP.remove(methodCall.getMethodCallId());
remove(realmHelper, methodCall.getMethodCallId()).continueWith(new LogcatIfError()); remove(realmHelper, methodCall.getMethodCallId()).continueWith(new LogcatIfError());
} }
}); });
observer.sub(); observer.sub();
refMap.put(newId, observer); REF_MAP.put(newId, observer);
if (context != null) { if (context != null) {
RocketChatService.keepalive(context); RocketChatService.keepalive(context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment