All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.client.exception.ResteasyNotAllowedException Maven / Gradle / Ivy

package org.jboss.resteasy.client.exception;

import static org.jboss.resteasy.client.exception.WebApplicationExceptionWrapper.sanitize;

import javax.ws.rs.NotAllowedException;
import javax.ws.rs.core.Response;

/**
 * Wraps a {@link NotAllowedException} with a {@linkplain #sanitize(Response) sanitized} response.
 *
 * @author James R. Perkins
 */
public class ResteasyNotAllowedException extends NotAllowedException implements WebApplicationExceptionWrapper {
    private final NotAllowedException wrapped;

    ResteasyNotAllowedException(final NotAllowedException wrapped) {
        super(wrapped.getMessage(), sanitize(wrapped.getResponse()), wrapped.getCause());
        this.wrapped = wrapped;
    }

    @Override
    public NotAllowedException unwrap() {
        return wrapped;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy