A crazy thought: How about returning a dynamic proxy for TypeVariable? That way we could make sure the code compiles with Java 7 and 8 (which is nice for detecting possible regressions)
Not sure, is it worth the effort? We could also just remove the test for now, if the only goal is to make it compile for both. But knock yourself out.
while not requiring a separate Java 8 branch of the code base
Well, at some stage we need a plan either way. we will need to start supporting Java 8 features (Optional comes to mind here). As I said before, I see one of the main goals of HV 5.2 the integration with Java 8. I was thinking about addressing this particular issue as part of the overall strategy.
|