Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
571bdf35
Commit
571bdf35
authored
12 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
getNode() returns a node even if provider == null.
SVN: 28249
parent
3e157c6d
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
datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/RemoteHierarchicalContent.java
+20
-19
20 additions, 19 deletions
...dss/generic/shared/content/RemoteHierarchicalContent.java
with
20 additions
and
19 deletions
datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/RemoteHierarchicalContent.java
+
20
−
19
View file @
571bdf35
...
...
@@ -93,36 +93,37 @@ public class RemoteHierarchicalContent implements IHierarchicalContent
@Override
public
IHierarchicalContentNode
getNode
(
String
relativePath
)
throws
IllegalArgumentException
{
DataSetPathInfo
info
=
null
;
if
(
provider
!=
null
)
IHierarchicalContentNode
node
=
tryGetNode
(
relativePath
);
if
(
node
==
null
)
{
info
=
provider
.
tryGetPathInfoByRelativePath
(
relativePath
);
throw
new
IllegalArgumentException
(
"Resource '"
+
relativePath
+
"' does not exist."
);
}
if
(
info
==
null
)
{
throw
new
IllegalArgumentException
(
"Resource '"
+
relativePath
+
"' does not exist."
);
}
return
createNode
(
info
);
return
node
;
}
@Override
public
IHierarchicalContentNode
tryGetNode
(
String
relativePath
)
{
if
(
provider
==
null
)
{
return
null
;
}
final
DataSetPathInfo
infoOrNull
=
provider
.
tryGetPathInfoByRelativePath
(
relativePath
);
if
(
infoOrNull
==
null
)
DataSetPathInfo
info
=
null
;
if
(
provider
!=
null
)
{
return
null
;
info
=
provider
.
tryGetPathInfoByRelativePath
(
relativePath
);
if
(
info
==
null
)
{
return
null
;
}
}
else
{
return
createNode
(
infoOrNull
);
info
=
new
DataSetPathInfo
();
info
.
setDirectory
(
true
);
info
.
setRelativePath
(
relativePath
);
info
.
setParent
(
null
);
info
.
setFileName
(
""
);
}
return
createNode
(
info
);
}
@Override
...
...
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