Skip to content

Commit

Permalink
SEAMCATCH-30
Browse files Browse the repository at this point in the history
  • Loading branch information
jharting authored and LightGuard committed Jan 27, 2011
1 parent dcd004a commit 3d9931e
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 2 deletions.
Expand Up @@ -78,6 +78,7 @@ public void executeHandlers(@Observes @Any ExceptionToCatch eventException, fina
{
if (!processedHandlers.contains(handler))
{
@SuppressWarnings("rawtypes")
final CaughtException breadthFirstEvent = new CaughtException(stack, true, eventException.isHandled());
handler.notify(breadthFirstEvent, bm);

Expand Down Expand Up @@ -120,6 +121,7 @@ public void executeHandlers(@Observes @Any ExceptionToCatch eventException, fina
{
if (!processedHandlers.contains(handler))
{
@SuppressWarnings("rawtypes")
final CaughtException depthFirstEvent = new CaughtException(stack, false, eventException.isHandled());
handler.notify(depthFirstEvent, bm);

Expand Down
Expand Up @@ -32,6 +32,7 @@
@HandlesExceptions
public abstract class DecoratorAsHandler extends Account
{
@SuppressWarnings("unused")
@Inject
@Delegate
@Any
Expand Down
Expand Up @@ -104,7 +104,7 @@ public void assertNumberOfHandlersFoundMatchesExpectedBreathFirst()
@Test
public void assertSQLHandlerFound()
{
final List<HandlerMethod> handlerMethods = new ArrayList<HandlerMethod>(extension.getHandlersForExceptionType(
final List<HandlerMethod<? extends Throwable>> handlerMethods = new ArrayList<HandlerMethod<? extends Throwable>>(extension.getHandlersForExceptionType(
SQLException.class, bm, Collections.<Annotation>emptySet(), TraversalMode.DEPTH_FIRST));
assertThat(handlerMethods.size(), is(4));
assertThat(handlerMethods.get(3).getExceptionType(), equalTo((Type) SQLException.class));
Expand Down
Expand Up @@ -21,6 +21,7 @@

import org.jboss.seam.exception.control.test.extension.Arquillian;

@SuppressWarnings("all")
public class ArquillianLiteral extends AnnotationLiteral<Arquillian> implements Arquillian
{
private static final long serialVersionUID = -3525383414748064487L;
Expand Down
Expand Up @@ -21,6 +21,7 @@

import org.jboss.seam.exception.control.test.extension.CatchQualifier;

@SuppressWarnings("all")
public class CatchQualifierLiteral extends AnnotationLiteral<CatchQualifier> implements CatchQualifier
{
private static final long serialVersionUID = 6052715391406598552L;
Expand Down
Expand Up @@ -61,6 +61,7 @@ void protectedHandler(@Handles CaughtException<IllegalStateException> event)
PROTECTED_HANDLER_CALLED = true;
}

@SuppressWarnings("unused")
private void handlerLocationInjections(BeanManager bm, @Handles CaughtException<SQLException> event)
{
if (bm != null)
Expand Down
Expand Up @@ -60,7 +60,7 @@ public static Archive<?> createTestArchive()
@Test
public void assertOrderIsCorrect()
{
List<HandlerMethod> handlers = new ArrayList<HandlerMethod>(extension.getHandlersForExceptionType(
List<HandlerMethod<? extends Throwable>> handlers = new ArrayList<HandlerMethod<? extends Throwable>>(extension.getHandlersForExceptionType(
IllegalArgumentException.class, bm, Collections.<Annotation>emptySet(), TraversalMode.DEPTH_FIRST));

assertEquals("catchThrowable", handlers.get(0).getJavaMethod().getName());
Expand Down
Expand Up @@ -62,6 +62,7 @@ public static Archive<?> createTestArchive()
.addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}

@SuppressWarnings("serial")
public static class ApplicationException extends Exception
{

Expand Down

0 comments on commit 3d9931e

Please sign in to comment.