[jira] [Commented] (ATLAS-2533) AtlasEntity is double classified
[ https://issues.apache.org/jira/browse/ATLAS-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16428084#comment-16428084 ] Graham Wallis commented on ATLAS-2533: -- Thanks for the speedy patch :) [~bpgergo] - I think the only use of this method may be from my (forthcoming) connector code. > AtlasEntity is double classified > > > Key: ATLAS-2533 > URL: https://issues.apache.org/jira/browse/ATLAS-2533 > Project: Atlas > Issue Type: Bug >Reporter: Graham Wallis >Assignee: Sarath Subramanian >Priority: Major > Fix For: 1.0.0 > > Attachments: ATLAS-2533.1.patch > > > When a list of classifications is added to an AtlasEntity, it gets added > twice due to the following: > public void addClassifications(List classifications) { > List c = this.classifications; > if (c == null) { > c = new ArrayList<>(classifications); > this.classifications = c; > } > c.addAll(classifications); > } > This last line should be protected by an else clause. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ATLAS-2533) AtlasEntity is double classified
[ https://issues.apache.org/jira/browse/ATLAS-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427983#comment-16427983 ] Nixon Rodrigues commented on ATLAS-2533: [~sarath.ku...@gmail.com] Thanks for the patch. +1 for the patch. > AtlasEntity is double classified > > > Key: ATLAS-2533 > URL: https://issues.apache.org/jira/browse/ATLAS-2533 > Project: Atlas > Issue Type: Bug >Reporter: Graham Wallis >Assignee: Sarath Subramanian >Priority: Major > Attachments: ATLAS-2533.1.patch > > > When a list of classifications is added to an AtlasEntity, it gets added > twice due to the following: > public void addClassifications(List classifications) { > List c = this.classifications; > if (c == null) { > c = new ArrayList<>(classifications); > this.classifications = c; > } > c.addAll(classifications); > } > This last line should be protected by an else clause. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ATLAS-2533) AtlasEntity is double classified
[ https://issues.apache.org/jira/browse/ATLAS-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427086#comment-16427086 ] Péter Gergő Barna commented on ATLAS-2533: -- I just took a quick look at this. The method referred in the issue description was introduced in this patch recently: [https://github.com/apache/atlas/commit/a3374c74] The method itself does not seem to be used at all, so this may not be the cause. [~grahamwallis], could you please add repro steps? > AtlasEntity is double classified > > > Key: ATLAS-2533 > URL: https://issues.apache.org/jira/browse/ATLAS-2533 > Project: Atlas > Issue Type: Bug >Reporter: Graham Wallis >Priority: Major > > When a list of classifications is added to an AtlasEntity, it gets added > twice due to the following: > public void addClassifications(List classifications) { > List c = this.classifications; > if (c == null) { > c = new ArrayList<>(classifications); > this.classifications = c; > } > c.addAll(classifications); > } > This last line should be protected by an else clause. -- This message was sent by Atlassian JIRA (v7.6.3#76005)