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
5e00edea
Commit
5e00edea
authored
Jul 21, 2015
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-45 Entity submit fails (suma.shivaprasad via shwethags)
parent
41481672
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
release-log.txt
release-log.txt
+1
-0
DataTypes.java
...ain/java/org/apache/atlas/typesystem/types/DataTypes.java
+9
-1
EntityJerseyResourceIT.java
...rg/apache/atlas/web/resources/EntityJerseyResourceIT.java
+2
-2
No files found.
release-log.txt
View file @
5e00edea
...
...
@@ -8,6 +8,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
ALL CHANGES:
ATLAS-45 Entity submit fails (suma.shivaprasad via shwethags)
ATLAS-46 Different data directory with restart (shwethags)
ATLAS-81 atlas debian packaing fails in maven build (vijay_k via shwethags)
ATLAS-36 Need separate persisted properties for HTTP and HTTPS ports (jmaron)
...
...
typesystem/src/main/java/org/apache/atlas/typesystem/types/DataTypes.java
View file @
5e00edea
...
...
@@ -87,6 +87,14 @@ public class DataTypes {
public
abstract
T
nullValue
();
@Override
protected
T
convertNull
(
Multiplicity
m
)
throws
AtlasException
{
if
(!
m
.
nullAllowed
())
{
throw
new
ValueConversionException
.
NullConversionException
(
m
);
}
return
nullValue
();
}
}
public
static
class
BooleanType
extends
PrimitiveType
<
Boolean
>
{
...
...
@@ -455,7 +463,7 @@ public class DataTypes {
@Override
public
String
convert
(
Object
val
,
Multiplicity
m
)
throws
AtlasException
{
if
(
val
!=
null
&&
(!(
val
instanceof
String
)
||
StringUtils
.
isNot
Blank
((
CharSequence
)
val
)))
{
if
(
val
!=
null
&&
(!(
val
instanceof
String
)
||
StringUtils
.
isNot
Empty
((
CharSequence
)
val
)))
{
return
val
.
toString
();
}
return
convertNull
(
m
);
...
...
webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
View file @
5e00edea
...
...
@@ -98,7 +98,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
@DataProvider
public
Object
[][]
invalidAttrValues
()
{
return
new
Object
[][]{{
null
},
{
""
}
,
{
" "
}
};
return
new
Object
[][]{{
null
},
{
""
}};
}
@Test
(
dataProvider
=
"invalidAttrValues"
)
...
...
@@ -109,7 +109,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
try
{
createInstance
(
databaseInstance
);
Assert
.
fail
(
"Exp
tected Metadata
ServiceException"
);
Assert
.
fail
(
"Exp
ected Atlas
ServiceException"
);
}
catch
(
AtlasServiceException
e
)
{
Assert
.
assertEquals
(
e
.
getStatus
(),
ClientResponse
.
Status
.
BAD_REQUEST
);
}
...
...
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