PropertyClass propertyClass = definition.getPropertyClass();
AbstractPropertyKey propertyKey = new AbstractPropertyKey(definition.getName(), propertyClass.getName());
int oldValue = propertyClass.retrievePropertyInt(propertyKey);
if (oldValue != portInt) {
try {
ServerSocket socket = new ServerSocket(portInt);
socket.close();
} catch (Exception e) {
log.error("Failed to open server socket.", e);
throw new CoreException(ErrorConstants.ERR_INTERNAL_ERROR, ErrorConstants.CATEGORY_NAME,
ErrorConstants.BUNDLE_NAME, e, value);
}