A stupid Mistake

stupidestmistake

the above mistake cost me close to 1 hour. Can you spot the mistake?

I tried all these possibilities:

model.put("validation_success",1);

model.put("validation_success",true);

model.put("validation_success","true");

and then realized my stupid mistake.

I have installed sonar plugin, it suggested me to “Extract this nested code block into a method”. I thought it was suggesting me to extract the nested if statements into a method.

Anyways I guess I needed a break, I left for the day after struggling to resolve it. And I figured out the mistake next day morning with a fresh pair of eyes.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s