[Libreoffice-commits] core.git: connectivity/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Mon Apr 18 15:57:13 UTC 2016
connectivity/source/drivers/jdbc/JConnection.cxx | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
New commits:
commit 385c265065d21170466bfcd001c9cb22cd93b53d
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Mon Apr 18 08:53:36 2016 +0000
cppcheck: silence known condition warning in connectivity
Change-Id: Ic1e1b2f7aeb6d4c0a2f59f298df125c12a75b081
Reviewed-on: https://gerrit.libreoffice.org/24197
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 2ecd3ca1..10d97a6 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -810,14 +810,10 @@ bool java_sql_Connection::construct(const OUString& url,
if ( t.pEnv && m_Driver_theClass && m_pDriverobject )
{
// Java-Call
- jmethodID mID = nullptr;
- if ( !mID )
- {
- // initialize temporary Variable
- static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;";
- static const char * cMethodName = "connect";
- mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature );
- }
+ static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;";
+ static const char * cMethodName = "connect";
+ jmethodID mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature );
+
if ( mID )
{
jvalue args[2];
More information about the Libreoffice-commits
mailing list