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
8244f8bf
Commit
8244f8bf
authored
Feb 27, 2017
by
Vimal Sharma
Committed by
Madhan Neethiraj
Feb 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1572: updated notification processing to handle messages from v1 hooks
parent
9e16600c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
AtlasArrayFormatConverter.java
...tlas/repository/converters/AtlasArrayFormatConverter.java
+12
-8
No files found.
repository/src/main/java/org/apache/atlas/repository/converters/AtlasArrayFormatConverter.java
View file @
8244f8bf
...
...
@@ -42,22 +42,26 @@ public class AtlasArrayFormatConverter extends AtlasAbstractFormatConverter {
Collection
ret
=
null
;
if
(
v1Obj
!=
null
)
{
if
(
v1Obj
instanceof
List
)
{
ret
=
new
ArrayList
();
}
else
if
(
v1Obj
instanceof
Set
)
{
if
(
v1Obj
instanceof
Set
)
{
ret
=
new
LinkedHashSet
();
}
else
{
throw
new
AtlasBaseException
(
AtlasErrorCode
.
UNEXPECTED_TYPE
,
"List or Set"
,
v1Obj
.
getClass
().
getCanonicalName
());
ret
=
new
ArrayList
();
}
AtlasArrayType
arrType
=
(
AtlasArrayType
)
type
;
AtlasType
elemType
=
arrType
.
getElementType
();
AtlasFormatConverter
elemConverter
=
converterRegistry
.
getConverter
(
elemType
.
getTypeCategory
());
Collection
v1List
=
(
Collection
)
v1Obj
;
for
(
Object
v1Elem
:
v1List
)
{
Object
convertedVal
=
elemConverter
.
fromV1ToV2
(
v1Elem
,
elemType
,
ctx
);
if
(
v1Obj
instanceof
Collection
)
{
Collection
v1List
=
(
Collection
)
v1Obj
;
for
(
Object
v1Elem
:
v1List
)
{
Object
convertedVal
=
elemConverter
.
fromV1ToV2
(
v1Elem
,
elemType
,
ctx
);
ret
.
add
(
convertedVal
);
}
}
else
{
Object
convertedVal
=
elemConverter
.
fromV1ToV2
(
v1Obj
,
elemType
,
ctx
);
ret
.
add
(
convertedVal
);
}
...
...
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