> On Feb. 10, 2015, 5:30 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java, > > line 154 > > <https://reviews.apache.org/r/30832/diff/1/?file=860026#file860026line154> > > > > Not seeing the rest of the code, the viewEntity's classloader looks > > like it's null by default? Does a viewEntity get one guaranteed? May want > > a null check.
The view's class loader gets setup when the view is deployed so it should never be null. A null check with some logging is probably a good idea since we would want to be aware of this condition for debugging, I think. Thanks! - Tom ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30832/#review71805 ----------------------------------------------------------- On Feb. 10, 2015, 3:49 p.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30832/ > ----------------------------------------------------------- > > (Updated Feb. 10, 2015, 3:49 p.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-9551 > https://issues.apache.org/jira/browse/AMBARI-9551 > > > Repository: ambari > > > Description > ------- > > Thread context class loader is not set to the view class loader when > accessing a view resource through the REST APIs. For example ... > > /api/v1/views/CALCULATOR/versions/1.0.0/instances/INSTANCE_1/resources/calculator > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariHandlerList.java > da15a66 > > ambari-server/src/main/java/org/apache/ambari/server/controller/FailsafeHandlerList.java > fa1e6b1 > > ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariHandlerListTest.java > 7171e88 > > Diff: https://reviews.apache.org/r/30832/diff/ > > > Testing > ------- > > Manual tests. > New unit test added. > All existing unit tests pass. > > > Thanks, > > Tom Beerbower > >
