]
Randall Hauch updated DNA-102:
------------------------------
Moved issues from 0.4 to 0.5 during initial planning process for 0.4 release.
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: Graph
Affects Versions: 0.1, 0.2
Reporter: Greg Haber
Priority: Minor
Fix For: 0.4
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: