Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
ae4305d6
Commit
ae4305d6
authored
5 years ago
by
Le Ma
Committed by
Sarath Subramanian
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2933-2 Fix for changed behavior of empty arr attributes
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
9afe4622
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
AtlasGraphUtilsV2.java
...he/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
+1
-2
AtlasComplexAttributesTest.java
...repository/store/graph/v2/AtlasComplexAttributesTest.java
+1
-1
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
View file @
ae4305d6
...
@@ -218,12 +218,11 @@ public class AtlasGraphUtilsV2 {
...
@@ -218,12 +218,11 @@ public class AtlasGraphUtilsV2 {
Object
existingValue
=
element
.
getProperty
(
propertyName
,
Object
.
class
);
Object
existingValue
=
element
.
getProperty
(
propertyName
,
Object
.
class
);
if
(
value
==
null
||
(
value
instanceof
Collection
&&
((
Collection
)
value
).
isEmpty
())
)
{
if
(
value
==
null
)
{
if
(
existingValue
!=
null
)
{
if
(
existingValue
!=
null
)
{
if
(
LOG
.
isDebugEnabled
())
{
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"Removing property {} from {}"
,
propertyName
,
toString
(
element
));
LOG
.
debug
(
"Removing property {} from {}"
,
propertyName
,
toString
(
element
));
}
}
element
.
removeProperty
(
propertyName
);
element
.
removeProperty
(
propertyName
);
}
}
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java
View file @
ae4305d6
...
@@ -218,7 +218,7 @@ public class AtlasComplexAttributesTest extends AtlasEntityTestBase {
...
@@ -218,7 +218,7 @@ public class AtlasComplexAttributesTest extends AtlasEntityTestBase {
assertNull
(
updatedSimpleEntity
.
getAttribute
(
"stringAtrr"
));
assertNull
(
updatedSimpleEntity
.
getAttribute
(
"stringAtrr"
));
assertEquals
(
updatedSimpleEntity
.
getAttribute
(
"mapOfStrings"
),
Collections
.
emptyMap
());
assertEquals
(
updatedSimpleEntity
.
getAttribute
(
"mapOfStrings"
),
Collections
.
emptyMap
());
assert
Null
(
updatedSimpleEntity
.
getAttribute
(
"arrayOfStrings"
));
assert
Equals
(
updatedSimpleEntity
.
getAttribute
(
"arrayOfStrings"
),
Collections
.
emptyList
(
));
updatedSimpleEntity
.
setAttribute
(
"stringAtrr"
,
""
);
updatedSimpleEntity
.
setAttribute
(
"stringAtrr"
,
""
);
updatedSimpleEntity
.
setAttribute
(
"mapOfStrings"
,
null
);
updatedSimpleEntity
.
setAttribute
(
"mapOfStrings"
,
null
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment