clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r952554 - /incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
Date Tue, 08 Jun 2010 07:09:02 GMT
Author: reto
Date: Tue Jun  8 07:09:02 2010
New Revision: 952554

URL: http://svn.apache.org/viewvc?rev=952554&view=rev
Log:
throwing NoSuchEntity instead of IllegalArgumentException when trying to access non-file uri

Modified:
    incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java

Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java?rev=952554&r1=952553&r2=952554&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
(original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
Tue Jun  8 07:09:02 2010
@@ -121,7 +121,11 @@ public class FileTcProvider implements W
 		initialize();
 		MGraph mGraph = uriRef2MGraphMap.get(name);
 		if (mGraph == null) {
-			File file = new File(URI.create(name.getUnicodeString()));
+			final String uriString = name.getUnicodeString();
+			if (!uriString.startsWith("file:")) {
+				throw new NoSuchEntityException(name);
+			}
+			File file = new File(URI.create(uriString));
 			if (file.exists()) {
 				return createMGraph(name);
 			} else {



Mime
View raw message