Coverage Report - org.mule.transport.NullPayload
 
Classes in this File Line Coverage Branch Coverage Complexity
NullPayload
0%
0/8
N/A
0
NullPayload$1
N/A
N/A
0
NullPayload$NullPayloadHolder
0%
0/2
N/A
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.transport;
 8  
 
 9  
 import java.io.ObjectStreamException;
 10  
 import java.io.Serializable;
 11  
 
 12  
 /**
 13  
  * <code>NullPayload</code> represents a null event payload
 14  
  */
 15  
 // @Immutable
 16  0
 public final class NullPayload implements Serializable
 17  
 {
 18  
     /**
 19  
      * Serial version
 20  
      */
 21  
     private static final long serialVersionUID = 3530905899811505080L;
 22  
 
 23  0
     private static class NullPayloadHolder
 24  
     {
 25  0
         private static final NullPayload instance = new NullPayload();
 26  
     }
 27  
 
 28  
     public static NullPayload getInstance()
 29  
     {
 30  0
         return NullPayloadHolder.instance;
 31  
     }
 32  
 
 33  
     private NullPayload()
 34  
     {
 35  0
         super();
 36  0
     }
 37  
 
 38  
     private Object readResolve() throws ObjectStreamException
 39  
     {
 40  0
         return NullPayloadHolder.instance;
 41  
     }
 42  
 
 43  
     @Override
 44  
     public boolean equals(Object obj)
 45  
     {
 46  0
         return obj instanceof NullPayload;
 47  
     }
 48  
 
 49  
     @Override
 50  
     public int hashCode ()
 51  
     {
 52  0
         return 1; // random, 0 is taken by VoidResult
 53  
     }
 54  
 
 55  
     @Override
 56  
     public String toString()
 57  
     {
 58  0
         return "{NullPayload}";
 59  
     }
 60  
 
 61  
 }