Source:
<code>public VnicProfileModel(IModel sourceModel, Version dcCompatibilityVersion, boolean customPropertiesVisible, Guid dcId, Guid defaultQosId) { this.sourceModel = sourceModel; this.customPropertiesVisible = customPropertiesVisible; this.defaultQosId = defaultQosId; setName(new EntityModel<String>()); setNetwork(new ListModel<Network>()); setNetworkQoS(new ListModel<NetworkQoS>()); setNetworkFilter(new ListModel<NetworkFilter>()); setPortMirroring(new EntityModel<Boolean>()); setPassthrough(new EntityModel<Boolean>()); <START> setMigratable(new EntityModel<Boolean>()); <END> setCustomPropertySheet(new KeyValueModel()); EntityModel<Boolean> publicUse = new EntityModel<>(); publicUse.setEntity(true); setPublicUse(publicUse); setDescription(new EntityModel<String>()); getNetwork().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { Network network = getNetwork().getSelectedItem(); boolean portMirroringAllowed = network == null || !network.isExternal(); if (!portMirroringAllowed) { getPortMirroring().setEntity(false); getPortMirroring().setChangeProhibitionReason(ConstantsManager.getInstance() .getConstants() .portMirroringNotSupportedExternalNetworks()); } getPortMirroring().setIsChangeable(portMirroringAllowed); } }); initPassthroughChangeListener(); initCustomPropertySheet(dcCompatibilityVersion); initNetworkQoSList(dcId); initNetworkFilterList(dcCompatibilityVersion); initCommands(); }</code><technical_language>create this, getMigratable().getEntity() return null. I cases this is inited value. I in getMigratable().setEntity(!getProfile().isPassthrough() || getProfile().isMigratable()); fail NPE. Do I miss something? inited here? if works I is a bit fragile inited in cases some value..</technical_language>

Target:
public VnicProfileModel(IModel sourceModel, Version dcCompatibilityVersion, boolean customPropertiesVisible, Guid dcId, Guid defaultQosId) { this.sourceModel = sourceModel; this.customPropertiesVisible = customPropertiesVisible; this.defaultQosId = defaultQosId; setName(new EntityModel<String>()); setNetwork(new ListModel<Network>()); setNetworkQoS(new ListModel<NetworkQoS>()); setNetworkFilter(new ListModel<NetworkFilter>()); setPortMirroring(new EntityModel<Boolean>()); setPassthrough(new EntityModel<Boolean>(false)); setMigratable(new EntityModel<Boolean>(false)); setCustomPropertySheet(new KeyValueModel()); EntityModel<Boolean> publicUse = new EntityModel<>(); publicUse.setEntity(true); setPublicUse(publicUse); setDescription(new EntityModel<String>()); getNetwork().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { Network network = getNetwork().getSelectedItem(); boolean portMirroringAllowed = network == null || !network.isExternal(); if (!portMirroringAllowed) { getPortMirroring().setEntity(false); getPortMirroring().setChangeProhibitionReason(ConstantsManager.getInstance() .getConstants() .portMirroringNotSupportedExternalNetworks()); } getPortMirroring().setIsChangeable(portMirroringAllowed); } }); initPassthroughChangeListener(); initCustomPropertySheet(dcCompatibilityVersion); initNetworkQoSList(dcId); initNetworkFilterList(dcCompatibilityVersion); initCommands(); }