[
https://issues.apache.org/jira/browse/DIRSERVER-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846228#comment-13846228
]
Emmanuel Lecharny commented on DIRSERVER-1930:
----------------------------------------------
Right. IMO, this part of the code has to be completely rewritten. There is no
reason for the static initialization to be present inside the DhcpOption
abstract class.
At this point, this is 6 years old unmaintained code that needs a real cleanup.
I would suggest we make the DhcpOption class an interface, and that we create a
DhcpOptionManager that will maitain the list of DhcpOption implementations,
something that is configurable (ie the maps are concurrentHashMap, that can be
updated on the fly).
There is some work to be done here. Wanna be part of it ?
> DhcpOptions not extensible
> --------------------------
>
> Key: DIRSERVER-1930
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1930
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: dhcp
> Reporter: Shevek
>
> It is impossible to add my own DhcpOption types, due to the fixed and private
> static encapsulation in DhcpOption. Also, the option set isn't even complete
> enough for practical use.
> This method:
> public static int getTagByClass( Class c )
> {
> return ( ( Integer ) CODE_BY_CLASS.get( c ) ).intValue();
> }
> will NPE given an option class which isn't privately registered.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)