Commit 0b467376 authored by Yusuke Iwaki's avatar Yusuke Iwaki

fix code style issues

parent 6dd32a92
......@@ -12,7 +12,8 @@ import chat.rocket.android.fragment.AbstractFragment;
abstract class AbstractChatRoomFragment extends AbstractFragment {
protected Toolbar activityToolbar;
@Nullable @Override
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
activityToolbar = (Toolbar) getActivity().findViewById(R.id.activity_main_toolbar);
......
......@@ -9,7 +9,7 @@ import chat.rocket.android.helper.OnBackPressListener;
import chat.rocket.android.helper.TextUtils;
abstract class AbstractServerConfigFragment extends AbstractFragment
implements OnBackPressListener {
implements OnBackPressListener {
protected String serverConfigId;
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
......
......@@ -6,7 +6,7 @@ import io.realm.annotations.PrimaryKey;
/**
* Chat Room.
*/
@SuppressWarnings("PMD.ShortVariable")
@SuppressWarnings({"PMD.ShortClassName", "PMD.ShortVariable", "PMD.VariableNamingConventions"})
public class Room extends RealmObject {
@PrimaryKey private String _id;
private String serverConfigId;
......
......@@ -6,7 +6,7 @@ import io.realm.annotations.PrimaryKey;
/**
* User.
*/
@SuppressWarnings("PMD.ShortVariable")
@SuppressWarnings({"PMD.ShortClassName", "PMD.ShortVariable", "PMD.VariableNamingConventions"})
public class User extends RealmObject {
@PrimaryKey private String _id;
private String username;
......
......@@ -15,6 +15,7 @@ import java.util.List;
*/
public class SessionObserver extends AbstractModelObserver<ServerConfig> {
private int count;
public SessionObserver(Context context, String serverConfigId, RocketChatWebSocketAPI api) {
super(context, serverConfigId, api);
count = 0;
......
......@@ -23,7 +23,9 @@ public class TokenLoginObserver extends AbstractModelObserver<ServerConfig> {
}
@Override protected void onCollectionChanged(List<ServerConfig> list) {
if (list.isEmpty()) return;
if (list.isEmpty()) {
return;
}
ServerConfig config = list.get(0);
new MethodCallHelper(serverConfigId, webSocketAPI).loginWithToken(config.getToken())
......
......@@ -4,5 +4,5 @@
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- suppress some checks for classes extending RealmObject -->
<suppress checks="JavadocMethod" files="chat[\\/]rocket[\\/]android[\\/]model"/>
<suppress checks="JavadocMethod|MemberName" files="chat[\\/]rocket[\\/]android[\\/]model"/>
</suppressions>
\ No newline at end of file
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