EditQuest thrown error in aws build

Aws is having java 1.6. It got an error in switch(String) statement as it is available in java 1.7.  Reverted it
with if statement.