From 3bf00c88bfff4a554508282616b829f86eaf8981 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 31 Jan 2022 04:47:26 +0000 Subject: [PATCH] EventDispatcher should throw NPE before try block. --- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- .../gameserver/model/events/EventDispatcher.java | 10 +++++----- 21 files changed, 105 insertions(+), 105 deletions(-) diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) { diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java index b37497e1c7..e62c31f622 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/events/EventDispatcher.java @@ -142,13 +142,13 @@ public class EventDispatcher */ private T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class callbackClass) { + if (event == null) + { + throw new NullPointerException("Event cannot be null!"); + } + try { - if (event == null) - { - throw new NullPointerException("Event cannot be null!"); - } - T callback = null; if (containers != null) {