[dna-issues] [JBoss JIRA] Updated: (DNA-102) setProperty method in SequencerOutput interface should enforce limitations on property value types
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Wed Sep 10 13:38:38 EDT 2008
[ https://jira.jboss.org/jira/browse/DNA-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Randall Hauch updated DNA-102:
------------------------------
Fix Version/s: 0.3
(was: 0.2)
I think that we're going to push this again, mostly because of time constraints. However, we know that there may be some upcoming changes to write sequencer output directly to the graph sources (rather than on top of JCR, which is what they do now), so this is another good reason to push this issue.
> setProperty method in SequencerOutput interface should enforce limitations on property value types
> --------------------------------------------------------------------------------------------------
>
> Key: DNA-102
> URL: https://jira.jboss.org/jira/browse/DNA-102
> Project: DNA
> Issue Type: Bug
> Components: API
> Affects Versions: 0.1, 0.2
> Reporter: Greg Haber
> Priority: Minor
> Fix For: 0.3
>
>
> The setProperty method of the SequencerOutput method, as it currently exists, accepts arbitrary single Objects or arrays of Objects as property values via its use of "Object..." in the method signature. In DNA-77, it was suggested that the current method definition should be replaced with multiple type-specific methods, but it was decided to not do this, and instead recommend use of ValueFactory to create the values used in this method.
> The problem with this is that, by leaving the interface as is and having use of ValueFactory be optional, it is easy for users to set properties to value types that are not currently supported (meaning that they will see a run-time error somewhere else in the code in these cases, rather than a compile-time or run-time error at the actual point where the issue was introduced (their misuse of setProperty).
> One possible way to enforce this in the interface is to define the interface as throwing some sort of exception if the value is not an instance of an allowed class. Another solution would be a more substantial revision of the interface to mandate use of ValueFactory to create property values.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list