From 66ccb0feb1bce2b5509fc2369d1503fdc9485654 Mon Sep 17 00:00:00 2001 From: Albert Shift Date: Wed, 10 Jun 2015 16:51:19 -0700 Subject: [PATCH] skeep annotations in package scaning process --- src/main/java/com/noorq/casser/core/SessionInitializer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/noorq/casser/core/SessionInitializer.java b/src/main/java/com/noorq/casser/core/SessionInitializer.java index 1fe4120..51cfb9f 100644 --- a/src/main/java/com/noorq/casser/core/SessionInitializer.java +++ b/src/main/java/com/noorq/casser/core/SessionInitializer.java @@ -16,6 +16,7 @@ package com.noorq.casser.core; import java.io.PrintStream; +import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; @@ -142,7 +143,7 @@ public final class SessionInitializer extends AbstractSessionOperations { try { PackageUtil.getClasses(packageName) .stream() - .filter(c -> c.isInterface()) + .filter(c -> c.isInterface() && !c.isAnnotation()) .forEach(initList::add); } catch (ClassNotFoundException e) { throw new CasserException("fail to add package " + packageName, e);