Kenneth Howe created GEODE-4770:
-----------------------------------

             Summary: Destroying an unstarted GatewayReceiver throws an NPE
                 Key: GEODE-4770
                 URL: https://issues.apache.org/jira/browse/GEODE-4770
             Project: Geode
          Issue Type: Bug
          Components: wan
            Reporter: Kenneth Howe


Found while writing tests for a new Gfsh command to destroy a GatewayReceiver:

Create a GatewayReceiver with manualStart = true

{{create gateway-receiver --manual-start==true ...}}

NPE is thrown by the {{destroy()}} in the Function that implements the new 
{{destroy gateway-receiver}} command.
{code:java}
        if (receiver.isRunning()) {
          receiver.stop();
        }
        receiver.destroy();
{code}
NPE is thrown here:
{code:java|title=GatewayReceiverImpl}
  public void destroy() {
    if (receiver.isRunning()) {
{code}
because {{receiver}} is not set until the the GatewayReceiver is started.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to