Repository: incubator-atlas Updated Branches: refs/heads/master c413975aa -> 6fb7b82a8
ATLAS-1305 Fix potential NPEs in instance conversion code(sumasai) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/6fb7b82a Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/6fb7b82a Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/6fb7b82a Branch: refs/heads/master Commit: 6fb7b82a8fb2442f6ffb08c9946fc446c34b6707 Parents: c413975 Author: Suma Shivaprasad <[email protected]> Authored: Mon Dec 5 18:38:36 2016 -0800 Committer: Suma Shivaprasad <[email protected]> Committed: Mon Dec 5 18:38:36 2016 -0800 ---------------------------------------------------------------------- release-log.txt | 1 + webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java | 2 +- .../org/apache/atlas/web/resources/TypedefsJerseyResourceIT.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/6fb7b82a/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 1b2d26c..1d44e3e 100644 --- a/release-log.txt +++ b/release-log.txt @@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ALL CHANGES: +ATLAS-1305 Fix potential NPEs in instance conversion code (sumasai) ATLAS-1349 Reduce excessive exception logging (apoorvnaik via svimal2106) ATLAS-1343 CTAS query is not captured by Atlas with Hive2 (svimal2106) ATLAS-1337 fixed FalconHookIT (ayubpathan via mneethiraj) http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/6fb7b82a/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java ---------------------------------------------------------------------- diff --git a/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java index 6bbc69c..2529f0d 100644 --- a/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java +++ b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java @@ -393,7 +393,7 @@ public class EntityREST { */ private void validateUniqueAttribute(AtlasEntityType entityType, String attributeName) throws AtlasBaseException { AtlasStructDef.AtlasAttributeDef attribute = entityType.getAttributeDef(attributeName); - if (!attribute.getIsUnique()) { + if (attribute != null && !attribute.getIsUnique()) { throw new AtlasBaseException(AtlasErrorCode.ATTRIBUTE_UNIQUE_INVALID, entityType.getTypeName(), attributeName); } } http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/6fb7b82a/webapp/src/test/java/org/apache/atlas/web/resources/TypedefsJerseyResourceIT.java ---------------------------------------------------------------------- diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/TypedefsJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/TypedefsJerseyResourceIT.java index 2fa1602..8e8684f 100644 --- a/webapp/src/test/java/org/apache/atlas/web/resources/TypedefsJerseyResourceIT.java +++ b/webapp/src/test/java/org/apache/atlas/web/resources/TypedefsJerseyResourceIT.java @@ -337,7 +337,7 @@ public class TypedefsJerseyResourceIT extends BaseResourceIT { } else if (typeDef.getCategory() == TypeCategory.ENTITY) { byGuid = clientV2.getEntityByGuid(typeDef.getGuid()); } else if (typeDef.getCategory() == TypeCategory.CLASSIFICATION) { - byGuid = clientV2.getClassificationByGuid(typeDef.getName()); + byGuid = clientV2.getClassificationByGuid(typeDef.getGuid()); } else if (typeDef.getCategory() == TypeCategory.STRUCT) { byGuid = clientV2.getStructByGuid(typeDef.getGuid()); }
