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
e92593e9
Commit
e92593e9
authored
Apr 25, 2017
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1726 : Creating type name with space causes exceptions while doing DSL search
parent
928bbc5d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
DiscoveryREST.java
...rc/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
+14
-1
No files found.
webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
View file @
e92593e9
...
...
@@ -82,7 +82,7 @@ public class DiscoveryREST {
String
queryStr
=
query
==
null
?
""
:
query
;
if
(
StringUtils
.
isNoneEmpty
(
typeName
))
{
queryStr
=
typeName
+
" "
+
queryStr
;
queryStr
=
escapeTypeName
(
typeName
)
+
" "
+
queryStr
;
}
if
(
StringUtils
.
isNoneEmpty
(
classification
))
{
...
...
@@ -207,4 +207,16 @@ public class DiscoveryREST {
AtlasPerfTracer
.
log
(
perf
);
}
}
private
String
escapeTypeName
(
String
typeName
)
{
String
ret
;
if
(
StringUtils
.
startsWith
(
typeName
,
"`"
)
&&
StringUtils
.
endsWith
(
typeName
,
"`"
))
{
ret
=
typeName
;
}
else
{
ret
=
String
.
format
(
"`%s`"
,
typeName
);
}
return
ret
;
}
}
\ No newline at end of file
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