New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE when running from an IDE #568

Merged
merged 1 commit into from Oct 3, 2017

Conversation

Projects
None yet
3 participants
@zachbr
Contributor

zachbr commented Oct 3, 2017

This tiny change fixes an NPE that I ran into when running Glowstone from IntelliJ.

22:00:36 [SEVERE] Error while executing GlowTask{id=0, plugin=null, sync=true: net.glowstone.net.handler.login.EncryptionKeyResponseHandler$ClientAuthCallback$$Lambda$62/1879985001@45b53b1b}
java.lang.NullPointerException
	at net.glowstone.net.message.play.game.PluginMessage.fromString(PluginMessage.java:20)
	at net.glowstone.entity.GlowPlayer.join(GlowPlayer.java:411)
	at net.glowstone.net.GlowSession.setPlayer(GlowSession.java:357)
	at net.glowstone.net.handler.login.EncryptionKeyResponseHandler$ClientAuthCallback.lambda$done$0(EncryptionKeyResponseHandler.java:167)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at net.glowstone.scheduler.GlowTask.run(GlowTask.java:167)
	at net.glowstone.scheduler.GlowScheduler.pulse(GlowScheduler.java:152)
	at net.glowstone.scheduler.GlowScheduler.lambda$start$0(GlowScheduler.java:83)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
22:00:38 [WARNING] Z750 moved too quickly!

This makes getName behave the same as getVersion and getBukkitVersion.

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Oct 3, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Oct 3, 2017

CLA assistant check
All committers have signed the CLA.

@momothereal momothereal self-requested a review Oct 3, 2017

@momothereal momothereal merged commit 3f83a76 into GlowstoneMC:master Oct 3, 2017

1 of 2 checks passed

ci/circleci CircleCI is running your tests
Details
license/cla Contributor License Agreement is signed.
Details

@zachbr zachbr deleted the zachbr:fix/NPE-ran-from-IDE branch Oct 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment