Skip to content

Commit

Permalink
[issue172] Migrate to a Jakarta namespaced activation API.
Browse files Browse the repository at this point in the history
Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed May 24, 2022
1 parent 9ac463d commit 97c2e1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,16 +717,16 @@ public JsonSerializer<?> findSerializer(Annotated am)
}

/**
* Determines whether the type is assignable to class javax.activation.DataHandler without requiring that class
* Determines whether the type is assignable to class jakarta.activation.DataHandler without requiring that class
* to be on the classpath.
*
* @param type The type.
* @return Whether the type is assignable to class javax.activation.DataHandler
* @return Whether the type is assignable to class jakarta.activation.DataHandler
*/
private boolean isDataHandler(Class<?> type)
{
return type != null && (Object.class != type)
&& (("javax.activation.DataHandler".equals(type.getName()) || isDataHandler(type.getSuperclass())));
&& (("jakarta.activation.DataHandler".equals(type.getName()) || isDataHandler(type.getSuperclass())));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.io.OutputStream;
import java.io.ByteArrayInputStream;

import javax.activation.DataHandler;
import javax.activation.DataSource;
import jakarta.activation.DataHandler;
import jakarta.activation.DataSource;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.io.InputStream;
import java.lang.reflect.Type;

import javax.activation.DataHandler;
import jakarta.activation.DataHandler;

import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.JavaType;
Expand Down

0 comments on commit 97c2e1a

Please sign in to comment.