Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.security.AccessController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand All @@ -23,8 +22,6 @@
import javax.swing.JPanel;
import javax.swing.SwingWorker;

import org.glassfish.jersey.internal.util.ReflectionHelper;

import com.mirth.connect.client.core.ClientException;
import com.mirth.connect.client.ui.ConnectorTypeDecoration;
import com.mirth.connect.client.ui.PlatformUI;
Expand Down Expand Up @@ -197,9 +194,9 @@ public final <T> T getServlet(final Class<T> servletInterface, final String work
* A custom error message to display if an exception occurs during connector service
* invocation
*/
@SuppressWarnings({"removal", "unchecked"})
@SuppressWarnings("unchecked")
public final <T> T getServlet(final Class<T> servletInterface, final String workerDisplayText, final String errorText, final ResponseHandler responseHandler, final String workerId) {
return (T) Proxy.newProxyInstance(AccessController.doPrivileged(ReflectionHelper.getClassLoaderPA(servletInterface)), new Class[] {
return (T) Proxy.newProxyInstance(servletInterface.getClassLoader(), new Class[] {
servletInterface }, new InvocationHandler() {
@Override
public Object invoke(final Object proxy, final Method method, final Object[] args) throws ClientException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.lang.reflect.Proxy;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.AccessController;
import java.security.Provider;
import java.text.SimpleDateFormat;
import java.util.Calendar;
Expand Down Expand Up @@ -51,7 +50,6 @@
import org.glassfish.jersey.client.proxy.WebResourceFactory;
import org.glassfish.jersey.client.spi.Connector;
import org.glassfish.jersey.client.spi.ConnectorProvider;
import org.glassfish.jersey.internal.util.ReflectionHelper;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.reflections.Reflections;

Expand Down Expand Up @@ -247,9 +245,9 @@ public <T> T getServlet(Class<T> servletInterface, ExecuteType executeType) {
return getServlet(servletInterface, executeType, null);
}

@SuppressWarnings({"removal", "unchecked"})
@SuppressWarnings("unchecked")
public <T> T getServlet(final Class<T> servletInterface, final ExecuteType executeType, final Map<String, List<String>> customHeaders) {
return (T) Proxy.newProxyInstance(AccessController.doPrivileged(ReflectionHelper.getClassLoaderPA(servletInterface)), new Class[] {
return (T) Proxy.newProxyInstance(servletInterface.getClassLoader(), new Class[] {
servletInterface }, new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws ClientException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ public class MirthJavaScriptThreadFactory implements ThreadFactory {
private final AtomicInteger threadNumber = new AtomicInteger(1);
private final String namePrefix;

@SuppressWarnings("removal")
MirthJavaScriptThreadFactory() {
SecurityManager securityManager = System.getSecurityManager();
group = (securityManager != null) ? securityManager.getThreadGroup() : Thread.currentThread().getThreadGroup();
group = Thread.currentThread().getThreadGroup();
namePrefix = "pool-" + poolNumber.getAndIncrement() + "-thread-";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Proxy;
import java.lang.reflect.Type;
import java.security.AccessController;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -82,7 +81,6 @@
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;

import org.glassfish.jersey.internal.util.ReflectionHelper;
import org.glassfish.jersey.media.multipart.Boundary;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.glassfish.jersey.media.multipart.FormDataParam;
Expand Down Expand Up @@ -140,15 +138,15 @@ public static <C> C newResource(final Class<C> resourceInterface, final WebTarge
* @return Instance of a class implementing the resource interface that can
* be used for making requests to the server.
*/
@SuppressWarnings({"removal", "unchecked"})
@SuppressWarnings("unchecked")
public static <C> C newResource(final Class<C> resourceInterface,
final WebTarget target,
final boolean ignoreResourcePath,
final MultivaluedMap<String, Object> headers,
final List<Cookie> cookies,
final Form form) {

return (C) Proxy.newProxyInstance(AccessController.doPrivileged(ReflectionHelper.getClassLoaderPA(resourceInterface)),
return (C) Proxy.newProxyInstance(resourceInterface.getClassLoader(),
new Class[] {resourceInterface},
new WebResourceFactory(ignoreResourcePath ? target : addPathFromAnnotation(resourceInterface, target),
headers, cookies, form));
Expand Down
Loading