Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
23889d16
Commit
23889d16
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
failsafe added when recon returns invalid response
parent
a9b8c96b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!386
Resolve "Continous integration tests"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/ReconAnnotator.java
+14
-9
14 additions, 9 deletions
...viewer/annotation/services/annotators/ReconAnnotator.java
with
14 additions
and
9 deletions
annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/ReconAnnotator.java
+
14
−
9
View file @
23889d16
...
...
@@ -335,15 +335,20 @@ public class ReconAnnotator extends ElementAnnotator implements IExternalService
String
match
=
null
;
JsonObject
result
=
null
;
for
(
JsonElement
element
:
asJsonArray
)
{
String
objAbreviation
=
((
JsonObject
)
element
).
get
(
"abbreviation"
).
getAsString
();
if
(
match
==
null
)
{
match
=
objAbreviation
;
result
=
(
JsonObject
)
element
;
}
else
if
(
match
.
length
()
>
objAbreviation
.
length
())
{
match
=
objAbreviation
;
result
=
(
JsonObject
)
element
;
}
else
if
(
id
.
equalsIgnoreCase
(
objAbreviation
))
{
match
=
objAbreviation
;
if
(((
JsonObject
)
element
).
get
(
"abbreviation"
)
!=
null
)
{
String
objAbreviation
=
((
JsonObject
)
element
).
get
(
"abbreviation"
).
getAsString
();
if
(
match
==
null
)
{
match
=
objAbreviation
;
result
=
(
JsonObject
)
element
;
}
else
if
(
match
.
length
()
>
objAbreviation
.
length
())
{
match
=
objAbreviation
;
result
=
(
JsonObject
)
element
;
}
else
if
(
id
.
equalsIgnoreCase
(
objAbreviation
))
{
match
=
objAbreviation
;
result
=
(
JsonObject
)
element
;
}
}
else
if
(
match
==
null
)
{
logger
.
warn
(
"No abbreviation found for element: "
+
element
);
result
=
(
JsonObject
)
element
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment