Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B2214200AE4 for ; Fri, 10 Jun 2016 07:56:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B0C33160A5C; Fri, 10 Jun 2016 05:56:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 28F7A160A58 for ; Fri, 10 Jun 2016 07:56:22 +0200 (CEST) Received: (qmail 56817 invoked by uid 500); 10 Jun 2016 05:56:21 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 56779 invoked by uid 99); 10 Jun 2016 05:56:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2016 05:56:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 168812C033A for ; Fri, 10 Jun 2016 05:56:21 +0000 (UTC) Date: Fri, 10 Jun 2016 05:56:21 +0000 (UTC) From: "Niclas Hedhman (JIRA)" To: dev@zest.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZEST-141) UseDefaults annotation with value MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 10 Jun 2016 05:56:22 -0000 [ https://issues.apache.org/jira/browse/ZEST-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15323920#comment-15323920 ] Niclas Hedhman commented on ZEST-141: ------------------------------------- Well, as described this is not possible, since you can not have generics on the annotations and the value must be of some specific types (java.lang.Object is not allowed). But we can make it into a String type, and use deserialization to any other type if the property is not a String. I think that is a reasonable compromise. > UseDefaults annotation with value > --------------------------------- > > Key: ZEST-141 > URL: https://issues.apache.org/jira/browse/ZEST-141 > Project: Zest > Issue Type: Improvement > Affects Versions: 2.1 > Reporter: Mingzhou Zhuang > Priority: Minor > Labels: features > > Define default value where I declare the Property, such as: > {code} > public interface ABC { > @UseDefaults(value="127.0.0.1") > Property hostname(); > @UseDefaults(value=8080) > Property port(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)