Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialUnsubscribed User
48,988 Pointsusing intellij for this, but supress warning not working ?
Hello there i use Intellij to reproduce this lesson, suppress warnings annotation does not work. Dang, what to do ?
Exception in thread "main" java.lang.NullPointerException at com.teamtreehouse.suppresswarnings.Main.main(Main.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
3 Answers
Damian Adams
21,351 PointsYou're getting a checked exception from the compiler, not a warning. I'm sure you must have figured it out by now, but it looks like you were attempting to use a method on a null reference instance or something (NullPointerException). Besides that I'd recommend using the command line (Windows Powershell is fairly good if you're on Win 10, and the Terminal is quite nice on OS X) to follow along this course, so you can get "closer to the metal" as they say.
Unsubscribed User
48,988 Pointsyes moved already, thanks.
Unsubscribed User
48,988 PointsHello Steve i already moved to the next part. Hope treehouse will make sure their examples work across ide's not only workspaces, which nobody uses finally on production.
ricky bobby
1,034 Pointsthat will never happen unless treehouse wins the lottery. Ides are rapidly developed by the time a video is released the ide will have changed one way or another. I think Intellij runs a few custom preprocessers (Although I have no idea how the back ends works) basically what that means is It can handle things like annotations, var names, imports ahead of main compilation and make a decision weather or not your project specifications allows things like @SuppressWarnings. It sounds like you don't have any experience with Linux or cmdline in general. You really should learn about Linux and bash scripting it is one of the most powerful tools you will ever learn (and you have a head start using workspaces because a workspace console is just a bash prompt running on a vm).
Kareem Jeiroudi
14,984 PointsSo, @Unsubscribed User, have you solved the issue or just moved to working in the Workspace or Terminal? I know, it could work this way, but I'm trying to understand why the IDE's throwing such an exception. In case you came up with any solution, you're very welcome to share them here at this post.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsHi Jens,
Can you post your code, please? That might help track down the issue.
Thanks,
Steve.