[
https://issues.apache.org/jira/browse/QPID-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147583#comment-15147583
]
Alex Rudyy commented on QPID-7049:
----------------------------------
My review comments:
Method ConfiguredSettableInjectedAttribute#getValidValuesMethod evaluates
validation method name using reg exp which can allow specifying illegall names,
for example, re exp character class '\w' includes all characters a-zA-Z_0-9 and
would allows specifying digits at the beginning of package and/or class names
The more correct reg exp would be
{noformat}
([a-zA-Z_$][a-zA-Z\d_$]*\.)*[a-zA-Z_$][a-zA-Z\d_$]*#[a-zA-Z_$][a-zA-Z\d_$]*\s*\(\s*\)\s*
{noformat}
or taking that it is allowed any unicode letter in java identifier name the reg
exp can be overwritten as
{noformat}
([\p{L}_$][\p{L}\p{N}_$]*\.)*[\p{L}_$][\p{L}\p{N}_$]*#[\p{L}_$][\p{L}\p{N}_$]*\s*\(\s*\)\s*
{noformat}
Measleading messages in test
org.apache.qpid.server.model.testmodels.hierarchy.InjectedAttributeTest#testInjectedStatistic
The stat description is "What is 6 x 9?" which sort of implies that 54 by
inject statistic but test is actually testing value 42.
Test fly method in tests can confuse as well.
> [Java Broker] Provide a mechanism to inject attribute/statistic definitions
> into types at runtime
> -------------------------------------------------------------------------------------------------
>
> Key: QPID-7049
> URL: https://issues.apache.org/jira/browse/QPID-7049
> Project: Qpid
> Issue Type: Improvement
> Components: Java Broker
> Reporter: Rob Godfrey
> Assignee: Rob Godfrey
> Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> In some cases it is not possible to know what statistics/attributes will be
> available on an object until runtime (for instance it may depend on the
> environment, the JVM in use or other factors). In this case we cannot define
> the statistics/attributes statically, but must instead inject them at run
> time.
> Another use case is where new functionality may wish to store information as
> attributes against existing configured object types (e.g. an ACL system where
> permission information is stored at each object).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]