Skip to content

Commit

Permalink
More defensive arg checks for startup message
Browse files Browse the repository at this point in the history
  • Loading branch information
tjake committed May 20, 2020
1 parent 2fc07ef commit 4c15fc5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public static Object intercept(@This Object instance, @AllArguments Object[] all

try
{
if (allArguments.length > 0 && allArguments[0] != null && allArguments[0] instanceof QueryState)
if (allArguments.length > 1 && allArguments[0] != null && allArguments[0] instanceof QueryState &&
allArguments[1] instanceof StartupMessage)
{
QueryState queryState = (QueryState) allArguments[0];
StartupMessage request = ((StartupMessage) instance);
Expand Down

0 comments on commit 4c15fc5

Please sign in to comment.