You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2012/06/13 23:36:09 UTC
[5/5] git commit: DELTASPIKE-196 implement @ConfigProperty handling
via producer methods
DELTASPIKE-196 implement @ConfigProperty handling via producer methods
Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/7febb8b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/7febb8b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/7febb8b9
Branch: refs/heads/master
Commit: 7febb8b9b7235b6e1b84d42aaa64bdbeee0317da
Parents: 62e6a00
Author: Mark Struberg <st...@apache.org>
Authored: Wed Jun 13 18:06:05 2012 +0200
Committer: Mark Struberg <st...@apache.org>
Committed: Wed Jun 13 18:06:05 2012 +0200
----------------------------------------------------------------------
.../api/config/BaseConfigPropertyProducer.java | 87 +++++++++++++++
.../core/api/config/annotation/ConfigProperty.java | 2 +
.../extension/ConfigPropertyExtension.java | 3 +-
.../extension/ConfigPropertyProducer.java | 75 +++++++++++++
...ustomConfigAnnotationWithConverterProducer.java | 64 +++++++++++
.../CustomConfigAnnotationWithMetaData.java | 3 +-
...CustomConfigAnnotationWithMetaDataProducer.java | 62 ++++++++++
...gAnnotationWithMetaDataWithCustomConverter.java | 3 +-
.../CustomInverseStringToIntegerConverter.java | 1 +
.../CustomInverseStringToLongConverter.java | 1 +
.../core/api/config/injectable/SettingsBean.java | 6 +-
.../injectable/SimpleCustomConfigAnnotation.java | 5 +-
12 files changed, 301 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/BaseConfigPropertyProducer.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/BaseConfigPropertyProducer.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/BaseConfigPropertyProducer.java
new file mode 100644
index 0000000..3b538d0
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/BaseConfigPropertyProducer.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.core.api.config;
+
+import javax.enterprise.inject.spi.Annotated;
+import javax.enterprise.inject.spi.InjectionPoint;
+import java.lang.annotation.Annotation;
+
+import org.apache.deltaspike.core.api.config.annotation.ConfigProperty;
+
+/**
+ * This contains the fundamental parts for implementing own
+ * ConfigProperty producers.
+ *
+ * TODO: add documentation
+ */
+public class BaseConfigPropertyProducer
+{
+
+ /**
+ * @return the configured value for the given InjectionPoint
+ */
+ protected String getStringPropertyValue(InjectionPoint injectionPoint)
+ {
+ ConfigProperty configProperty = extractConfigProperty(injectionPoint.getAnnotated());
+
+ if (configProperty == null)
+ {
+ throw new IllegalStateException("producer method called without @ConfigProperty being present!");
+ }
+
+ String configuredValue;
+ String defaultValue = configProperty.defaultValue();
+ if (ConfigProperty.NULL.equals(defaultValue))
+ {
+ // no special defaultValue has been configured
+ configuredValue = ConfigResolver.getPropertyValue(configProperty.name());
+ }
+ else
+ {
+ configuredValue = ConfigResolver.getPropertyValue(configProperty.name(), defaultValue);
+ }
+
+ return configuredValue;
+ }
+
+
+ /**
+ * Extract the ConfigProperty annotation from the given Annotated member.
+ */
+ protected ConfigProperty extractConfigProperty(Annotated annotated)
+ {
+ ConfigProperty configProperty = annotated.getAnnotation(ConfigProperty.class);
+
+ if (configProperty == null)
+ {
+ // scan for meta-annotation
+ for (Annotation annotation : annotated.getAnnotations())
+ {
+ configProperty = annotation.annotationType().getAnnotation(ConfigProperty.class);
+
+ if (configProperty != null)
+ {
+ break;
+ }
+ }
+ }
+
+ return configProperty;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/ConfigProperty.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/ConfigProperty.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/ConfigProperty.java
index 69e3459..5988c76 100644
--- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/ConfigProperty.java
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/ConfigProperty.java
@@ -61,6 +61,7 @@ public @interface ConfigProperty
* Name/key of the property
* @return name of the property
*/
+ @Nonbinding
String name();
/**
@@ -75,6 +76,7 @@ public @interface ConfigProperty
* @return custom converter or default marker
*/
@Nonbinding
+ @Deprecated
Class<? extends Converter> converter() default Converter.class;
/**
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyExtension.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyExtension.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyExtension.java
index c809ebf..a000fc2 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyExtension.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyExtension.java
@@ -39,7 +39,8 @@ import java.util.Set;
*/
public class ConfigPropertyExtension implements Extension, Deactivatable
{
- private Boolean isActivated = null;
+ private Boolean isActivated = Boolean.FALSE;
+ //X TODO private Boolean isActivated = null;
private Set<ConfigInjectionTargetEntry> injectionTargets = new HashSet<ConfigInjectionTargetEntry>();
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyProducer.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyProducer.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyProducer.java
new file mode 100644
index 0000000..b2f115b
--- /dev/null
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/injectable/extension/ConfigPropertyProducer.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.core.impl.config.injectable.extension;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.apache.deltaspike.core.api.config.BaseConfigPropertyProducer;
+import org.apache.deltaspike.core.api.config.annotation.ConfigProperty;
+
+/**
+ * This class contains producer methods for injecting
+ * configuration provided with the {@link ConfigProperty}
+ * annotation.
+ */
+@ApplicationScoped
+public class ConfigPropertyProducer extends BaseConfigPropertyProducer
+{
+
+ @Produces
+ @Dependent
+ @ConfigProperty(name = "ignored") // we actually don't need the name
+ public String produceStringConfiguration(InjectionPoint injectionPoint)
+ {
+ return getStringPropertyValue(injectionPoint);
+ }
+
+ @Produces
+ @Dependent
+ @ConfigProperty(name = "ignored") // we actually don't need the name
+ public Integer produceIntegerConfiguration(InjectionPoint injectionPoint)
+ {
+ String configuredValue = getStringPropertyValue(injectionPoint);
+ if (configuredValue == null)
+ {
+ return null;
+ }
+
+ return Integer.parseInt(configuredValue);
+ }
+
+ @Produces
+ @Dependent
+ @ConfigProperty(name = "ignored") // we actually don't need the name
+ public Long produceLongConfiguration(InjectionPoint injectionPoint)
+ {
+ String configuredValue = getStringPropertyValue(injectionPoint);
+ if (configuredValue == null)
+ {
+ return null;
+ }
+
+ return Long.parseLong(configuredValue);
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithConverterProducer.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithConverterProducer.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithConverterProducer.java
new file mode 100644
index 0000000..8cdd432
--- /dev/null
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithConverterProducer.java
@@ -0,0 +1,64 @@
+package org.apache.deltaspike.test.core.api.config.injectable;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.apache.deltaspike.core.api.config.BaseConfigPropertyProducer;
+
+/**
+ * Sample producer for {@link org.apache.deltaspike.test.core.api.config.injectable.CustomConfigAnnotationWithMetaData}
+ */
+@ApplicationScoped
+public class CustomConfigAnnotationWithConverterProducer extends BaseConfigPropertyProducer
+{
+
+ @Produces
+ @Dependent
+ @CustomConfigAnnotationWithMetaDataWithCustomConverter
+ public Integer produceIntegerCustomConfig(InjectionPoint injectionPoint)
+ {
+ String configuredValue = getStringPropertyValue(injectionPoint);
+ if (configuredValue == null || configuredValue.length() == 0)
+ {
+ return 0;
+ }
+
+ Integer result = Integer.parseInt(configuredValue);
+
+ CustomConfigAnnotationWithMetaDataWithCustomConverter metaData =
+ injectionPoint.getAnnotated().
+ getAnnotation(CustomConfigAnnotationWithMetaDataWithCustomConverter.class);
+ if (metaData != null && metaData.inverseConvert())
+ {
+ return result * -1;
+ }
+
+ return result;
+ }
+
+ @Produces
+ @Dependent
+ @CustomConfigAnnotationWithMetaDataWithCustomConverter
+ public Long produceLongCustomConfig(InjectionPoint injectionPoint)
+ {
+ String configuredValue = getStringPropertyValue(injectionPoint);
+ if (configuredValue == null || configuredValue.length() == 0)
+ {
+ return 0L;
+ }
+
+ Long result = Long.parseLong(configuredValue);
+
+ CustomConfigAnnotationWithMetaDataWithCustomConverter metaData =
+ injectionPoint.getAnnotated().
+ getAnnotation(CustomConfigAnnotationWithMetaDataWithCustomConverter.class);
+ if (metaData != null && metaData.inverseConvert())
+ {
+ return result * -1L;
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaData.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaData.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaData.java
index 9e7f3cc..1068bcd 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaData.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaData.java
@@ -20,6 +20,7 @@ package org.apache.deltaspike.test.core.api.config.injectable;
import org.apache.deltaspike.core.api.config.annotation.ConfigProperty;
+import javax.enterprise.inject.Stereotype;
import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;
import java.lang.annotation.Documented;
@@ -36,9 +37,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ PARAMETER, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Documented
-
@ConfigProperty(name = "configProperty2")
-
@Qualifier
public @interface CustomConfigAnnotationWithMetaData
{
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataProducer.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataProducer.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataProducer.java
new file mode 100644
index 0000000..a9429de
--- /dev/null
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataProducer.java
@@ -0,0 +1,62 @@
+package org.apache.deltaspike.test.core.api.config.injectable;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.apache.deltaspike.core.api.config.BaseConfigPropertyProducer;
+
+/**
+ * Sample producer for {@link CustomConfigAnnotationWithMetaData}
+ */
+@ApplicationScoped
+public class CustomConfigAnnotationWithMetaDataProducer extends BaseConfigPropertyProducer
+{
+
+ @Produces
+ @Dependent
+ @CustomConfigAnnotationWithMetaData
+ public Integer produceIntegerCustomConfig(InjectionPoint injectionPoint)
+ {
+ String configuredValue = getStringPropertyValue(injectionPoint);
+ if (configuredValue == null || configuredValue.length() == 0)
+ {
+ return 0;
+ }
+
+ Integer result = Integer.parseInt(configuredValue);
+
+ CustomConfigAnnotationWithMetaData metaData =
+ injectionPoint.getAnnotated().getAnnotation(CustomConfigAnnotationWithMetaData.class);
+ if (metaData != null && metaData.inverseConvert())
+ {
+ return result * -1;
+ }
+
+ return result;
+ }
+
+ @Produces
+ @Dependent
+ @CustomConfigAnnotationWithMetaData
+ public Long produceLongCustomConfig(InjectionPoint injectionPoint)
+ {
+ String configuredValue = getStringPropertyValue(injectionPoint);
+ if (configuredValue == null || configuredValue.length() == 0)
+ {
+ return 0L;
+ }
+
+ Long result = Long.parseLong(configuredValue);
+
+ CustomConfigAnnotationWithMetaData metaData =
+ injectionPoint.getAnnotated().getAnnotation(CustomConfigAnnotationWithMetaData.class);
+ if (metaData != null && metaData.inverseConvert())
+ {
+ return result * -1L;
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataWithCustomConverter.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataWithCustomConverter.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataWithCustomConverter.java
index 9400e9b..51e7157 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataWithCustomConverter.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomConfigAnnotationWithMetaDataWithCustomConverter.java
@@ -20,6 +20,7 @@ package org.apache.deltaspike.test.core.api.config.injectable;
import org.apache.deltaspike.core.api.config.annotation.ConfigProperty;
+import javax.enterprise.inject.Stereotype;
import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;
import java.lang.annotation.Documented;
@@ -36,9 +37,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ PARAMETER, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Documented
-
@ConfigProperty(name = "configProperty1", converter = CustomInverseStringToIntegerConverter.class)
-
@Qualifier
public @interface CustomConfigAnnotationWithMetaDataWithCustomConverter
{
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToIntegerConverter.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToIntegerConverter.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToIntegerConverter.java
index c25bcbc..ab4657e 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToIntegerConverter.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToIntegerConverter.java
@@ -24,6 +24,7 @@ import org.apache.deltaspike.core.api.converter.MetaDataAwareConverter;
import javax.enterprise.inject.Typed;
@Typed
+@Deprecated
public class CustomInverseStringToIntegerConverter
implements MetaDataAwareConverter<String, Integer, CustomConfigAnnotationWithMetaDataWithCustomConverter>
{
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToLongConverter.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToLongConverter.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToLongConverter.java
index 49539a5..10d2eab 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToLongConverter.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/CustomInverseStringToLongConverter.java
@@ -24,6 +24,7 @@ import org.apache.deltaspike.core.api.converter.MetaDataAwareConverter;
import javax.enterprise.context.Dependent;
@Dependent
+@Deprecated
public class CustomInverseStringToLongConverter
implements MetaDataAwareConverter<String, Long, CustomConfigAnnotationWithMetaData>
{
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SettingsBean.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SettingsBean.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SettingsBean.java
index 4bf3d66..4ea3ab8 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SettingsBean.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SettingsBean.java
@@ -26,6 +26,8 @@ import javax.inject.Inject;
@ApplicationScoped
public class SettingsBean
{
+ final static String PROPERTY_NAME = "configProperty2";
+
@Inject
@ConfigProperty(name = "configProperty1")
private Integer intProperty1;
@@ -44,8 +46,6 @@ public class SettingsBean
@ConfigProperty(name = "nonexistingProperty", defaultValue = "42")
private Integer intProperty4Defaulted;
-
-
@Inject
@CustomConfigAnnotationWithMetaDataWithCustomConverter(inverseConvert = true)
private Integer inverseProperty1;
@@ -57,7 +57,7 @@ public class SettingsBean
}
@Inject
- public SettingsBean(@SimpleCustomConfigAnnotation Long property2)
+ public SettingsBean(@ConfigProperty(name= PROPERTY_NAME) Long property2)
{
this.property2 = property2;
}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/7febb8b9/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SimpleCustomConfigAnnotation.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SimpleCustomConfigAnnotation.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SimpleCustomConfigAnnotation.java
index cf9f97b..7010eb8 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SimpleCustomConfigAnnotation.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/config/injectable/SimpleCustomConfigAnnotation.java
@@ -20,6 +20,7 @@ package org.apache.deltaspike.test.core.api.config.injectable;
import org.apache.deltaspike.core.api.config.annotation.ConfigProperty;
+import javax.enterprise.inject.Stereotype;
import javax.inject.Qualifier;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
@@ -35,10 +36,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ PARAMETER, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Documented
-
@ConfigProperty(name = "configProperty2")
-
-@Qualifier
+@Deprecated
public @interface SimpleCustomConfigAnnotation
{
}