#1 ToolFunctionalityImple.tryToCreateSubtool() : wrong precon.

open
nobody
None
7
2004-08-18
2004-08-18
No

The said method has the following precondition:
Environment.instance().getToolManager().canCreateTool(subtoolType,
optionalMaterial.getClass())
which makes optionalMaterial a required parameter that
may not be null.

Solution: Replace the precondition with :
optionalMaterial != null ?
Environment.instance().getToolManager().canCreateTool(subtoolType,
optionalMaterial.getClass()) :
Environment.instance().getToolManager().canCreateTool(subtoolType)

Discussion


Log in to post a comment.