79812584

Date: 2025-11-07 16:47:20
Score: 1.5
Natty:
Report link

"stored in the IF part to also be used in the ELSE part" - This doesn't make sense. if and else are mutually exclusive, by design. One of them executes or the other one does. If your else is executing then that means your if did not, which means lastControl is null because it was explicitly set to null when it was declared.

Can you clarify how/why you expect both the if and else to execute? What specifically do you observe when you debug? Maybe the method is being invoked more than once? Maybe lastControl should be at a field on the class instead of a local variable?

Reasons:
  • RegEx Blacklisted phrase (2.5): Can you clarify how
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-2):
Posted by: David