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
c3318467
Commit
c3318467
authored
8 years ago
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1415: fix potential NPE issues found by Coverity scan
parent
0e7ef3af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
AtlasStructFormatConverter.java
...apache/atlas/web/adapters/AtlasStructFormatConverter.java
+6
-0
EntitiesREST.java
...src/main/java/org/apache/atlas/web/rest/EntitiesREST.java
+4
-0
No files found.
webapp/src/main/java/org/apache/atlas/web/adapters/AtlasStructFormatConverter.java
View file @
c3318467
...
...
@@ -126,6 +126,12 @@ public class AtlasStructFormatConverter extends AtlasAbstractFormatConverter {
for
(
AtlasStructDef
.
AtlasAttributeDef
attrDef
:
getAttributeDefs
(
structType
))
{
AtlasType
attrType
=
structType
.
getAttributeType
(
attrDef
.
getName
());
if
(
attrType
==
null
)
{
LOG
.
warn
(
"ignored attribute {}.{}: failed to find AtlasType"
,
structType
.
getTypeName
(),
attrDef
.
getName
());
continue
;
}
AtlasFormatConverter
attrConverter
=
converterRegistry
.
getConverter
(
attrType
.
getTypeCategory
());
Object
v2Value
=
attributes
.
get
(
attrDef
.
getName
());
...
...
This diff is collapsed.
Click to expand it.
webapp/src/main/java/org/apache/atlas/web/rest/EntitiesREST.java
View file @
c3318467
...
...
@@ -174,9 +174,13 @@ public class EntitiesREST {
AtlasEntity
.
AtlasEntities
atlasEntities
=
entitiesStore
.
searchEntities
(
searchFilter
);
AtlasEntityHeader
.
AtlasEntityHeaders
entityHeaders
=
new
AtlasEntityHeader
.
AtlasEntityHeaders
();
entityHeaders
.
setList
(
new
LinkedList
<
AtlasEntityHeader
>());
if
(
atlasEntities
!=
null
)
{
for
(
AtlasEntity
atlasEntity
:
atlasEntities
.
getList
())
{
entityHeaders
.
getList
().
add
(
new
AtlasEntityHeader
(
atlasEntity
.
getTypeName
(),
atlasEntity
.
getAttributes
()));
}
}
return
entityHeaders
;
}
...
...
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