Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2XB3FinalProject
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository 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
Christopher Schankula
2XB3FinalProject
Commits
d56106a4
Commit
d56106a4
authored
7 years ago
by
Christopher Schankula
Browse files
Options
Downloads
Patches
Plain Diff
hopefully finally fixed null pointer error
parent
d38b4254
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/data/BioTree.java
+6
-3
6 additions, 3 deletions
src/data/BioTree.java
with
6 additions
and
3 deletions
src/data/BioTree.java
+
6
−
3
View file @
d56106a4
...
...
@@ -2,6 +2,7 @@ package data;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.ObjectInputStream
;
...
...
@@ -172,6 +173,7 @@ public class BioTree implements Serializable {
Integer
taxonId
=
getTaxonRecord
(
scientificName
);
System
.
out
.
println
(
scientificName
+
": "
+
taxonId
);
if
(
taxonId
==
null
)
return
null
;
if
(
taxonId
==
-
1
)
return
null
;
if
(
processTaxonId
(
taxonId
))
return
null
;
return
taxonId
;
}
...
...
@@ -255,9 +257,10 @@ public class BioTree implements Serializable {
else
System
.
out
.
println
(
scientificName
+
" not in local db"
);
//look up in local incorrect names database, return if it exists
taxonId
=
incorrectNames
.
get
(
scientificName
);
if
(
taxonId
!=
null
)
return
idNodes
.
get
(
taxonId
).
getTaxonId
();
else
{
//otherwise use Worms to look it up
if
(
taxonId
!=
null
)
{
tx
=
idNodes
.
get
(
taxonId
);
if
(
tx
!=
null
)
return
tx
.
getTaxonId
();
}
else
{
//otherwise use Worms to look it up
System
.
out
.
println
(
scientificName
+
" not in incor db"
);
taxonId
=
WormsAPI
.
nameToRecordID
(
scientificName
);
if
(
taxonId
==
null
)
//if nothing is found, mark this species as not existing.
...
...
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