EventDispatcher should throw NPE before try block.
This commit is contained in:
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
@@ -141,14 +141,14 @@ public class EventDispatcher
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (event == null)
|
if (event == null)
|
||||||
{
|
{
|
||||||
throw new NullPointerException("Event cannot be null!");
|
throw new NullPointerException("Event cannot be null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
T callback = null;
|
T callback = null;
|
||||||
if (containers != null)
|
if (containers != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user