Index: /applications/editors/josm/plugins/geochat/src/geochat/ChatMessage.java
===================================================================
--- /applications/editors/josm/plugins/geochat/src/geochat/ChatMessage.java	(revision 35160)
+++ /applications/editors/josm/plugins/geochat/src/geochat/ChatMessage.java	(revision 35161)
@@ -77,8 +77,5 @@
     @Override
     public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
+        if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
Index: /applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java
===================================================================
--- /applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java	(revision 35160)
+++ /applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java	(revision 35161)
@@ -16,6 +16,4 @@
 import javax.swing.JTabbedPane;
 import javax.swing.JTextPane;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
 import javax.swing.text.BadLocationException;
 import javax.swing.text.Document;
@@ -45,10 +43,5 @@
         chatPanes = new HashMap<>();
         createChatPane(null);
-        tabs.addChangeListener(new ChangeListener() {
-            @Override
-            public void stateChanged(ChangeEvent e) {
-                updateActiveTabStatus();
-            }
-        });
+        tabs.addChangeListener(e -> updateActiveTabStatus());
     }
 
@@ -90,11 +83,11 @@
     }
 
-    public static int MESSAGE_TYPE_DEFAULT = 0;
-    public static int MESSAGE_TYPE_INFORMATION = 1;
-    public static int MESSAGE_TYPE_ATTENTION = 2;
-    private static Color COLOR_ATTENTION = new Color(0, 0, 192);
+    public static final int MESSAGE_TYPE_DEFAULT = 0;
+    public static final int MESSAGE_TYPE_INFORMATION = 1;
+    public static final int MESSAGE_TYPE_ATTENTION = 2;
+    private static final Color COLOR_ATTENTION = new Color(0, 0, 192);
 
     private void addLineToChatPane(String userName, String line, final int messageType) {
-        if (line.length() == 0)
+        if (line.isEmpty())
             return;
         if (!chatPanes.containsKey(userName))
@@ -261,5 +254,4 @@
         public JScrollPane component;
         public int notify;
-
     }
 }
Index: /applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java
===================================================================
--- /applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java	(revision 35160)
+++ /applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java	(revision 35161)
@@ -95,12 +95,9 @@
         } else {
             String query = "whoami&uid=" + uid;
-            JsonQueryUtil.queryAsync(query, new JsonQueryCallback() {
-                @Override
-                public void processJson(JsonObject json) {
-                    if (json != null && json.get("name") != null)
-                        login(uid, json.getString("name"));
-                    else if (userName != null && userName.length() > 1)
-                        login(userName);
-                }
+            JsonQueryUtil.queryAsync(query, json -> {
+                if (json != null && json.get("name") != null)
+                    login(uid, json.getString("name"));
+                else if (userName != null && userName.length() > 1)
+                    login(userName);
             });
         }
@@ -112,5 +109,5 @@
      */
     public void autoLoginWithDelay(final String userName) {
-        if (userName == null || userName.length() == 0) {
+        if (userName == null || userName.isEmpty()) {
             checkLogin();
             return;
@@ -148,17 +145,14 @@
             + "&lon=" + DecimalDegreesCoordinateFormat.INSTANCE.lonToString(pos)
             + nameAttr;
-            JsonQueryUtil.queryAsync(query, new JsonQueryCallback() {
-                @Override
-                public void processJson(JsonObject json) {
-                    if (json == null)
-                        fireLoginFailed(tr("Could not get server response, check logs"));
-                    else if (json.get("error") != null)
-                        fireLoginFailed(tr("Failed to login as {0}:", userName) + "\n" + json.getString("error"));
-                    else if (json.get("uid") == null)
-                        fireLoginFailed(tr("The server did not return user ID"));
-                    else {
-                        String name = json.get("name") != null ? json.getString("name") : userName;
-                        login(json.getInt("uid"), name);
-                    }
+            JsonQueryUtil.queryAsync(query, json -> {
+                if (json == null)
+                    fireLoginFailed(tr("Could not get server response, check logs"));
+                else if (json.get("error") != null)
+                    fireLoginFailed(tr("Failed to login as {0}:", userName) + "\n" + json.getString("error"));
+                else if (json.get("uid") == null)
+                    fireLoginFailed(tr("The server did not return user ID"));
+                else {
+                    String name = json.get("name") != null ? json.getString("name") : userName;
+                    login(json.getInt("uid"), name);
                 }
             });
@@ -199,10 +193,7 @@
             return;
         String query = "logout&uid=" + userId;
-        JsonQueryUtil.queryAsync(query, new JsonQueryCallback() {
-            @Override
-            public void processJson(JsonObject json) {
-                if (json != null && json.get("message") != null) {
-                    logoutIntl();
-                }
+        JsonQueryUtil.queryAsync(query, json -> {
+            if (json != null && json.get("message") != null) {
+                logoutIntl();
             }
         });
@@ -256,12 +247,9 @@
             if (targetUser != null && targetUser.length() > 0)
                 query += "&to=" + URLEncoder.encode(targetUser, "UTF8");
-            JsonQueryUtil.queryAsync(query, new JsonQueryCallback() {
-                @Override
-                public void processJson(JsonObject json) {
-                    if (json == null)
-                        fireMessageFailed(tr("Could not get server response, check logs"));
-                    else if (json.get("error") != null)
-                        fireMessageFailed(json.getString("error"));
-                }
+            JsonQueryUtil.queryAsync(query, json -> {
+                if (json == null)
+                    fireMessageFailed(tr("Could not get server response, check logs"));
+                else if (json.get("error") != null)
+                    fireMessageFailed(json.getString("error"));
             });
         } catch (UnsupportedEncodingException e) {
Index: /applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java
===================================================================
--- /applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java	(revision 35160)
+++ /applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java	(revision 35161)
@@ -17,6 +17,4 @@
 import java.awt.Point;
 import java.awt.RenderingHints;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.io.IOException;
 import java.text.SimpleDateFormat;
@@ -123,19 +121,9 @@
 
         JButton loginButton = new JButton(tr("Login"));
-        loginButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                connection.login(nameField.getText());
-            }
-        });
+        loginButton.addActionListener(e -> connection.login(nameField.getText()));
         nameField.setPreferredSize(new Dimension(nameField.getPreferredSize().width, loginButton.getPreferredSize().height));
 
         final JCheckBox autoLoginBox = new JCheckBox(tr("Enable autologin"), Config.getPref().getBoolean("geochat.autologin", true));
-        autoLoginBox.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                Config.getPref().putBoolean("geochat.autologin", autoLoginBox.isSelected());
-            }
-        });
+        autoLoginBox.addActionListener(e -> Config.getPref().putBoolean("geochat.autologin", autoLoginBox.isSelected()));
 
         JPanel panel = new JPanel(new GridBagLayout());
Index: /applications/editors/josm/plugins/geochat/src/geochat/JsonQueryCallback.java
===================================================================
--- /applications/editors/josm/plugins/geochat/src/geochat/JsonQueryCallback.java	(revision 35160)
+++ /applications/editors/josm/plugins/geochat/src/geochat/JsonQueryCallback.java	(revision 35161)
@@ -9,4 +9,5 @@
  * @author zverik
  */
+@FunctionalInterface
 public interface JsonQueryCallback {
 
