[ http://issues.apache.org/jira/browse/BEEHIVE-357?page=all ]
Kyle Marvin resolved BEEHIVE-357:
---------------------------------
Resolution: Won't Fix
I'm going to flag this as a "Won't Fix". I think constraining the externally
configurable properties to a subset of the valid JSR-175 @interface member
types is the wrong thing to do.
The reason I says this is that (by default) PropertySet members are externally
configurable, which effectively means you'd be limiting the default behavior.
To work around this, users would have to explicitly configure something as not
being externally configurable to use arrays, Classes, enumerations, and other
fairly basic (and common) property types.
I think the right goal is that *any* Beehive external config mechanism should
define and support a config syntax that is in 100% alignment with the scope of
valid JSR-175 member types. On the 'array' issue, I think the answer is that
external config is always an override/replacement, never a merge, which makes
the semantics and behavior pretty clear and understandable, and also easier to
implement.
The reality is that some external config mechanisms (in v1) may only be able to
support a subset of valid property types, but this restriction should be
documented and enforced by file validators associated with that specific config
mechanism, not by constraining the base PropertySet declaration mechanism.
David (or others), please speak up if you think I'm missing something in my
analysis...
> Limit type of annotations that can be externally overriden
> ----------------------------------------------------------
>
> Key: BEEHIVE-357
> URL: http://issues.apache.org/jira/browse/BEEHIVE-357
> Project: Beehive
> Type: Improvement
> Components: Controls
> Versions: V1Alpha
> Reporter: David Read
> Assignee: Kyle Marvin
> Priority: Minor
> Fix For: V1
>
> JSR175 constrains the set of Java types that can exist as members (methods
> return type) on an annotation. Some of those types don't really make sense
> for external configuration (e.g. Class or byte and arrays of Class or byte).
> There's also a practical matter of allowing arrays of primitive types and
> nested annotations. In those cases, the structural representation and any
> tooling should probably be in sync to make it easy to visualize what's being
> configured relative to the structure of the application. There's also the
> complexity of defining what it means to change an array? The simplest model
> would probably be a full replacement of the array, rather than specifying
> "changes".
> For v1, we should consider limiting annotations that can be overriden
> externally to those than contain only simple primitive types (e.g. String,
> int, float, boolean ... no arrays, no nesting). The annotation processor for
> controls would have to enforce this so the user wouldn't see a downstream
> build error that could have been caught sooner.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira