X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=blobdiff_plain;f=org.argeo.enterprise%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fuseradmin%2FLdifUserAdmin.java;h=832e8e57819a87eaf72f261057615a1c312a544d;hp=b19e9bf4f311da72fc962bb5b411913d05ae57b0;hb=bf5258cc7755010580cd0141ca9087740f740174;hpb=73a89e099608a51d9aef814a3f85a62947275f59 diff --git a/org.argeo.enterprise/src/org/argeo/osgi/useradmin/LdifUserAdmin.java b/org.argeo.enterprise/src/org/argeo/osgi/useradmin/LdifUserAdmin.java index b19e9bf4f..832e8e578 100644 --- a/org.argeo.enterprise/src/org/argeo/osgi/useradmin/LdifUserAdmin.java +++ b/org.argeo.enterprise/src/org/argeo/osgi/useradmin/LdifUserAdmin.java @@ -9,6 +9,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.Dictionary; @@ -106,9 +107,9 @@ public class LdifUserAdmin extends AbstractUserDirectory { throw new UserDirectoryException("Cannot save LDIF user admin: no URI is set"); if (isReadOnly()) throw new UserDirectoryException("Cannot save LDIF user admin: " + getUri() + " is read-only"); - try (FileOutputStream out = new FileOutputStream(new File(getUri()))) { + try (FileOutputStream out = new FileOutputStream(new File(new URI(getUri())))) { save(out); - } catch (IOException e) { + } catch (IOException | URISyntaxException e) { throw new UserDirectoryException("Cannot save user admin to " + getUri(), e); } }