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 trial

Java Java Annotations Writing Your Own Annotation Using Reflection on Our Annotation

Gavin Ralston
Gavin Ralston
28,770 Points

[Using Reflection Video] unchecked and rawtypes warnings

This isn't a question so much as a heads up if you're following along in workspaces and using the same workspace image that you started with.

If you get compiler warnings about raw types and not checking types in your methods, you'll want to pay special attention to the process() method included in the workspace or downloads:

public static boolean process(Class clazz) {
  //do stuff
}

While you can use your newfound knowledge to use @SuppressWarnings annotation to compile the project anyway, it may help to compare it to what's in the video on line 14 or so, which is subtly different but totally helpful. :)

public static boolean process(Class<?> clazz) {
   //do stuff
}

Thank you!