mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
Use @NonNullApi to explicitly reflect non-null return types and params by default
This commit is contained in:
1 parent
92a13ad265
commit
b3ee982b64
40 files changed
+200
-235
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package io.ebeaninternal.api;
|
||||
|
||||
import io.avaje.lang.NonNullApi;
|
||||
import io.ebean.*;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.annotation.TxIsolation;
|
||||
@@ -37,6 +38,7 @@ import java.util.stream.Stream;
|
||||
/**
|
||||
* Test double for SpiEbeanServer.
|
||||
*/
|
||||
@NonNullApi
|
||||
public class TDSpiEbeanServer extends TDSpiServer implements SpiEbeanServer {
|
||||
|
||||
String name;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.ebeaninternal.api;
|
||||
|
||||
import io.avaje.lang.NonNullApi;
|
||||
import io.ebean.*;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.annotation.TxIsolation;
|
||||
@@ -25,6 +26,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
@NonNullApi
|
||||
public class TDSpiServer implements SpiServer {
|
||||
@Override
|
||||
public void shutdown() {
|
||||
|
||||
+3
-1
@@ -15,6 +15,7 @@ import io.ebeaninternal.server.transaction.RemoteTransactionEvent;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Customer;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@@ -99,8 +100,9 @@ public class BinaryTransactionEventReadWriteTest extends BaseTestCase {
|
||||
}
|
||||
|
||||
class TDEbeanServer extends TDSpiEbeanServer {
|
||||
@Nonnull
|
||||
@Override
|
||||
public BeanDescriptor<?> descriptorById(String descriptorId) {
|
||||
public BeanDescriptor<?> descriptorById(@Nonnull String descriptorId) {
|
||||
return customerBeanDescriptor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user