Skip to content

Commit

Permalink
DefaultExceptionMapper made public
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam committed Dec 15, 2021
1 parent 140b4ab commit 1142023
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package org.glassfish.jersey.server;
package org.glassfish.jersey.internal;

import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;

class DefaultExceptionMapper implements ExceptionMapper<Throwable> {
public final class DefaultExceptionMapper implements ExceptionMapper<Throwable> {
@Override
public Response toResponse(Throwable exception) {
return (exception instanceof WebApplicationException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ private LazyValue<Set<ExceptionMapperType>> createLazyExceptionMappers(Injection
for (final Type contract : contracts) {
if (contract instanceof Class
&& ExceptionMapper.class.isAssignableFrom((Class<?>) contract)
&& contract != ExceptionMapper.class) {
&& contract != ExceptionMapper.class
&& contract != DefaultExceptionMapper.class) {
//noinspection unchecked
mapperTypes.add((Class<? extends ExceptionMapper>) contract);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

import jakarta.inject.Provider;

import org.glassfish.jersey.internal.DefaultExceptionMapper;
import org.glassfish.jersey.internal.guava.Preconditions;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.inject.Injections;
Expand Down

0 comments on commit 1142023

Please sign in to comment.