[jackson-jaxrs-providers] 116/162: Adding 2 (now-deprecated) methods to hopefully resolve #41. Still need to figure out a way to test via unit tests.

Timo Aaltonen tjaalton at moszumanska.debian.org
Mon Sep 8 22:16:34 UTC 2014


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

tjaalton pushed a commit to branch master
in repository jackson-jaxrs-providers.

commit c4ec3afe7b07d13abb5ca811c1e1ee2b1e743385
Author: Tatu Saloranta <tatu.saloranta at iki.fi>
Date:   Thu Jan 30 09:22:49 2014 -0800

    Adding 2 (now-deprecated) methods to hopefully resolve #41. Still need to figure out a way to test via unit tests.
---
 .../fasterxml/jackson/jaxrs/base/ProviderBase.java | 23 +++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/base/src/main/java/com/fasterxml/jackson/jaxrs/base/ProviderBase.java b/base/src/main/java/com/fasterxml/jackson/jaxrs/base/ProviderBase.java
index 5b5ec8e..d2c838b 100644
--- a/base/src/main/java/com/fasterxml/jackson/jaxrs/base/ProviderBase.java
+++ b/base/src/main/java/com/fasterxml/jackson/jaxrs/base/ProviderBase.java
@@ -51,9 +51,6 @@ public abstract class ProviderBase<
         // then some primitive types
         DEFAULT_UNTOUCHABLES.add(new ClassKey(char[].class));
 
-        /* 28-Jan-2012, tatu: 1.x excluded some additional types;
-         *   but let's relax these a bit:
-         */
         /* 27-Apr-2012, tatu: Ugh. As per
          *   [https://github.com/FasterXML/jackson-jaxrs-json-provider/issues/12]
          *  better revert this back, to make them untouchable again.
@@ -445,11 +442,11 @@ public abstract class ProviderBase<
     protected abstract boolean hasMatchingMediaType(MediaType mediaType);
 
     protected abstract MAPPER _locateMapperViaProvider(Class<?> type, MediaType mediaType);
-
+    
     protected EP_CONFIG _configForReading(MAPPER mapper,
         Annotation[] annotations, Class<?> defaultView)
     {
-//        ObjectReaderModi r = _readerInjector.getAndClear();
+//        ObjectReader r = _readerInjector.getAndClear();
         ObjectReader r;
         if (defaultView != null) {
             r = mapper.readerWithView(defaultView);
@@ -472,6 +469,22 @@ public abstract class ProviderBase<
         return _configForWriting(w, annotations);
     }
 
+    /**
+     * @deprecated Since 2.3, use variant that takes explicit defaultView
+     */
+    @Deprecated
+    protected EP_CONFIG _configForReading(MAPPER mapper, Annotation[] annotations) {
+        return _configForReading(mapper, annotations, _defaultReadView);
+    }
+
+    /**
+     * @deprecated Since 2.3, use variant that takes explicit defaultView
+     */
+    @Deprecated
+    protected EP_CONFIG _configForWriting(MAPPER mapper, Annotation[] annotations) {
+        return _configForWriting(mapper, annotations, _defaultWriteView);
+    }
+    
     protected abstract EP_CONFIG _configForReading(ObjectReader reader,
             Annotation[] annotations);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-jaxrs-providers.git



More information about the pkg-java-commits mailing list