[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src: main/java/org/opensaml/saml/saml2/metadata/provider/Abstract...

noreply at shibboleth.net noreply at shibboleth.net
Wed Mar 20 21:37:24 EDT 2013


Author: putmanb
Date: Wed Mar 20 21:37:24 2013
New Revision: 3271

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3271&view=rev
Log:
Porting JOST-206 from v2.

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/AbstractMetadataProvider.java
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProvider.java
    trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/AbstractMetadataProvider.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/AbstractMetadataProvider.java?rev=3271&r1=3270&r2=3271&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/AbstractMetadataProvider.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/AbstractMetadataProvider.java Wed Mar 20 21:37:24 2013
@@ -417,6 +417,7 @@
                 throw e;
             } else {
                 log.error("Metadata provider failed to properly initializing, continuing on without metadata", e);
+                initialized = true;
             }
         }
     }

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProvider.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProvider.java?rev=3271&r1=3270&r2=3271&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProvider.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProvider.java Wed Mar 20 21:37:24 2013
@@ -55,8 +55,7 @@
      * 
      * @param metadata the metadata file
      * 
-     * @throws MetadataProviderException thrown if the given file path is null, does not exist, does not represent a
-     *             file, or if the metadata can not be parsed
+     * @throws MetadataProviderException  this exception is no longer thrown
      */
     public FilesystemMetadataProvider(File metadata) throws MetadataProviderException {
         super();
@@ -69,8 +68,7 @@
      * @param metadata the metadata file
      * @param backgroundTaskTimer timer used to refresh metadata in the background
      * 
-     * @throws MetadataProviderException thrown if the given file path is null, does not exist, does not represent a
-     *             file, or if the metadata can not be parsed
+     * @throws MetadataProviderException  this exception is no longer thrown
      */
     public FilesystemMetadataProvider(Timer backgroundTaskTimer, File metadata) throws MetadataProviderException {
         super(backgroundTaskTimer);
@@ -78,17 +76,13 @@
     }
 
     /**
-     * Sets the file from which metadata is read. The given file path is checked to see if it exists, is a file, and is
-     * readable.
+     * Sets the file from which metadata is read.
      * 
      * @param file path to the metadata file
      * 
-     * @throws MetadataProviderException thrown if the file does not exist or is not a readable file
+     * @throws MetadataProviderException this exception is no longer thrown
      */
     protected void setMetadataFile(File file) throws MetadataProviderException {
-
-        validateMetadataFile(file);
-
         metadataFile = file;
     }
 

Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java?rev=3271&r1=3270&r2=3271&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java Wed Mar 20 21:37:24 2013
@@ -98,6 +98,8 @@
     @Test(expectedExceptions = {MetadataProviderException.class})
     public void testNonexistentMetadataFile() throws MetadataProviderException {
         metadataProvider = new FilesystemMetadataProvider(new File("I-Dont-Exist.xml"));
+        metadataProvider.setParserPool(parserPool);
+        metadataProvider.initialize();
     }
     
     /**
@@ -118,6 +120,8 @@
         
         try {
             metadataProvider = new FilesystemMetadataProvider(targetFile);
+            metadataProvider.setParserPool(parserPool);
+            metadataProvider.initialize();
         } finally {

[... 65 lines stripped ...]


More information about the commits mailing list