X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fbinding%2Fimpl%2FOptionalBindingDefault.java;h=232960c6e18572104c4e7c684c674d9e85c53d38;hb=refs%2Fchanges%2F38%2F238%2F2;hp=8af15ff3c6e25365a4faa8c6229b08bb4e68d2e2;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/OptionalBindingDefault.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/OptionalBindingDefault.java index 8af15ff3c..232960c6e 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/OptionalBindingDefault.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/impl/OptionalBindingDefault.java @@ -1,21 +1,21 @@ -/******************************************************************************* - * Copyright (c) 2010 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ +/******************************************************************************* + * Copyright (c) 2010 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ package org.simantics.databoard.binding.impl; -import org.simantics.databoard.binding.Binding; -import org.simantics.databoard.binding.OptionalBinding; -import org.simantics.databoard.binding.error.BindingException; -import org.simantics.databoard.binding.error.UnsupportedOperationException; -import org.simantics.databoard.type.OptionalType; +import org.simantics.databoard.binding.Binding; +import org.simantics.databoard.binding.OptionalBinding; +import org.simantics.databoard.binding.error.BindingException; +import org.simantics.databoard.binding.error.UnsupportedOperationException; +import org.simantics.databoard.type.OptionalType; /** * This implementation binds OptionalType to null / Object assignment. @@ -79,14 +79,14 @@ public class OptionalBindingDefault extends OptionalBinding { } public void setValue(Object optional, Object componentValue) - throws BindingException { + throws BindingException { if (componentValue==optional) return; throw new UnsupportedOperationException("Cannot set new value to container of java.lang.Object"); } public void setNoValue(Object optional) throws BindingException - { + { if (optional==null) return; throw new UnsupportedOperationException("Cannot remove value from container of java.lang.Object"); }