- // Get a handle for `CreateBookmarkListener` from `context`.
- try {
- createBookmarkListener = (CreateBookmarkListener) context;
- } catch(ClassCastException exception) {
- throw new ClassCastException(context.toString() + " must implement `CreateBookmarkListener`.");
- }
+ // Get a handle for `CreateBookmarkListener` from the launching context.
+ createBookmarkListener = (CreateBookmarkListener) context;