DATACMNS-874 - Fix Scala Option unwrapping.
We now correctly unwrap empty Scala Options so the unwrapping no longer fails. Original pull request: #165.
This commit is contained in:
committed by
Oliver Gierke
parent
c787073357
commit
20653a7ebc
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,6 +37,7 @@ import com.google.common.base.Optional;
|
||||
* Unit tests for {@link QueryExecutionConverters}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class QueryExecutionConvertersUnitTests {
|
||||
|
||||
@@ -163,4 +164,12 @@ public class QueryExecutionConvertersUnitTests {
|
||||
public void unwrapsScalaOption() {
|
||||
assertThat(QueryExecutionConverters.unwrap(Option.apply("foo")), is((Object) "foo"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-874
|
||||
*/
|
||||
@Test
|
||||
public void unwrapsEmptyScalaOption() {
|
||||
assertThat(QueryExecutionConverters.unwrap(Option.empty()), is((Object) null));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user