From f2a82107c3560efb5968b9b028a8adee85f43143 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Wed, 30 Jan 2013 09:55:34 +0000
Subject: [PATCH] RemoteHierarchicalContent.getNode() throws an exception in
 accordance to interface contract.

SVN: 28229
---
 .../generic/shared/content/RemoteHierarchicalContent.java | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/RemoteHierarchicalContent.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/RemoteHierarchicalContent.java
index 863d4c8d835..453ec009bfe 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/RemoteHierarchicalContent.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/RemoteHierarchicalContent.java
@@ -100,15 +100,9 @@ public class RemoteHierarchicalContent implements IHierarchicalContent
             info = provider.tryGetPathInfoByRelativePath(relativePath);
         }
 
-        // 2013-01-29, BR: check this: according to the contract this method should throw
-        // IllegalArgumentException if the path does not exist.
         if (info == null)
         {
-            info = new DataSetPathInfo();
-            info.setDirectory(true);
-            info.setRelativePath(relativePath);
-            info.setParent(null);
-            info.setFileName("");
+            throw new IllegalArgumentException("Resource '" + relativePath + "' does not exist.");
         }
 
         return createNode(info);
-- 
GitLab