Skip to content
Browse files

#64 name change as suggested by MaciejB

  • Loading branch information...
1 parent 0b2bce6 commit 9a561710ac75117502a26b24a6a67b4b6758d50d pawel committed Dec 23, 2011
View
3 .../src/main/java/pl/softwaremill/common/cdi/interceptor/NotNullStringParamsInterceptor.java
@@ -9,7 +9,8 @@
/**
* @author Pawel Wrzeszcz (pawel [at] softwaremill . com)
*/
-@NotNullStringParams @Interceptor
+@NullToEmptyStringParams
+@Interceptor
public class NotNullStringParamsInterceptor {
@AroundInvoke
public Object convertEmptyStringParameters(InvocationContext ctx) throws Exception {
View
4 .../cdi/interceptor/NotNullStringParams.java → .../interceptor/NullToEmptyStringParams.java
@@ -8,12 +8,12 @@
import static java.lang.annotation.RetentionPolicy.*;
/**
- * Method annotated with @NotNullStringParams will never receive null values for String parameters.
+ * Method annotated with @NullToEmptyStringParams will never receive null values for String parameters.
* Parameter values will be converted to empty Strings instead.
*
* @author Pawel Wrzeszcz (pawel [at] softwaremill . com)
*/
@InterceptorBinding
@Target({METHOD, TYPE})
@Retention(RUNTIME)
-public @interface NotNullStringParams {}
+public @interface NullToEmptyStringParams {}
View
4 softwaremill-cdi/src/test/java/pl/softwaremill/common/cdi/interceptor/BeanToIntercept.java
@@ -5,12 +5,12 @@
*/
public class BeanToIntercept {
- @NotNullStringParams
+ @NullToEmptyStringParams
public String[] method(String param1, String param2) {
return new String[] {param1, param2};
}
- @NotNullStringParams
+ @NullToEmptyStringParams
public Object[] method2(Object param1, String param2) {
return new Object[] {param1, param2};
}
View
4 ...r/NotNullStringParamsInterceptorTest.java → ...erceptor/NullToEmptyStringParamsTest.java
@@ -17,12 +17,12 @@
/**
* @author Pawel Wrzeszcz (pawel [at] softwaremill . com)
*/
-public class NotNullStringParamsInterceptorTest extends Arquillian {
+public class NullToEmptyStringParamsTest extends Arquillian {
@Deployment
public static JavaArchive createTestArchive() {
JavaArchive ar = ShrinkWrap.create(JavaArchive.class, "test.jar")
.addClass(BeanToIntercept.class)
- .addClass(NotNullStringParams.class)
+ .addClass(NullToEmptyStringParams.class)
.addClass(NotNullStringParamsInterceptor.class);
ar = addTestBeansXml(ar);

0 comments on commit 9a56171

Please sign in to comment.
Something went wrong with that request. Please try again.