[spring-extensions] branch master updated: IDP-1177 - Centralize deprecation warnings through dedicated function

Scott Cantor cantor.2 at osu.edu
Thu Jun 8 21:31:01 EDT 2017


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository spring-extensions.

View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=a566e9620c86f3952eb4d05033f284feef5358bd

The following commit(s) were added to refs/heads/master by this push:
       new  a566e96   IDP-1177 - Centralize deprecation warnings through dedicated function
a566e96 is described below

commit a566e9620c86f3952eb4d05033f284feef5358bd
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 8 21:30:59 2017 -0400

    IDP-1177 - Centralize deprecation warnings through dedicated function
    
    https://issues.shibboleth.net/jira/browse/IDP-1177
    
    Convert constructor warnings.
---
 .../ext/spring/resource/FileBackedHTTPResource.java          | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java b/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
index 5f31013..f3ae592 100644
--- a/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
+++ b/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
@@ -29,6 +29,8 @@ import javax.annotation.Nonnull;
 import net.shibboleth.utilities.java.support.annotation.ParameterName;
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
 import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
 
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
@@ -71,8 +73,9 @@ public class FileBackedHTTPResource extends HTTPResource {
         if (null == resource.getFile()) {
             throw new IOException("Backing resource has to be file backed");
         }
-        log.warn("This constructor is deprecated, use backingFile=\"/path/to/file\" instead "
-                + "of resource=\"file:///path/to/file\"");
+        
+        DeprecationSupport.warn(ObjectType.METHOD, "FileBackedHTTPResource constructor with resource argument", null,
+                "FileBackedHTTPResource constructor with backingFile argument");
     }
 
     /**
@@ -93,8 +96,9 @@ public class FileBackedHTTPResource extends HTTPResource {
         if (null == resource.getFile()) {
             throw new IOException("Backing resource has to be file backed");
         }
-        log.warn("This constructor is deprecated, use backingFile=\"/path/to/file\" instead "
-                + "of resource=\"file:///path/to/file\"");
+        
+        DeprecationSupport.warn(ObjectType.METHOD, "FileBackedHTTPResource constructor with resource argument", null,
+                "FileBackedHTTPResource constructor with backingFile argument");
     }
 
     /**

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list