DATACMNS-1141 - Polishing.

Remove superfluous null checks in places where state cannot be null. Add nullable annotations to nullable variables. Remove whitespaces.
This commit is contained in:
Mark Paluch
2017-08-28 13:15:36 +02:00
parent 0669632a61
commit 67f52d5d70
5 changed files with 47 additions and 44 deletions

View File

@@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mapping;
import org.springframework.lang.Nullable;
/**
* Value object to capture {@link Association}s.
*
@@ -26,7 +27,7 @@ package org.springframework.data.mapping;
public class Association<P extends PersistentProperty<P>> {
private final P inverse;
private final P obverse;
private final @Nullable P obverse;
/**
* Creates a new {@link Association} between the two given {@link PersistentProperty}s.
@@ -34,7 +35,7 @@ public class Association<P extends PersistentProperty<P>> {
* @param inverse
* @param obverse
*/
public Association(P inverse, P obverse) {
public Association(P inverse, @Nullable P obverse) {
this.inverse = inverse;
this.obverse = obverse;
}
@@ -43,6 +44,7 @@ public class Association<P extends PersistentProperty<P>> {
return inverse;
}
@Nullable
public P getObverse() {
return obverse;
}