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