[OPENDJ-1574] dsconfig throws an exception when editing single-valued ip-address properties Created: 19/Sep/14  Updated: 08/Nov/19  Resolved: 06/May/15

Status: Done
Project: OpenDJ
Component/s: tools
Affects Version/s: 2.6.0
Fix Version/s: 3.0.0, 2.8.0, 2.6.2

Type: Bug Priority: Minor
Reporter: Chris Ridd Assignee: Chris Ridd
Resolution: Fixed Votes: 0
Labels: Verified

Issue Links:
Depends
is required by OPENDJ-1565 Optionally bind to a local address wh... Done
QA Assignee: Ondrej Fuchsik

 Description   

Editing multi-valued ip-address properties (e.g. ds-cfg-listen-address) works OK. However editing a single-valued ip-address property fails straight after pressing enter after the new value with this exception:

Exception in thread "main" java.lang.ClassCastException: java.net.Inet4Address cannot be cast to java.lang.Comparable
	at java.util.TreeMap.compare(TreeMap.java:1290)
	at java.util.TreeMap.put(TreeMap.java:538)
	at java.util.TreeSet.add(TreeSet.java:255)
	at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
	at java.util.TreeSet.addAll(TreeSet.java:312)
	at java.util.TreeSet.<init>(TreeSet.java:160)
	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.runMenu(PropertyValueEditor.java:1984)
	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.visitUnknown(PropertyValueEditor.java:1860)
	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.visitUnknown(PropertyValueEditor.java:1583)
	at org.opends.server.admin.PropertyDefinitionVisitor.visitIPAddress(PropertyDefinitionVisitor.java:221)
	at org.opends.server.admin.IPAddressPropertyDefinition.accept(IPAddressPropertyDefinition.java:165)
	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.invoke(PropertyValueEditor.java:1616)
	at org.opends.server.util.cli.MenuBuilder$MenuImpl.run(MenuBuilder.java:294)
	at org.opends.server.tools.dsconfig.PropertyValueEditor.edit(PropertyValueEditor.java:2370)
	at org.opends.server.tools.dsconfig.SetPropSubCommandHandler.modifyManagedObject(SetPropSubCommandHandler.java:281)
	at org.opends.server.tools.dsconfig.SetPropSubCommandHandler.run(SetPropSubCommandHandler.java:863)
	at org.opends.server.tools.dsconfig.DSConfig$SubCommandHandlerMenuCallback.invoke(DSConfig.java:131)
	at org.opends.server.util.cli.MenuBuilder$MenuImpl.run(MenuBuilder.java:294)
	at org.opends.server.tools.dsconfig.DSConfig$SubMenuCallback.invoke(DSConfig.java:264)
	at org.opends.server.util.cli.MenuBuilder$MenuImpl.run(MenuBuilder.java:294)
	at org.opends.server.tools.dsconfig.DSConfig.runInteractiveMode(DSConfig.java:971)
	at org.opends.server.tools.dsconfig.DSConfig.run(DSConfig.java:842)
	at org.opends.server.tools.dsconfig.DSConfig.main(DSConfig.java:358)
	at org.opends.server.tools.dsconfig.DSConfig.main(DSConfig.java:314)

Similarly for an Inet6Address.

What is strange is that in both single- and multi-value cases we need a TreeSet<T> that contains an Inet4Address object, but in the multi-value case this can be created!



 Comments   
Comment by Ondrej Fuchsik [ 06/Nov/14 ]

Checked with version OpenDJ 2.6.2 .

Comment by Matthew Swift [ 06/May/15 ]

Re-opened in order to add fixVersion 3.0.0

Comment by Matthew Swift [ 06/May/15 ]

Tagged for bulk CLOSE after update.

Generated at Sun Jan 17 00:05:50 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.