Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
d7d2952e
Commit
d7d2952e
authored
Nov 13, 2015
by
Matija Obreza
Browse files
Fixed missing NPE check and println to stderr
parent
454a710a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/service/impl/GeoRegionServiceImpl.java
View file @
d7d2952e
...
...
@@ -56,8 +56,13 @@ public class GeoRegionServiceImpl implements GeoRegionService {
@Override
public
GeoRegion
getRegion
(
Country
country
)
{
// NPE check
country
.
getId
();
GeoRegion
geoRegion
=
geoRegionRepository
.
findByCountry
(
country
);
geoRegion
.
getCountries
().
size
();
if
(
geoRegion
!=
null
)
{
geoRegion
.
getCountries
().
size
();
}
return
geoRegion
;
}
...
...
src/main/java/org/genesys2/server/servlet/controller/SelectionController.java
View file @
d7d2952e
...
...
@@ -147,14 +147,14 @@ public class SelectionController extends BaseController {
final
String
[]
splits
=
accessionIds
.
split
(
"[,;\\t\\n]+"
);
for
(
final
String
s
:
splits
)
{
System
.
err
.
println
(
">> '"
+
s
.
trim
()
+
"'"
);
//
System.err.println(">> '" + s.trim() + "'");
try
{
final
Accession
accession
=
genesysService
.
getAccession
(
instCode
,
s
.
trim
());
if
(
accession
!=
null
)
{
System
.
err
.
println
(
"\t"
+
accession
.
getId
());
//
System.err.println("\t" + accession.getId());
selectionBean
.
add
(
accession
.
getId
());
}
else
{
System
.
err
.
println
(
"\t NF='"
+
s
+
"'"
);
//
System.err.println("\t NF='" + s + "'");
}
}
catch
(
NonUniqueAccessionException
e
)
{
// Non-unique
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment