Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/987#discussion_r42876869
--- Diff:
core/src/main/java/org/apache/brooklyn/core/objs/BrooklynObjectInternal.java ---
@@ -31,12 +31,12 @@
import com.google.common.annotations.Beta;
-public interface BrooklynObjectInternal extends BrooklynObject, Rebindable
{
+public interface BrooklynObjectInternal<PublicSelfType extends
BrooklynObject, InternalSelfType extends
BrooklynObjectInternal<PublicSelfType,InternalSelfType>> extends
BrooklynObject, Rebindable {
--- End diff --
This interface is mostly used to cast an object to it and then use it. As
such introducing generics here will make it awkward to use, having to suppress
warnings (you already do `@SuppressWarnings({ "rawtypes", "unchecked" })` for
each new usage).
The generic types don't introduce value anyway, better follow the
`getRebindSupport` pattern, where subclasses will override it with stronger
typing.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---