-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33901/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley and Nate Cole.
Bugs: AMBARI-10965
https://issues.apache.org/jira/browse/AMBARI-10965
Repository: ambari
Description
-------
There was a class loader change that makes the view load the classes from the
view loader first then from the parent. I think that the view framework is
loading the Inject annotation from the parent class loader while the view
itself is now loading the inject annotation from the view loader.
The javax classes are an exception... always loaded from the parent, so 'import
javax.inject.Inject' works while 'import com.google.inject.Inject ' does not.
My example using the java inject annotation works, the Slider and Hive views
using the google annotation do not.
Bottom line is that @Inject into view components is broken if they use the
google inject annotation.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java
ad8c805
ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java
3a9ecd3
Diff: https://reviews.apache.org/r/33901/diff/
Testing
-------
Tested manually with Slider view.
Added new case for view class loader unit test.
Thanks,
Tom Beerbower