From c2880669216f93ad1c709e3e261991bea2999a50 Mon Sep 17 00:00:00 2001 From: Tibor Sirovatka Date: Mon, 9 May 2016 16:41:31 +0200 Subject: JVPP - null checks changed to Objects.requireNonNull usage Review changes incorporated Change-Id: Ia04b62144a0d3643095b518db538c7eb5137c048 Signed-off-by: Tibor Sirovatka --- vpp-api/java/jvpp/gen/jvpp_callback_facade_gen.py | 5 +---- vpp-api/java/jvpp/gen/jvpp_impl_gen.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'vpp-api/java/jvpp/gen') diff --git a/vpp-api/java/jvpp/gen/jvpp_callback_facade_gen.py b/vpp-api/java/jvpp/gen/jvpp_callback_facade_gen.py index 7b8723bf87c..de239b6d1a3 100644 --- a/vpp-api/java/jvpp/gen/jvpp_callback_facade_gen.py +++ b/vpp-api/java/jvpp/gen/jvpp_callback_facade_gen.py @@ -53,10 +53,7 @@ public final class CallbackJVppFacade implements $base_package.$callback_facade_ public CallbackJVppFacade(final $base_package.JVpp jvpp, java.util.Map callbacks) { - if(jvpp == null) { - throw new java.lang.NullPointerException("jvpp is null"); - } - this.jvpp = jvpp; + this.jvpp = java.util.Objects.requireNonNull(jvpp,"jvpp is null"); this.callbacks = callbacks; } diff --git a/vpp-api/java/jvpp/gen/jvpp_impl_gen.py b/vpp-api/java/jvpp/gen/jvpp_impl_gen.py index 08ebddfcf97..4e2625714a9 100644 --- a/vpp-api/java/jvpp/gen/jvpp_impl_gen.py +++ b/vpp-api/java/jvpp/gen/jvpp_impl_gen.py @@ -52,10 +52,7 @@ public final class JVppImpl implements $base_package.JVpp { private final $base_package.VppConnection connection; public JVppImpl(final $base_package.VppConnection connection) { - if(connection == null) { - throw new java.lang.NullPointerException("Connection is null"); - } - this.connection = connection; + this.connection = java.util.Objects.requireNonNull(connection,"Connection is null"); } @Override -- cgit 1.2.3-korg