-47

Occasionally, users ask questions about solving NullPointerExceptions in Java programs and get their questions closed as duplicates of What is a NullPointerException, and how do I fix it? before someone gives an answer.

We should stop doing this.

NullPointerException is a bug that can be solved much easier with a direct heads-up like "You forgot to initialize foo before calling foo.bar()", and this heads-up should be given as an answer instead of a series of comments.

5
  • 19
    Why? The duplicate tells anyone who reads it exactly what to do to resolve their issue. We don't need more answers explaining the same thing. In addition, if the OPs read the duplicate they might learn enough to solve the problem on their own next time it happens (and it will happen again). Telling the OP how to fix his problem is just spoon feeding and doesn't encourage learning. Teach a man to fish etc... Commented Jul 15, 2016 at 23:05
  • 1
    oh so you're all for MORE copy pasta coders who can't understand basic programming concepts?
    – Patrice
    Commented Jul 16, 2016 at 13:18
  • This post got downvoted to the point of devolving from a disliked proposal to a source of shame (what other feeling can a net score of -33 give?). I have to delete it.
    – anon
    Commented Jul 17, 2016 at 0:02
  • Here's a vote to delete your shame.
    – user1228
    Commented Jul 18, 2016 at 15:49
  • On a different perspective, this can be a signpost similar to the pay-to-be-reputable proposal...
    – anon
    Commented Jul 28, 2016 at 0:57

1 Answer 1

33

Stack Overflow is not a personal help desk for customized support to solve your specific problems and hold your hand through your debugging/troubleshooting. It is designed to be a research tool.

If someone is pointed to that question via a duplicate flag, they either should be able to figure out what the problem is (assuming they know how to use the IDE), or they should have enough info to ask a question about the actual problem that is causing the NullPointerException.

In short, we shouldn't prevent closure just because someone doesn't know how to debug their program.

2
  • On the gripping hand, any post with +10 duplicates should start prunnin duplicates.
    – Braiam
    Commented Jul 15, 2016 at 23:54
  • While I appreciate the irony of this question, its circumstances are indeed unfortunate.
    – Makoto
    Commented Jul 16, 2016 at 1:54