Pass By NullPointer
by in Feature Articles on 2014-12-17Maxime was having difficulty viewing a website with the NoScript add-on installed to her web browser. It wasn't a huge surprise - some websites just don't work right with NoScript running, but it was a surprise when her browser displayed Java exceptions. Enabling JavaScript made the error page go away, but what? Lack of JavaScript causing Java exceptions!?
She viewed the page source and found that the server expects an "innerCHK" parameter, perhaps some kind of session or security token, to be passed in via URL query string. If it isn't provided, the server returns an error page displaying a java.lang.NullPointerException. Fortunately the front-end developers concocted this brillant snippet of JavaScript to resolve this issue: