When logging in with a bad username and password, the JSON parser freaks out and throw this stack trace.
` [java] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[java] at java.io.Reader.(Reader.java:78)
[java] at java.io.InputStreamReader.(InputStreamReader.java:72)
[java] at java.util.Scanner.(Scanner.java:563)
[java] at client.networking.GSONServerProxy.doJSONPost(GSONServerProxy.java:854)
[java] at client.networking.GSONServerProxy.loginUser(GSONServerProxy.java:145)
[java] at client.login.LoginController.signIn(LoginController.java:82)
[java] at client.login.LoginView$SignInPanel$1.actionPerformed(LoginView.java:263)
[java] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
[java] at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
[java] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
[java] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
[java] at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
[java] at java.awt.Component.processMouseEvent(Component.java:6525)
[java] at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
[java] at java.awt.Component.processEvent(Component.java:6290)
[java] at java.awt.Container.processEvent(Container.java:2234)
[java] at java.awt.Component.dispatchEventImpl(Component.java:4881)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2292)
[java] at java.awt.Component.dispatchEvent(Component.java:4703)
[java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
[java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
[java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2278)
[java] at java.awt.Window.dispatchEventImpl(Window.java:2739)
[java] at java.awt.Component.dispatchEvent(Component.java:4703)
[java] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
[java] at java.awt.EventQueue.access$400(EventQueue.java:97)
[java] at java.awt.EventQueue$3.run(EventQueue.java:697)
[java] at java.awt.EventQueue$3.run(EventQueue.java:691)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
[java] at java.awt.EventQueue$4.run(EventQueue.java:719)
[java] at java.awt.EventQueue$4.run(EventQueue.java:717)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
I think this happens because there is no output stream created by the server when there is an error. The server should return at least some feedback to the client to let it know what was wrong.
When logging in with a bad username and password, the JSON parser freaks out and throw this stack trace. ` [java] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException [java] at java.io.Reader.(Reader.java:78)
[java] at java.io.InputStreamReader.(InputStreamReader.java:72)
[java] at java.util.Scanner.(Scanner.java:563)
[java] at client.networking.GSONServerProxy.doJSONPost(GSONServerProxy.java:854)
[java] at client.networking.GSONServerProxy.loginUser(GSONServerProxy.java:145)
[java] at client.login.LoginController.signIn(LoginController.java:82)
[java] at client.login.LoginView$SignInPanel$1.actionPerformed(LoginView.java:263)
[java] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
[java] at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
[java] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
[java] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
[java] at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
[java] at java.awt.Component.processMouseEvent(Component.java:6525)
[java] at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
[java] at java.awt.Component.processEvent(Component.java:6290)
[java] at java.awt.Container.processEvent(Container.java:2234)
[java] at java.awt.Component.dispatchEventImpl(Component.java:4881)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2292)
[java] at java.awt.Component.dispatchEvent(Component.java:4703)
[java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
[java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
[java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2278)
[java] at java.awt.Window.dispatchEventImpl(Window.java:2739)
[java] at java.awt.Component.dispatchEvent(Component.java:4703)
[java] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
[java] at java.awt.EventQueue.access$400(EventQueue.java:97)
[java] at java.awt.EventQueue$3.run(EventQueue.java:697)
[java] at java.awt.EventQueue$3.run(EventQueue.java:691)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
[java] at java.awt.EventQueue$4.run(EventQueue.java:719)
[java] at java.awt.EventQueue$4.run(EventQueue.java:717)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
`