Update of
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/security/plain
In directory james.mmbase.org:/tmp/cvs-serv11407
Modified Files:
PropertiesSecurityComponent.java
Log Message:
don't log errors if properties file does not exists
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/security/plain
Index: PropertiesSecurityComponent.java
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/security/plain/PropertiesSecurityComponent.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- PropertiesSecurityComponent.java 13 Aug 2008 10:25:45 -0000 1.1
+++ PropertiesSecurityComponent.java 14 Aug 2008 16:09:46 -0000 1.2
@@ -18,7 +18,7 @@
import nl.didactor.security.UserContext;
/**
- * @version $Id: PropertiesSecurityComponent.java,v 1.1 2008/08/13 10:25:45
michiel Exp $
+ * @version $Id: PropertiesSecurityComponent.java,v 1.2 2008/08/14 16:09:46
michiel Exp $
*/
public class PropertiesSecurityComponent implements AuthenticationComponent {
@@ -42,8 +42,11 @@
properties.clear();
Properties props = new Properties();
try {
+ java.net.URL u =
ResourceLoader.getConfigurationRoot().getResource(file);
+ if (u.openConnection().getDoInput()) {
InputStream is =
ResourceLoader.getConfigurationRoot().getResource(file).openStream();
props.load(is);
+ }
} catch (Exception e) {
log.error(e.getMessage(), e);
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs