{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1257","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1257/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1257/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1257/events","html_url":"https://github.com/checkstyle/checkstyle/issues/1257","id":91612464,"number":1257,"title":"NullPointerException at FinalLocalVariableCheck.findClassOrMethodInWhichItIsDefined","user":{"login":"Bhavik3","id":8848873,"avatar_url":"https://avatars.githubusercontent.com/u/8848873?v=3","gravatar_id":"","url":"https://api.github.com/users/Bhavik3","html_url":"https://github.com/Bhavik3","followers_url":"https://api.github.com/users/Bhavik3/followers","following_url":"https://api.github.com/users/Bhavik3/following{/other_user}","gists_url":"https://api.github.com/users/Bhavik3/gists{/gist_id}","starred_url":"https://api.github.com/users/Bhavik3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bhavik3/subscriptions","organizations_url":"https://api.github.com/users/Bhavik3/orgs","repos_url":"https://api.github.com/users/Bhavik3/repos","events_url":"https://api.github.com/users/Bhavik3/events{/privacy}","received_events_url":"https://api.github.com/users/Bhavik3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/checkstyle/checkstyle/labels/approved","name":"approved","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/checkstyle/checkstyle/milestones/3","html_url":"https://github.com/checkstyle/checkstyle/milestones/6.8","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/milestones/3/labels","id":1143116,"number":3,"title":"6.8","description":"","creator":{"login":"romani","id":812984,"avatar_url":"https://avatars.githubusercontent.com/u/812984?v=3","gravatar_id":"","url":"https://api.github.com/users/romani","html_url":"https://github.com/romani","followers_url":"https://api.github.com/users/romani/followers","following_url":"https://api.github.com/users/romani/following{/other_user}","gists_url":"https://api.github.com/users/romani/gists{/gist_id}","starred_url":"https://api.github.com/users/romani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romani/subscriptions","organizations_url":"https://api.github.com/users/romani/orgs","repos_url":"https://api.github.com/users/romani/repos","events_url":"https://api.github.com/users/romani/events{/privacy}","received_events_url":"https://api.github.com/users/romani/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":42,"state":"closed","created_at":"2015-06-01T15:02:11Z","updated_at":"2015-06-29T18:04:45Z","due_on":"2015-06-28T07:00:00Z","closed_at":"2015-06-29T18:04:45Z"},"comments":3,"created_at":"2015-06-28T16:09:26Z","updated_at":"2015-09-24T22:39:02Z","closed_at":"2015-06-28T17:04:44Z","body":"Configuration:\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE module PUBLIC\r\n        \"-//Puppy Crawl//DTD Check Configuration 1.1//EN\"\r\n        \"http://www.puppycrawl.com/dtds/configuration_1_1.dtd\">\r\n<module name=\"Checker\">\r\n    <property name=\"fileExtensions\" value=\"java\"/>\r\n    <module name=\"TreeWalker\">\r\n        <module name=\"FinalLocalVariable\"/>\r\n    </module>\r\n</module>\r\n```\r\n\r\nFile to be Analyzed:\r\n````\r\nenum InputFinalLocalVariableNameShadowingEnum{\r\n    test;\r\n    final String foo1 = \"error\";\r\n    InputFinalLocalVariableNameShadowingEnum()\r\n    {\r\n        String foo = foo1;\r\n        foo += foo1;\r\n    }\r\n}\r\n````\r\n\r\nOutput on CLI:\r\n```\r\nJun 28, 2015 9:31:49 PM com.puppycrawl.tools.checkstyle.TreeWalker processFiltered\r\nSEVERE: NullPointerException occurred during the analysis of file testing.java.\r\njava.lang.NullPointerException\r\n        at com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.findClassOrMethodInWhichItIsDefined(FinalLocalVariableCheck.java:266)\r\n        at com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.isSameVariables(FinalLocalVariableCheck.java:281)\r\n        at com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.removeVariable(FinalLocalVariableCheck.java:312)\r\n        at com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.visitToken(FinalLocalVariableCheck.java:173)\r\n        at com.puppycrawl.tools.checkstyle.TreeWalker.notifyVisit(TreeWalker.java:393)\r\n        at com.puppycrawl.tools.checkstyle.TreeWalker.processIter(TreeWalker.java:482)\r\n        at com.puppycrawl.tools.checkstyle.TreeWalker.walk(TreeWalker.java:322)\r\n        at com.puppycrawl.tools.checkstyle.TreeWalker.processFiltered(TreeWalker.java:195)\r\n        at com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck.process(AbstractFileSetCheck.java:79)\r\n        at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:260)\r\n        at com.puppycrawl.tools.checkstyle.Main.runCheckstyle(Main.java:249)\r\n        at com.puppycrawl.tools.checkstyle.Main.main(Main.java:90)\r\n\r\nStarting audit...\r\n/home/bhavik/Documents/checkstyle-rough-work/testing.java:0: Got an exception - null\r\nAudit done.\r\nCheckstyle ends with 1 errors.\r\n```"},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/143068083","html_url":"https://github.com/checkstyle/checkstyle/issues/1257#issuecomment-143068083","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/1257","id":143068083,"user":{"login":"romani","id":812984,"avatar_url":"https://avatars.githubusercontent.com/u/812984?v=3","gravatar_id":"","url":"https://api.github.com/users/romani","html_url":"https://github.com/romani","followers_url":"https://api.github.com/users/romani/followers","following_url":"https://api.github.com/users/romani/following{/other_user}","gists_url":"https://api.github.com/users/romani/gists{/gist_id}","starred_url":"https://api.github.com/users/romani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romani/subscriptions","organizations_url":"https://api.github.com/users/romani/orgs","repos_url":"https://api.github.com/users/romani/repos","events_url":"https://api.github.com/users/romani/events{/privacy}","received_events_url":"https://api.github.com/users/romani/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T22:39:01Z","updated_at":"2015-09-24T22:39:01Z","body":"Thanks a lot for reporting this in clear form !"}}