[Mulgara-svn] r1509 - trunk/src/jar/resolver/java/org/mulgara/resolver

ronald at mulgara.org ronald at mulgara.org
Tue Feb 17 11:37:19 UTC 2009


Author: ronald
Date: 2009-02-17 03:37:18 -0800 (Tue, 17 Feb 2009)
New Revision: 1509

Modified:
   trunk/src/jar/resolver/java/org/mulgara/resolver/ExportOperation.java
Log:
Fixed NPE when no destination-uri is specified (bug introduced in r1507).

Modified: trunk/src/jar/resolver/java/org/mulgara/resolver/ExportOperation.java
===================================================================
--- trunk/src/jar/resolver/java/org/mulgara/resolver/ExportOperation.java	2009-02-17 10:38:13 UTC (rev 1508)
+++ trunk/src/jar/resolver/java/org/mulgara/resolver/ExportOperation.java	2009-02-17 11:37:18 UTC (rev 1509)
@@ -104,8 +104,8 @@
 
         // Do the writing.
         try {
-          String path = destinationURI.getPath();
-          if (path.endsWith(".n3") || path.endsWith(".nt") || path.endsWith(".ttl")) {
+          String path = (destinationURI != null) ? destinationURI.getPath() : null;
+          if (path != null && (path.endsWith(".n3") || path.endsWith(".nt") || path.endsWith(".ttl"))) {
             N3Writer n3Writer = new N3Writer();
             n3Writer.write(graphStatements, systemResolver, writer);
           } else {




More information about the Mulgara-svn mailing list