> On July 16, 2021, 6:44 p.m., Mandar Ambawane wrote: > > repository/src/main/java/org/apache/atlas/services/MetricsService.java > > Lines 248 (patched) > > <https://reviews.apache.org/r/73442/diff/1/?file=2251126#file2251126line250> > > > > I have put this check to make sure there will not be any NPE. > > Suppose user creates one user-defined entity typedef without having any > > super type. > > Then, there might be a chance of getting Null value for > > entityDef.getSuperTypes()
Refer https://github.com/apache/atlas/blob/c1dc84cdeeb1b5c3a53f2bec01ae138e5f578dd1/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEntityDef.java#L152 This suggests that there is no possibility of NPE - Nikhil ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73442/#review223235 ----------------------------------------------------------- On July 9, 2021, 1:11 p.m., Mandar Ambawane wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73442/ > ----------------------------------------------------------- > > (Updated July 9, 2021, 1:11 p.m.) > > > Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, > and Sarath Subramanian. > > > Bugs: ATLAS-4150 > https://issues.apache.org/jira/browse/ATLAS-4150 > > > Repository: atlas > > > Description > ------- > > This patch checks all the Super Types of an Entity Type. If any of the Super > Types is __internal > > Then it will not allow that Entity Type in Metrics api response. > > > Diffs > ----- > > repository/src/main/java/org/apache/atlas/services/MetricsService.java > e721108d3 > repository/src/test/java/org/apache/atlas/services/MetricsServiceTest.java > bea8eb8b5 > > > Diff: https://reviews.apache.org/r/73442/diff/1/ > > > Testing > ------- > > PreCommit: > https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/734/consoleFull > > > Thanks, > > Mandar Ambawane > >
