Here's the scenario:
I've two different classes (say
ClassB) which will be calling a Static method (say
meth1 has three arguments:
List<String> lstStr, Boolean bool and Map<integer,string> testMap
The only way to differentiate between
ClassB is that
ClassB doesn't create any
meth1 will be executing logic only if the IF condition satisfies and following is the condition:
testMapis Empty or null then execute - when called from
testMapis not Empty and contains certain values then execute - when called from
I've done OR between the above two conditions in IF.
If I pass null from
ClassB then I would get null de-reference error (since I've
containsKey() in IF condition bullet 2).
So how feasible is it to purposely pass an empty
ClassB method (without affecting resource usage since I'll be having huge data in lots of other variables).
This will make things easier since I can use both
ClassA and also check for
Is it even a good practice?