diff options
Diffstat (limited to 'connectivity/source/drivers/jdbc')
28 files changed, 543 insertions, 543 deletions
diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx index 6a75a0bb9c7e..07c9668c0a36 100644 --- a/connectivity/source/drivers/jdbc/Array.cxx +++ b/connectivity/source/drivers/jdbc/Array.cxx @@ -26,7 +26,7 @@ using namespace connectivity; //************ Class: java.sql.Array -jclass java_sql_Array::theClass = 0; +jclass java_sql_Array::theClass = nullptr; java_sql_Array::~java_sql_Array() {} @@ -42,13 +42,13 @@ jclass java_sql_Array::getMyClass() const OUString SAL_CALL java_sql_Array::getBaseTypeName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getBaseTypeName",mID); } sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowSQL("getBaseType", mID); } @@ -59,7 +59,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap); static const char * cSignature = "(Ljava/util/Map;)[Ljava/lang/Object;"; static const char * cMethodName = "getArray"; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); // submit Java-Call t.pEnv->CallObjectMethod( object, mID, obj); @@ -78,7 +78,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: static const char * cSignature = "(IILjava/util/Map;)[Ljava/lang/Object;"; static const char * cMethodName = "getArray"; // submit Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); t.pEnv->CallObjectMethod( object, mID, index,count,obj); ThrowSQLException(t.pEnv,*this); @@ -98,14 +98,14 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;"; static const char * cMethodName = "getResultSet"; // submit Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); t.pEnv->CallObjectMethod( object, mID, obj); ThrowSQLException(t.pEnv,*this); // and cleanup t.pEnv->DeleteLocalRef(obj); } - return NULL; + return nullptr; } ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Array::getResultSetAtIndex( sal_Int32 index, sal_Int32 count, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) @@ -118,14 +118,14 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;"; static const char * cMethodName = "getResultSetAtIndex"; // submit Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); t.pEnv->CallObjectMethod( object, mID, index,count,obj); ThrowSQLException(t.pEnv,*this); // and cleanup t.pEnv->DeleteLocalRef(obj); } - return NULL; + return nullptr; } diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx index 43db9c1f3eb1..a22092553e20 100644 --- a/connectivity/source/drivers/jdbc/Blob.cxx +++ b/connectivity/source/drivers/jdbc/Blob.cxx @@ -29,7 +29,7 @@ using namespace connectivity; //************ Class: java.sql.Blob -jclass java_sql_Blob::theClass = 0; +jclass java_sql_Blob::theClass = nullptr; java_sql_Blob::java_sql_Blob( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ) { @@ -58,7 +58,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx static const char * cSignature = "()J"; static const char * cMethodName = "length"; // submit Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallLongMethod( object, mID ); ThrowSQLException(t.pEnv,*this); @@ -75,7 +75,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx static const char * cSignature = "(JI)[B"; static const char * cMethodName = "getBytes"; // submit Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jbyteArray out = static_cast<jbyteArray>(t.pEnv->CallObjectMethod( object, mID,pos,count)); ThrowSQLException(t.pEnv,*this); @@ -94,10 +94,10 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Blob::getBinaryStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getBinaryStream","()Ljava/io/InputStream;", mID); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_io_InputStream( t.pEnv, out ); + return out==nullptr ? nullptr : new java_io_InputStream( t.pEnv, out ); } sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequence< sal_Int8 >& pattern, sal_Int64 start ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) @@ -110,7 +110,7 @@ sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequenc static const char * cSignature = "([BI)J"; static const char * cMethodName = "position"; // submit Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); // convert Parameter jbyteArray pByteArray = t.pEnv->NewByteArray(pattern.getLength()); diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx index ef82e3416616..38b6342bd7fd 100644 --- a/connectivity/source/drivers/jdbc/Boolean.cxx +++ b/connectivity/source/drivers/jdbc/Boolean.cxx @@ -23,7 +23,7 @@ using namespace connectivity; //************ Class: java.lang.Boolean -jclass java_lang_Boolean::theClass = 0; +jclass java_lang_Boolean::theClass = nullptr; java_lang_Boolean::~java_lang_Boolean() {} diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index 2a086ab003ea..ce872fc5dfd1 100644 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx @@ -72,7 +72,7 @@ sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( ) throw(css::sdbc::SQLEx { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "wasNull", mID ); } @@ -80,14 +80,14 @@ sal_Bool SAL_CALL java_sql_CallableStatement::getBoolean( sal_Int32 columnIndex { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex ); } sal_Int8 SAL_CALL java_sql_CallableStatement::getByte( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod; return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex); } @@ -99,7 +99,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 co SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jbyteArray out = static_cast<jbyteArray>(callObjectMethodWithIntArg(t.pEnv,"getBytes","(I)[B", mID, columnIndex)); if (out) { @@ -114,7 +114,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 co { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex); return out ? static_cast <com::sun::star::util::Date>(java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date(); } @@ -122,7 +122,7 @@ double SAL_CALL java_sql_CallableStatement::getDouble( sal_Int32 columnIndex ) t { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); double (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod; return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex); } @@ -131,7 +131,7 @@ float SAL_CALL java_sql_CallableStatement::getFloat( sal_Int32 columnIndex ) thr { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod; return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex); } @@ -140,7 +140,7 @@ sal_Int32 SAL_CALL java_sql_CallableStatement::getInt( sal_Int32 columnIndex ) t { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("getInt",mID,columnIndex); } @@ -148,7 +148,7 @@ sal_Int64 SAL_CALL java_sql_CallableStatement::getLong( sal_Int32 columnIndex ) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod; return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex); } @@ -157,7 +157,7 @@ Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer return Any(); @@ -167,7 +167,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod; return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex); } @@ -178,7 +178,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex ) checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getString",mID,columnIndex); } @@ -186,7 +186,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex ) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time(); @@ -196,7 +196,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex ) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime(); @@ -215,7 +215,7 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame static const char * cSignature = "(IILjava/lang/String;)V"; static const char * cMethodName = "registerOutParameter"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); // Convert Parameter jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,typeName)); @@ -235,14 +235,14 @@ void SAL_CALL java_sql_CallableStatement::registerNumericOutParameter( sal_Int32 static const char * cSignature = "(III)V"; static const char * cMethodName = "registerOutParameter"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,scale); ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } } -jclass java_sql_CallableStatement::theClass = 0; +jclass java_sql_CallableStatement::theClass = nullptr; jclass java_sql_CallableStatement::getMyClass() const { @@ -267,39 +267,39 @@ Reference< css::sdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sa { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Array( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Array( t.pEnv, out ); } Reference< css::sdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Clob( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Clob( t.pEnv, out ); } Reference< css::sdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Blob( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Blob( t.pEnv, out ); } Reference< css::sdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Ref( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Ref( t.pEnv, out ); } void SAL_CALL java_sql_CallableStatement::acquire() throw() @@ -323,11 +323,11 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/) // initialize temporary variable static const char * cMethodName = "prepareCall"; // execute Java-Call - jobject out = NULL; + jobject out = nullptr; // convert Parameter jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,m_sSqlStatement)); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/CallableStatement;"; diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx index 0a2753b36a7f..27daf652115c 100644 --- a/connectivity/source/drivers/jdbc/Class.cxx +++ b/connectivity/source/drivers/jdbc/Class.cxx @@ -26,7 +26,7 @@ using namespace connectivity; //************ Class: java.lang.Class -jclass java_lang_Class::theClass = 0; +jclass java_lang_Class::theClass = nullptr; java_lang_Class::~java_lang_Class() {} @@ -41,23 +41,23 @@ jclass java_lang_Class::getMyClass() const java_lang_Class * java_lang_Class::forName( const OUString& _par0 ) { - jobject out(NULL); + jobject out(nullptr); SDBThreadAttach t; { OString sClassName = OUStringToOString(_par0, RTL_TEXTENCODING_JAVA_UTF8); sClassName = sClassName.replace('.','/'); out = t.pEnv->FindClass(sClassName.getStr()); - ThrowSQLException(t.pEnv,0); + ThrowSQLException(t.pEnv,nullptr); } //t.pEnv // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? NULL : new java_lang_Class( t.pEnv, out ); + return out==nullptr ? nullptr : new java_lang_Class( t.pEnv, out ); } jobject java_lang_Class::newInstanceObject() { SDBThreadAttach t; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callObjectMethod(t.pEnv,"newInstance","()Ljava/lang/Object;", mID); } diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx index cba4cf68cfe3..afa79124ce2b 100644 --- a/connectivity/source/drivers/jdbc/Clob.cxx +++ b/connectivity/source/drivers/jdbc/Clob.cxx @@ -27,7 +27,7 @@ using namespace connectivity; //************ Class: java.sql.Clob -jclass java_sql_Clob::theClass = 0; +jclass java_sql_Clob::theClass = nullptr; java_sql_Clob::java_sql_Clob( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ) @@ -57,7 +57,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx static const char * cSignature = "()J"; static const char * cMethodName = "length"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallLongMethod( object, mID ); ThrowSQLException(t.pEnv,*this); @@ -74,7 +74,7 @@ OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 subStrin static const char * cSignature = "(JI)Ljava/lang/String;"; static const char * cMethodName = "getSubString"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jstring out = static_cast<jstring>(t.pEnv->CallObjectMethod( object, mID,pos,subStringLength)); ThrowSQLException(t.pEnv,*this); @@ -87,11 +87,11 @@ OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 subStrin ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Clob::getCharacterStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { SDBThreadAttach t; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getCharacterStream","()Ljava/io/Reader;", mID); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_io_Reader( t.pEnv, out ); + return out==nullptr ? nullptr : new java_io_Reader( t.pEnv, out ); } sal_Int64 SAL_CALL java_sql_Clob::position( const OUString& searchstr, sal_Int32 start ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) @@ -107,7 +107,7 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const OUString& searchstr, sal_Int32 static const char * cSignature = "(Ljava/lang/String;I)J"; static const char * cMethodName = "position"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallLongMethod( object, mID, args[0].l,start ); ThrowSQLException(t.pEnv,*this); diff --git a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx index 240d78e0a2ab..39cdafc2d328 100644 --- a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx +++ b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx @@ -35,7 +35,7 @@ namespace connectivity { namespace jdbc :m_environment( environment ) ,m_currentThread( environment ) ,m_oldContextClassLoader( environment ) - ,m_setContextClassLoaderMethod( NULL ) + ,m_setContextClassLoaderMethod( nullptr ) { if ( !newClassLoader.is() ) return; @@ -50,7 +50,7 @@ namespace connectivity { namespace jdbc jmethodID currentThreadMethod( m_environment.GetStaticMethodID( threadClass.get(), "currentThread", "()Ljava/lang/Thread;" ) ); - if ( currentThreadMethod == NULL ) + if ( currentThreadMethod == nullptr ) break; m_currentThread.set( m_environment.CallStaticObjectMethod( threadClass.get(), currentThreadMethod ) ); @@ -59,7 +59,7 @@ namespace connectivity { namespace jdbc jmethodID getContextClassLoaderMethod( m_environment.GetMethodID( threadClass.get(), "getContextClassLoader", "()Ljava/lang/ClassLoader;" ) ); - if ( getContextClassLoaderMethod == NULL ) + if ( getContextClassLoaderMethod == nullptr ) break; m_oldContextClassLoader.set( m_environment.CallObjectMethod( m_currentThread.get(), getContextClassLoaderMethod ) ); LocalRef< jthrowable > throwable( m_environment, m_environment.ExceptionOccurred() ); @@ -68,7 +68,7 @@ namespace connectivity { namespace jdbc m_setContextClassLoaderMethod = m_environment.GetMethodID( threadClass.get(), "setContextClassLoader", "(Ljava/lang/ClassLoader;)V" ); - if ( m_setContextClassLoaderMethod == NULL ) + if ( m_setContextClassLoaderMethod == nullptr ) break; } @@ -86,7 +86,7 @@ namespace connectivity { namespace jdbc if ( throwable.is() ) { m_currentThread.reset(); - m_setContextClassLoaderMethod = NULL; + m_setContextClassLoaderMethod = nullptr; java_lang_Object::ThrowLoggedSQLException( _rLoggerForErrors, &environment, _rxErrorContext ); } } @@ -98,7 +98,7 @@ namespace connectivity { namespace jdbc { LocalRef< jobject > currentThread( m_currentThread.env(), m_currentThread.release() ); jmethodID setContextClassLoaderMethod( m_setContextClassLoaderMethod ); - m_setContextClassLoaderMethod = NULL; + m_setContextClassLoaderMethod = nullptr; m_environment.CallObjectMethod( currentThread.get(), setContextClassLoaderMethod, m_oldContextClassLoader.get() ); if ( clearExceptions ) diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index e24a18acfe11..f010ab9179e8 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -jclass java_sql_DatabaseMetaData::theClass = 0; +jclass java_sql_DatabaseMetaData::theClass = nullptr; java_sql_DatabaseMetaData::~java_sql_DatabaseMetaData() { @@ -65,39 +65,39 @@ java_sql_DatabaseMetaData::java_sql_DatabaseMetaData( JNIEnv * pEnv, jobject myO Reference< XResultSet > java_sql_DatabaseMetaData::impl_getTypeInfo_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethod( "getTypeInfo", mID ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethod( "getCatalogs", mID ); } OUString java_sql_DatabaseMetaData::impl_getCatalogSeparator_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getCatalogSeparator", mID ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethod( "getSchemas", mID ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumnPrivileges( const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getColumnPrivileges", mID, catalog, schema, table, &columnNamePattern ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumns( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getColumns", mID, catalog, schemaPattern, tableNamePattern, &columnNamePattern ); } @@ -109,22 +109,22 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName ); - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Ljava/sql/ResultSet;"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); OSL_VERIFY( !isExceptionOccurred(t.pEnv, true) ); jvalue args[4]; - args[3].l = 0; + args[3].l = nullptr; sal_Int32 typeFilterCount = _types.getLength(); if ( typeFilterCount ) { - jobjectArray pObjArray = static_cast< jobjectArray >( t.pEnv->NewObjectArray( (jsize)typeFilterCount, java_lang_String::st_getMyClass(), 0 ) ); + jobjectArray pObjArray = static_cast< jobjectArray >( t.pEnv->NewObjectArray( (jsize)typeFilterCount, java_lang_String::st_getMyClass(), nullptr ) ); OSL_VERIFY( !isExceptionOccurred( t.pEnv, true ) ); const OUString* typeFilter = _types.getConstArray(); bool bIncludeAllTypes = false; @@ -163,8 +163,8 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( else aSchemaFilter <<= schemaPattern; - args[0].l = aCatalogFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aCatalogFilter ) ) : NULL; - args[1].l = aSchemaFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aSchemaFilter ) ) : NULL; + args[0].l = aCatalogFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aCatalogFilter ) ) : nullptr; + args[1].l = aSchemaFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aSchemaFilter ) ) : nullptr; args[2].l = convertwchar_tToJavaString(t.pEnv,tableNamePattern); out = t.pEnv->CallObjectMethod( object, mID, args[0].l, args[1].l,args[2].l,args[3].l); jthrowable jThrow = t.pEnv->ExceptionOccurred(); @@ -210,7 +210,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( } if ( !out ) - return NULL; + return nullptr; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); @@ -219,114 +219,114 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getProcedureColumns( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getProcedureColumns", mID, catalog, schemaPattern, procedureNamePattern, &columnNamePattern ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getProcedures( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getProcedures", mID, catalog, schemaPattern, procedureNamePattern ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getVersionColumns( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getVersionColumns", mID, catalog, schema, table ); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxBinaryLiteralLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxRowSize", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxCatalogNameLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxCharLiteralLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxColumnNameLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxColumnsInIndex", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxCursorNameLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxConnections", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxColumnsInTable", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxStatementLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxTableNameLength", mID); } sal_Int32 java_sql_DatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxTablesInSelect", mID); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getExportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getExportedKeys", mID, catalog, schema, table ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getImportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getImportedKeys", mID, catalog, schema, table ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getPrimaryKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethodWithStrings( "getPrimaryKeys", mID, catalog, schema, table ); } @@ -338,18 +338,18 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo( m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName ); - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)Ljava/sql/ResultSet;"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jvalue args[5]; // convert Parameter - args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0; - args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema); + args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : nullptr; + args[1].l = schema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,schema); args[2].l = convertwchar_tToJavaString(t.pEnv,table); args[3].z = unique; args[4].z = approximate; @@ -365,7 +365,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo( ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } if ( !out ) - return NULL; + return nullptr; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); @@ -379,18 +379,18 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName ); - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Ljava/sql/ResultSet;"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jvalue args[3]; // convert Parameter - args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0; - args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema); + args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : nullptr; + args[1].l = schema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,schema); args[2].l = convertwchar_tToJavaString(t.pEnv,table); out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[1].l,args[2].l,scope,nullable); @@ -405,7 +405,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier } if ( !out ) - return NULL; + return nullptr; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); @@ -417,7 +417,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges( if ( m_pConnection->isIgnoreDriverPrivilegesEnabled() ) return new OResultSetPrivileges(this,catalog,schemaPattern,tableNamePattern); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); Reference< XResultSet > xReturn( impl_callResultSetMethodWithStrings( "getTablePrivileges", mID, catalog, schemaPattern, tableNamePattern ) ); if ( xReturn.is() ) @@ -495,20 +495,20 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference( static const char * cMethodName = "getCrossReference"; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName ); - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jvalue args[6]; // convert Parameter - args[0].l = primaryCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(primaryCatalog)) : 0; - args[1].l = primarySchema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,primarySchema); + args[0].l = primaryCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(primaryCatalog)) : nullptr; + args[1].l = primarySchema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,primarySchema); args[2].l = convertwchar_tToJavaString(t.pEnv,primaryTable); - args[3].l = foreignCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(foreignCatalog)) : 0; - args[4].l = foreignSchema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,foreignSchema); + args[3].l = foreignCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(foreignCatalog)) : nullptr; + args[4].l = foreignSchema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,foreignSchema); args[5].l = convertwchar_tToJavaString(t.pEnv,foreignTable); out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[2].l,args[2].l,args[3].l,args[4].l,args[5].l ); @@ -529,7 +529,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference( } if ( !out ) - return NULL; + return nullptr; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); @@ -619,7 +619,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD_ARG3, _pMethodName, sCatalogLog, sSchemaLog, _rLeastPattern ); } - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings: no Java environment anymore!" ); @@ -636,10 +636,10 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS { jvalue args[4]; // convert parameters - args[0].l = bCatalog ? convertwchar_tToJavaString( t.pEnv, sCatalog ) : NULL; - args[1].l = bSchema ? convertwchar_tToJavaString( t.pEnv, _rSchemaPattern ) : NULL; + args[0].l = bCatalog ? convertwchar_tToJavaString( t.pEnv, sCatalog ) : nullptr; + args[1].l = bSchema ? convertwchar_tToJavaString( t.pEnv, _rSchemaPattern ) : nullptr; args[2].l = convertwchar_tToJavaString( t.pEnv, _rLeastPattern ); - args[3].l = _pOptionalAdditionalString ? convertwchar_tToJavaString( t.pEnv, *_pOptionalAdditionalString ) : NULL; + args[3].l = _pOptionalAdditionalString ? convertwchar_tToJavaString( t.pEnv, *_pOptionalAdditionalString ) : nullptr; // actually do the call if ( _pOptionalAdditionalString ) @@ -662,7 +662,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS } if ( !out ) - return NULL; + return nullptr; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, _pMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); @@ -671,320 +671,320 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS sal_Bool SAL_CALL java_sql_DatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "doesMaxRowSizeIncludeBlobs", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "storesLowerCaseQuotedIdentifiers", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "storesLowerCaseIdentifiers", mID ); } bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "storesMixedCaseQuotedIdentifiers", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "storesMixedCaseIdentifiers", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "storesUpperCaseQuotedIdentifiers", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "storesUpperCaseIdentifiers", mID ); } bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsAlterTableWithAddColumn", mID ); } bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsAlterTableWithDropColumn", mID ); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxIndexLength", mID); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsNonNullableColumns", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getCatalogTerm", mID ); } OUString java_sql_DatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getIdentifierQuoteString", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getExtraNameCharacters", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsDifferentTableCorrelationNames", mID ); } bool java_sql_DatabaseMetaData::impl_isCatalogAtStart_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "isCatalogAtStart", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "dataDefinitionIgnoredInTransactions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "dataDefinitionCausesTransactionCommit", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsDataManipulationTransactionsOnly", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsDataDefinitionAndDataManipulationTransactions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsPositionedDelete", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsPositionedUpdate", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsOpenStatementsAcrossRollback", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsOpenStatementsAcrossCommit", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsOpenCursorsAcrossCommit", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsOpenCursorsAcrossRollback", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "supportsTransactionIsolationLevel", mID, level ); } bool java_sql_DatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSchemasInDataManipulation", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsANSI92FullSQL", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsANSI92EntryLevelSQL", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsIntegrityEnhancementFacility", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSchemasInIndexDefinitions", mID ); } bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSchemasInTableDefinitions", mID ); } bool java_sql_DatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCatalogsInTableDefinitions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCatalogsInIndexDefinitions", mID ); } bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCatalogsInDataManipulation", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsOuterJoins", mID ); } Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callResultSetMethod( "getTableTypes", mID ); } sal_Int32 java_sql_DatabaseMetaData::impl_getMaxStatements_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxStatements", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxProcedureNameLength", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxSchemaNameLength", mID); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsTransactions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "allProceduresAreCallable", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsStoredProcedures", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSelectForUpdate", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "allTablesAreSelectable", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "isReadOnly", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "usesLocalFiles", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "usesLocalFilePerTable", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsTypeConversion", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "nullPlusNonNullIsNull", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsColumnAliasing", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsTableCorrelationNames", mID ); } @@ -997,7 +997,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType SDBThreadAttach t; { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, pMethodName,"(II)Z", mID); out = t.pEnv->CallBooleanMethod( object, mID, fromType, toType ); ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); @@ -1009,157 +1009,157 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsExpressionsInOrderBy", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsGroupBy", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsGroupByBeyondSelect", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsGroupByUnrelated", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsMultipleTransactions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsMultipleResultSets", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsLikeEscapeClause", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsOrderByUnrelated", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsUnion", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsUnionAll", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsMixedCaseIdentifiers", mID ); } bool java_sql_DatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsMixedCaseQuotedIdentifiers", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "nullsAreSortedAtEnd", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "nullsAreSortedAtStart", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "nullsAreSortedHigh", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "nullsAreSortedLow", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSchemasInProcedureCalls", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSchemasInPrivilegeDefinitions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCatalogsInProcedureCalls", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCatalogsInPrivilegeDefinitions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCorrelatedSubqueries", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSubqueriesInComparisons", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSubqueriesInExists", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSubqueriesInIns", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsSubqueriesInQuantifieds", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsANSI92IntermediateSQL", mID ); } @@ -1168,7 +1168,7 @@ OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException, Runt OUString sURL = m_pConnection->getURL(); if ( sURL.isEmpty() ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); sURL = impl_callStringMethod( "getURL", mID ); } return sURL; @@ -1176,157 +1176,157 @@ OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException, Runt OUString SAL_CALL java_sql_DatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getUserName", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getDriverName", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getDriverVersion", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getDatabaseProductVersion", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getDatabaseProductName", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getProcedureTerm", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getSchemaTerm", mID ); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowRuntime("getDriverMajorVersion", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getDefaultTransactionIsolation", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowRuntime("getDriverMinorVersion", mID); } OUString SAL_CALL java_sql_DatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getSQLKeywords", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getSearchStringEscape", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getStringFunctions", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getTimeDateFunctions", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getSystemFunctions", mID ); } OUString SAL_CALL java_sql_DatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callStringMethod( "getNumericFunctions", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsExtendedSQLGrammar", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsCoreSQLGrammar", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsMinimumSQLGrammar", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsFullOuterJoins", mID ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsLimitedOuterJoins", mID ); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxColumnsInGroupBy", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxColumnsInOrderBy", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxColumnsInSelect", mID); } sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callIntMethod_ThrowSQL("getMaxUserNameLength", mID); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "supportsResultSetType", mID, setType ); } @@ -1339,7 +1339,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I SDBThreadAttach t; { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, pMethodName,"(II)Z", mID); out = t.pEnv->CallBooleanMethod( object, mID, setType, concurrency); ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); @@ -1351,61 +1351,61 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "ownUpdatesAreVisible", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "ownDeletesAreVisible", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "ownInsertsAreVisible", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "othersUpdatesAreVisible", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "othersDeletesAreVisible", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "othersInsertsAreVisible", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "updatesAreDetected", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "deletesAreDetected", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethodWithIntArg( "insertsAreDetected", mID, setType ); } sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_callBooleanMethod( "supportsBatchUpdates", mID ); } @@ -1413,7 +1413,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs( const Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException, std::exception) { - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { @@ -1421,13 +1421,13 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs( static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I)Ljava/sql/ResultSet;"; static const char * cMethodName = "getUDTs"; // dismiss Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); { jvalue args[4]; // initialize temporary Variable - args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0; - args[1].l = schemaPattern.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schemaPattern); + args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : nullptr; + args[1].l = schemaPattern.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,schemaPattern); args[2].l = convertwchar_tToJavaString(t.pEnv,typeNamePattern); jintArray pArray = t.pEnv->NewIntArray(types.getLength()); jint * typesData = reinterpret_cast<jint *>( @@ -1455,7 +1455,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs( } } - return out ? new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection ) : 0; + return out ? new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection ) : nullptr; } diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx index c07b01e38d59..f2f19db3cd3b 100644 --- a/connectivity/source/drivers/jdbc/Date.cxx +++ b/connectivity/source/drivers/jdbc/Date.cxx @@ -25,7 +25,7 @@ using namespace connectivity; //************ Class: java.util.Date -jclass java_util_Date::theClass = 0; +jclass java_util_Date::theClass = nullptr; java_util_Date::~java_util_Date() {} diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx index 07b49af2af75..16d46f5efcc4 100644 --- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx +++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::lang; //************ Class: java.sql.Driver -jclass java_sql_DriverPropertyInfo::theClass = 0; +jclass java_sql_DriverPropertyInfo::theClass = nullptr; java_sql_DriverPropertyInfo::~java_sql_DriverPropertyInfo() {} @@ -120,8 +120,8 @@ Sequence< OUString> java_sql_DriverPropertyInfo::choices() jfieldID id = t.pEnv->GetFieldID(getMyClass(),"choices","[Ljava/lang/String;"); if(id) { - const java_lang_String * pEmpty = NULL; - const OUString * pEmpty2 = NULL; + const java_lang_String * pEmpty = nullptr; + const OUString * pEmpty2 = nullptr; return copyArrayAndDelete(t.pEnv, static_cast<jobjectArray>(t.pEnv->GetObjectField( object, id)), pEmpty2, pEmpty); } } //t.pEnv diff --git a/connectivity/source/drivers/jdbc/Exception.cxx b/connectivity/source/drivers/jdbc/Exception.cxx index 15999a1a45cd..9789beb8783d 100644 --- a/connectivity/source/drivers/jdbc/Exception.cxx +++ b/connectivity/source/drivers/jdbc/Exception.cxx @@ -23,7 +23,7 @@ using namespace connectivity; //************ Class: java.lang.Exception -jclass java_lang_Exception::theClass = 0; +jclass java_lang_Exception::theClass = nullptr; java_lang_Exception::~java_lang_Exception() {} diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx index 0443bcd67477..2ca356cc8d78 100644 --- a/connectivity/source/drivers/jdbc/InputStream.cxx +++ b/connectivity/source/drivers/jdbc/InputStream.cxx @@ -34,7 +34,7 @@ using namespace connectivity; //************ Class: java.io.InputStream -jclass java_io_InputStream::theClass = 0; +jclass java_io_InputStream::theClass = nullptr; java_io_InputStream::java_io_InputStream( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ) { @@ -61,19 +61,19 @@ sal_Int32 SAL_CALL java_io_InputStream::readSomeBytes( ::com::sun::star::uno::Se void SAL_CALL java_io_InputStream::skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callIntMethodWithIntArg_ThrowRuntime("skip",mID,nBytesToSkip); } sal_Int32 SAL_CALL java_io_InputStream::available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowRuntime("available", mID); } void SAL_CALL java_io_InputStream::closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowRuntime("close",mID); } @@ -90,7 +90,7 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen static const char * cSignature = "([BII)I"; static const char * cMethodName = "read"; // execute Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallIntMethod( object, mID, pByteArray, 0, nBytesToRead ); if ( !out ) diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx index 58fd79335f8c..24abdb8789db 100644 --- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx +++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx @@ -25,7 +25,7 @@ using namespace connectivity; //************ Class: java.lang.Boolean -jclass java_math_BigDecimal::theClass = 0; +jclass java_math_BigDecimal::theClass = nullptr; java_math_BigDecimal::~java_math_BigDecimal() {} @@ -38,7 +38,7 @@ jclass java_math_BigDecimal::getMyClass() const return theClass; } -java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_Object( NULL, nullptr ) +java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_Object( nullptr, nullptr ) { SDBThreadAttach t; if( !t.pEnv ) @@ -47,7 +47,7 @@ java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_O // initialize temporary Variable static const char * cSignature = "(Ljava/lang/String;)V"; jobject tempObj; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, "<init>",cSignature, mID); jstring str = convertwchar_tToJavaString(t.pEnv,_par0.replace(',','.')); @@ -55,11 +55,11 @@ java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_O t.pEnv->DeleteLocalRef(str); saveRef( t.pEnv, tempObj ); t.pEnv->DeleteLocalRef( tempObj ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); // and cleanup } -java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( NULL, nullptr ) +java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( nullptr, nullptr ) { SDBThreadAttach t; if( !t.pEnv ) @@ -68,12 +68,12 @@ java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Obj // initialize temporary Variable static const char * cSignature = "(D)V"; jobject tempObj; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, "<init>",cSignature, mID); tempObj = t.pEnv->NewObject( getMyClass(), mID, _par0 ); saveRef( t.pEnv, tempObj ); t.pEnv->DeleteLocalRef( tempObj ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); // and cleanup } diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 59da159314c1..5d86c605d952 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -61,8 +61,8 @@ namespace { struct ClassMapEntry { ClassMapEntry( OUString const & theClassPath, OUString const & theClassName): - classPath(theClassPath), className(theClassName), classLoader(NULL), - classObject(NULL) {} + classPath(theClassPath), className(theClassName), classLoader(nullptr), + classObject(nullptr) {} OUString classPath; OUString className; @@ -96,10 +96,10 @@ bool getLocalFromWeakRef( jweak& _weak, LocalRef< T >& _inout_local ) { return false; } - else if ( _weak != NULL ) + else if ( _weak != nullptr ) { _inout_local.env().DeleteWeakGlobalRef( _weak ); - _weak = NULL; + _weak = nullptr; } } return true; @@ -129,7 +129,7 @@ bool loadClass( OUString const & classPath, OUString const & name, LocalRef< jobject > * classLoaderPtr, LocalRef< jclass > * classPtr) { - OSL_ASSERT(classLoaderPtr != NULL); + OSL_ASSERT(classLoaderPtr != nullptr); // For any jweak entries still present in the map upon destruction, // DeleteWeakGlobalRef is not called (which is a leak): ClassMapData * d = @@ -186,11 +186,11 @@ bool loadClass( if ( !clClass.is() ) return false; - jweak wcloader = NULL; + jweak wcloader = nullptr; if (!cloader.is()) { jmethodID ctorLoader( environment.GetMethodID( clClass.get(), "<init>", "([Ljava/net/URL;)V" ) ); - if (ctorLoader == NULL) + if (ctorLoader == nullptr) return false; LocalRef< jobjectArray > arr( environment ); @@ -205,15 +205,15 @@ bool loadClass( return false; wcloader = environment.NewWeakGlobalRef( cloader.get() ); - if ( wcloader == NULL ) + if ( wcloader == nullptr ) return false; } - jweak wcl = NULL; + jweak wcl = nullptr; if ( !cl.is() ) { jmethodID methLoadClass( environment.GetMethodID( clClass.get(), "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;" ) ); - if ( methLoadClass == NULL ) + if ( methLoadClass == nullptr ) return false; LocalRef< jstring > str( environment ); @@ -228,15 +228,15 @@ bool loadClass( return false; wcl = environment.NewWeakGlobalRef( cl.get() ); - if ( wcl == NULL ) + if ( wcl == nullptr ) return false; } - if ( wcloader != NULL) + if ( wcloader != nullptr) { i->classLoader = wcloader; } - if ( wcl != NULL ) + if ( wcl != nullptr ) { i->classObject = wcl; } @@ -255,16 +255,16 @@ IMPLEMENT_SERVICE_INFO(java_sql_Connection,"com.sun.star.sdbcx.JConnection","com //************ Class: java.sql.Connection -jclass java_sql_Connection::theClass = 0; +jclass java_sql_Connection::theClass = nullptr; java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver ) :java_lang_Object() ,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>(static_cast<cppu::OWeakObject*>(const_cast<java_sql_Driver *>(&_rDriver)), this) ,m_xContext( _rDriver.getContext() ) ,m_pDriver( &_rDriver ) - ,m_pDriverobject(NULL) + ,m_pDriverobject(nullptr) ,m_pDriverClassLoader() - ,m_Driver_theClass(NULL) + ,m_Driver_theClass(nullptr) ,m_aLogger( _rDriver.getLogger() ) ,m_bParameterSubstitution(false) ,m_bIgnoreDriverPrivileges(true) @@ -283,10 +283,10 @@ java_sql_Connection::~java_sql_Connection() { if ( m_pDriverobject ) t.pEnv->DeleteGlobalRef( m_pDriverobject ); - m_pDriverobject = NULL; + m_pDriverobject = nullptr; if ( m_Driver_theClass ) t.pEnv->DeleteGlobalRef( m_Driver_theClass ); - m_Driver_theClass = NULL; + m_Driver_theClass = nullptr; } SDBThreadAttach::releaseRef(); } @@ -308,7 +308,7 @@ void java_sql_Connection::disposing() if ( object ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("close", mID); } } @@ -327,7 +327,7 @@ OUString SAL_CALL java_sql_Connection::getCatalog( ) throw(SQLException, Runtim ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getCatalog",mID); } @@ -341,7 +341,7 @@ Reference< XDatabaseMetaData > SAL_CALL java_sql_Connection::getMetaData( ) thr if(!xMetaData.is()) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/DatabaseMetaData;", mID); if(out) { @@ -360,7 +360,7 @@ void SAL_CALL java_sql_Connection::close( ) throw(SQLException, RuntimeExceptio void SAL_CALL java_sql_Connection::commit( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("commit", mID); } @@ -368,7 +368,7 @@ sal_Bool SAL_CALL java_sql_Connection::isClosed( ) throw(SQLException, RuntimeE { ::osl::MutexGuard aGuard( m_aMutex ); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "isClosed", mID ) && java_sql_Connection_BASE::rBHelper.bDisposed; } @@ -376,37 +376,37 @@ sal_Bool SAL_CALL java_sql_Connection::isReadOnly( ) throw(SQLException, Runtim { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "isReadOnly", mID ); } void SAL_CALL java_sql_Connection::setCatalog( const OUString& catalog ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithStringArg("setCatalog",mID,catalog); } void SAL_CALL java_sql_Connection::rollback( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("rollback", mID); } sal_Bool SAL_CALL java_sql_Connection::getAutoCommit( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "getAutoCommit", mID ); } void SAL_CALL java_sql_Connection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithBoolArg_ThrowSQL("setReadOnly", mID, readOnly); } void SAL_CALL java_sql_Connection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithBoolArg_ThrowSQL("setAutoCommit", mID, autoCommit); } @@ -416,10 +416,10 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL java_sql_Connecti checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callObjectMethod(t.pEnv,"getTypeMap","()Ljava/util/Map;", mID); // WARNING: the caller becomes the owner of the returned pointer - return 0; + return nullptr; } void SAL_CALL java_sql_Connection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception) @@ -436,7 +436,7 @@ sal_Int32 SAL_CALL java_sql_Connection::getTransactionIsolation( ) throw(SQLExc ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowSQL("getTransactionIsolation", mID); } @@ -445,7 +445,7 @@ void SAL_CALL java_sql_Connection::setTransactionIsolation( sal_Int32 level ) th ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowSQL("setTransactionIsolation", mID, level); } @@ -539,7 +539,7 @@ OUString SAL_CALL java_sql_Connection::nativeSQL( const OUString& sql ) throw(SQ static const char * cSignature = "(Ljava/lang/String;)Ljava/lang/String;"; static const char * cMethodName = "nativeSQL"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); // Convert Parameter jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,sql)); @@ -556,7 +556,7 @@ OUString SAL_CALL java_sql_Connection::nativeSQL( const OUString& sql ) throw(SQ void SAL_CALL java_sql_Connection::clearWarnings( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("clearWarnings", mID); } @@ -566,7 +566,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); SDBThreadAttach t; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID); // WARNING: the caller becomes the owner of the returned pointer if( out ) @@ -620,7 +620,7 @@ namespace return true; LocalRef< jclass > systemClass( _rEnv ); - jmethodID nSetPropertyMethodID = 0; + jmethodID nSetPropertyMethodID = nullptr; // retrieve the java.lang.System class systemClass.set( _rEnv.FindClass( "java/lang/System" ) ); if ( systemClass.is() ) @@ -629,7 +629,7 @@ namespace systemClass.get(), "setProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" ); } - if ( nSetPropertyMethodID == 0 ) + if ( nSetPropertyMethodID == nullptr ) return false; for ( const NamedValue* pSystemProp = _rSystemProperties.getConstArray(); @@ -810,7 +810,7 @@ bool java_sql_Connection::construct(const OUString& url, if ( t.pEnv && m_Driver_theClass && m_pDriverobject ) { // Java-Call - jmethodID mID = NULL; + jmethodID mID = nullptr; if ( !mID ) { // initialize temporary Variable @@ -828,7 +828,7 @@ bool java_sql_Connection::construct(const OUString& url, LocalRef< jobject > ensureDelete( t.env(), args[0].l ); - jobject out = NULL; + jobject out = nullptr; // In some cases (e.g., // connectivity/source/drivers/hsqldb/HDriver.cxx:1.24 // l. 249) the JavaDriverClassPath contains multiple jars, @@ -845,7 +845,7 @@ bool java_sql_Connection::construct(const OUString& url, { ContextClassLoaderScope ccl( t.env(), getDriverClassLoader(), getLogger(), *this ); out = t.pEnv->CallObjectMethod( m_pDriverobject, mID, args[0].l,args[1].l ); - delete pProps, pProps = NULL; + delete pProps, pProps = nullptr; ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } @@ -861,7 +861,7 @@ bool java_sql_Connection::construct(const OUString& url, m_aConnectionInfo = info; } //mID } //t.pEnv - return object != NULL; + return object != nullptr; } diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 568a62404f66..c767011ddd0c 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -56,12 +56,12 @@ using namespace ::com::sun::star::lang; //************ Class: java.sql.Statement -jclass java_sql_Statement_Base::theClass = 0; +jclass java_sql_Statement_Base::theClass = nullptr; java_sql_Statement_Base::java_sql_Statement_Base( JNIEnv * pEnv, java_sql_Connection& _rCon ) :java_sql_Statement_BASE(m_aMutex) - ,java_lang_Object( pEnv, NULL ) + ,java_lang_Object( pEnv, nullptr ) ,OPropertySetHelper(java_sql_Statement_BASE::rBHelper) ,m_pConnection( &_rCon ) ,m_aLogger( _rCon.getLogger(), java::sql::ConnectionLog::STATEMENT ) @@ -85,14 +85,14 @@ void SAL_CALL OStatement_BASE2::disposing() if ( object ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("close", mID); } ::comphelper::disposeComponent(m_xGeneratedStatement); if (m_pConnection) m_pConnection->release(); - m_pConnection = NULL; + m_pConnection = nullptr; dispose_ChildImpl(); java_sql_Statement_Base::disposing(); @@ -151,13 +151,13 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( ) ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); // initialize temporary Variable try { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); out = callResultSetMethod(t.env(),"getGeneratedKeys",mID); } catch(const SQLException&) @@ -192,7 +192,7 @@ void SAL_CALL java_sql_Statement_Base::cancel( ) throw(RuntimeException, std::e { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowRuntime("cancel",mID); } @@ -214,7 +214,7 @@ void SAL_CALL java_sql_Statement::clearBatch( ) throw(::com::sun::star::sdbc::S { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("clearBatch", mID); } //t.pEnv } @@ -235,7 +235,7 @@ sal_Bool SAL_CALL java_sql_Statement_Base::execute( const OUString& sql ) throw( static const char * cSignature = "(Ljava/lang/String;)Z"; static const char * cMethodName = "execute"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); // convert Parameter jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) ); @@ -260,7 +260,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); m_aLogger.log( LogLevel::FINE, STR_LOG_EXECUTE_QUERY, sql ); - jobject out(0); + jobject out(nullptr); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { @@ -270,7 +270,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/ResultSet;"; static const char * cMethodName = "executeQuery"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); // convert Parameter jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) ); @@ -286,7 +286,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU } } //t.pEnv // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); + return out==nullptr ? nullptr : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); } Reference< XConnection > SAL_CALL java_sql_Statement_Base::getConnection( ) throw(SQLException, RuntimeException, std::exception) @@ -311,7 +311,7 @@ void SAL_CALL java_sql_Statement::addBatch( const OUString& sql ) throw(::com::s SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithStringArg("addBatch",mID,sql); } //t.pEnv } @@ -324,7 +324,7 @@ Sequence< sal_Int32 > SAL_CALL java_sql_Statement::executeBatch( ) throw(::com: Sequence< sal_Int32 > aSeq; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jintArray out = static_cast<jintArray>(callObjectMethod(t.pEnv,"executeBatch","()[I", mID)); if (out) { @@ -347,7 +347,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::executeUpdate( const OUString& sql ) SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); m_sSqlStatement = sql; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithStringArg("executeUpdate",mID,sql); } @@ -356,11 +356,11 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callResultSetMethod(t.env(),"getResultSet",mID); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); + return out==nullptr ? nullptr : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); } @@ -368,7 +368,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::getUpdateCount( ) throw(::com::sun: { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); sal_Int32 out = callIntMethod_ThrowSQL("getUpdateCount", mID); m_aLogger.log( LogLevel::FINER, STR_LOG_UPDATE_COUNT, (sal_Int32)out ); return out; @@ -377,7 +377,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::getUpdateCount( ) throw(::com::sun: sal_Bool SAL_CALL java_sql_Statement_Base::getMoreResults( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "getMoreResults", mID ); } @@ -387,7 +387,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd { SDBThreadAttach t; createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID); // WARNING: the caller becomes the owner of the returned pointer if( out ) @@ -409,33 +409,33 @@ void SAL_CALL java_sql_Statement_Base::clearWarnings( ) throw(::com::sun::star: { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("clearWarnings", mID); } } sal_Int32 java_sql_Statement_Base::getQueryTimeOut() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getQueryTimeOut",mID); } sal_Int32 java_sql_Statement_Base::getMaxRows() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getMaxRows",mID); } sal_Int32 java_sql_Statement_Base::getResultSetConcurrency() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getResultSetConcurrency",mID,m_nResultSetConcurrency); } sal_Int32 java_sql_Statement_Base::getResultSetType() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getResultSetType",mID,m_nResultSetType); } @@ -456,19 +456,19 @@ sal_Int32 java_sql_Statement_Base::impl_getProperty(const char* _pMethodName, jm sal_Int32 java_sql_Statement_Base::getFetchDirection() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getFetchDirection",mID); } sal_Int32 java_sql_Statement_Base::getFetchSize() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getFetchSize",mID); } sal_Int32 java_sql_Statement_Base::getMaxFieldSize() throw(SQLException, RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return impl_getProperty("getMaxFieldSize",mID); } @@ -478,7 +478,7 @@ OUString java_sql_Statement_Base::getCursorName() throw(SQLException, RuntimeExc checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); try { return callStringMethod("getCursorName",mID); @@ -495,7 +495,7 @@ void java_sql_Statement_Base::setQueryTimeOut(sal_Int32 _par0) throw(SQLExceptio checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setQueryTimeOut", mID, _par0); } @@ -509,7 +509,7 @@ void java_sql_Statement_Base::setEscapeProcessing(bool _par0) throw(SQLException SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); m_bEscapeProcessing = _par0; createStatement( t.pEnv ); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithBoolArg_ThrowRuntime("setEscapeProcessing", mID, _par0); } @@ -519,7 +519,7 @@ void java_sql_Statement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, Ru checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setMaxRows", mID, _par0); } @@ -550,7 +550,7 @@ void java_sql_Statement_Base::setFetchDirection(sal_Int32 _par0) throw(SQLExcept m_aLogger.log( LogLevel::FINER, STR_LOG_FETCH_DIRECTION, (sal_Int32)_par0 ); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setFetchDirection", mID, _par0); } @@ -562,7 +562,7 @@ void java_sql_Statement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setFetchSize", mID, _par0); } @@ -572,7 +572,7 @@ void java_sql_Statement_Base::setMaxFieldSize(sal_Int32 _par0) throw(SQLExceptio checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setMaxFieldSize", mID, _par0); } @@ -583,7 +583,7 @@ void java_sql_Statement_Base::setCursorName(const OUString &_par0) throw(SQLExce SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithStringArg("setCursorName",mID,_par0); } //t.pEnv } @@ -760,7 +760,7 @@ void java_sql_Statement_Base::getFastPropertyValue( } } -jclass java_sql_Statement::theClass = 0; +jclass java_sql_Statement::theClass = nullptr; java_sql_Statement::~java_sql_Statement() {} @@ -783,8 +783,8 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv) // initialize temporary variable static const char * cMethodName = "createStatement"; // Java-Call - jobject out = NULL; - static jmethodID mID(NULL); + jobject out = nullptr; + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(II)Ljava/sql/Statement;"; diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index 6838634f90c7..588cca1c095c 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -62,7 +62,7 @@ using namespace ::com::sun::star::lang; SDBThreadAttach::SDBThreadAttach() : m_aGuard(java_lang_Object::getVM()) - , pEnv(NULL) + , pEnv(nullptr) { pEnv = m_aGuard.getEnvironment(); OSL_ENSURE(pEnv,"Environment is nULL!"); @@ -93,7 +93,7 @@ void SDBThreadAttach::releaseRef() } // static variables of the class -jclass java_lang_Object::theClass = 0; +jclass java_lang_Object::theClass = nullptr; jclass java_lang_Object::getMyClass() const { @@ -103,14 +103,14 @@ jclass java_lang_Object::getMyClass() const } // the actual constructor java_lang_Object::java_lang_Object() - : object( 0 ) + : object( nullptr ) { SDBThreadAttach::addRef(); } // the protected-constructor for the derived classes java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj ) - : object( NULL ) + : object( nullptr ) { SDBThreadAttach::addRef(); if( pXEnv && myObj ) @@ -131,7 +131,7 @@ void java_lang_Object::clearObject(JNIEnv& rEnv) if( object ) { rEnv.DeleteGlobalRef( object ); - object = NULL; + object = nullptr; } } @@ -154,7 +154,7 @@ void java_lang_Object::saveRef( JNIEnv * pXEnv, jobject myObj ) OUString java_lang_Object::toString() const { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("toString",mID); } @@ -164,7 +164,7 @@ namespace bool lcl_translateJNIExceptionToUNOException( JNIEnv* _pEnvironment, const Reference< XInterface >& _rxContext, SQLException& _out_rException ) { - jthrowable jThrow = _pEnvironment ? _pEnvironment->ExceptionOccurred() : NULL; + jthrowable jThrow = _pEnvironment ? _pEnvironment->ExceptionOccurred() : nullptr; if ( !jThrow ) return false; @@ -261,7 +261,7 @@ bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodID& _ obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()Z", _inout_MethodID); // call method out = t.pEnv->CallBooleanMethod( object, _inout_MethodID ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); return out; } @@ -274,7 +274,7 @@ bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName, jm obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)Z", _inout_MethodID); // call method out = t.pEnv->CallBooleanMethod( object, _inout_MethodID, _nArgument ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); return out; } @@ -293,7 +293,7 @@ sal_Int32 java_lang_Object::callIntMethod_ThrowSQL(const char* _pMethodName, jme obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()I", _inout_MethodID); // call method jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); return (sal_Int32)out; } @@ -304,7 +304,7 @@ sal_Int32 java_lang_Object::callIntMethod_ThrowRuntime(const char* _pMethodName, obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"()I", _inout_MethodID); // call method jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) ); - ThrowRuntimeException(t.pEnv, NULL); + ThrowRuntimeException(t.pEnv, nullptr); return (sal_Int32)out; } @@ -315,7 +315,7 @@ sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowSQL( const char* _pMeth obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)I", _inout_MethodID); // call method jint out( t.pEnv->CallIntMethod( object, _inout_MethodID , _nArgument) ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); return (sal_Int32)out; } @@ -326,7 +326,7 @@ sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowRuntime( const char* _p obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(I)I", _inout_MethodID); // call method jint out( t.pEnv->CallIntMethod( object, _inout_MethodID , _nArgument) ); - ThrowRuntimeException(t.pEnv, NULL); + ThrowRuntimeException(t.pEnv, nullptr); return (sal_Int32)out; } @@ -338,7 +338,7 @@ void java_lang_Object::callVoidMethod_ThrowSQL( const char* _pMethodName, jmetho // call method t.pEnv->CallVoidMethod( object, _inout_MethodID ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); } void java_lang_Object::callVoidMethod_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID) const @@ -349,7 +349,7 @@ void java_lang_Object::callVoidMethod_ThrowRuntime( const char* _pMethodName, jm // call method t.pEnv->CallVoidMethod( object, _inout_MethodID ); - ThrowRuntimeException(t.pEnv, NULL); + ThrowRuntimeException(t.pEnv, nullptr); } void java_lang_Object::callVoidMethodWithIntArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const @@ -360,7 +360,7 @@ void java_lang_Object::callVoidMethodWithIntArg_ThrowSQL( const char* _pMethodNa // call method t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); } void java_lang_Object::callVoidMethodWithIntArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const @@ -371,7 +371,7 @@ void java_lang_Object::callVoidMethodWithIntArg_ThrowRuntime( const char* _pMeth // call method t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument ); - ThrowRuntimeException(t.pEnv, NULL); + ThrowRuntimeException(t.pEnv, nullptr); } void java_lang_Object::callVoidMethodWithBoolArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument ) const @@ -381,7 +381,7 @@ void java_lang_Object::callVoidMethodWithBoolArg_ThrowSQL( const char* _pMethodN obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(Z)V", _inout_MethodID); // call method t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) ); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); } void java_lang_Object::callVoidMethodWithBoolArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument ) const @@ -391,7 +391,7 @@ void java_lang_Object::callVoidMethodWithBoolArg_ThrowRuntime( const char* _pMet obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(Z)V", _inout_MethodID); // call method t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) ); - ThrowRuntimeException(t.pEnv, NULL); + ThrowRuntimeException(t.pEnv, nullptr); } OUString java_lang_Object::callStringMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const @@ -410,7 +410,7 @@ jobject java_lang_Object::callObjectMethod( JNIEnv * _pEnv,const char* _pMethodN obtainMethodId_throwSQL(_pEnv, _pMethodName,_pSignature, _inout_MethodID); // call method jobject out = _pEnv->CallObjectMethod( object, _inout_MethodID); - ThrowSQLException( _pEnv, NULL ); + ThrowSQLException( _pEnv, nullptr ); return out; } @@ -420,7 +420,7 @@ jobject java_lang_Object::callObjectMethodWithIntArg( JNIEnv * _pEnv,const char* obtainMethodId_throwSQL(_pEnv, _pMethodName,_pSignature, _inout_MethodID); // call method jobject out = _pEnv->CallObjectMethod( object, _inout_MethodID,_nArgument ); - ThrowSQLException( _pEnv, NULL ); + ThrowSQLException( _pEnv, nullptr ); return out; } @@ -441,7 +441,7 @@ void java_lang_Object::callVoidMethodWithStringArg( const char* _pMethodName, jm jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument)); // call method t.pEnv->CallVoidMethod( object, _inout_MethodID , str.get()); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); } sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName, jmethodID& _inout_MethodID,const OUString& _nArgument ) const @@ -462,7 +462,7 @@ sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument)); // call method jint out = t.pEnv->CallIntMethod( object, _inout_MethodID , str.get()); - ThrowSQLException( t.pEnv, NULL ); + ThrowSQLException( t.pEnv, nullptr ); return (sal_Int32)out; } diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index 534219ef5a24..9aa42c8bc030 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -55,7 +55,7 @@ java_sql_PreparedStatement::java_sql_PreparedStatement( JNIEnv * pEnv, java_sql_ m_sSqlStatement = sql; } -jclass java_sql_PreparedStatement::theClass = 0; +jclass java_sql_PreparedStatement::theClass = nullptr; java_sql_PreparedStatement::~java_sql_PreparedStatement() { @@ -100,7 +100,7 @@ sal_Bool SAL_CALL java_sql_PreparedStatement::execute( ) throw(::com::sun::star SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "execute", mID ); } @@ -113,7 +113,7 @@ sal_Int32 SAL_CALL java_sql_PreparedStatement::executeUpdate( ) throw(::com::su SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowSQL("executeUpdate", mID); } @@ -130,7 +130,7 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c static const char * cSignature = "(ILjava/lang/String;)V"; static const char * cMethodName = "setString"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x)); t.pEnv->CallVoidMethod( object, mID, parameterIndex,str.get()); @@ -154,10 +154,10 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callResultSetMethod(t.env(),"executeQuery",mID); - return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this); + return out==nullptr ? nullptr : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this); } @@ -169,7 +169,7 @@ void SAL_CALL java_sql_PreparedStatement::setBoolean( sal_Int32 parameterIndex, SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setBoolean", "(IZ)V", mID, parameterIndex, x); } @@ -182,7 +182,7 @@ void SAL_CALL java_sql_PreparedStatement::setByte( sal_Int32 parameterIndex, sal SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setByte", "(IB)V", mID, parameterIndex, x); } @@ -196,7 +196,7 @@ void SAL_CALL java_sql_PreparedStatement::setDate( sal_Int32 parameterIndex, con SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); java_sql_Date aT(x); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setDate", "(ILjava/sql/Date;)V", mID, parameterIndex, aT.getJavaObject()); } @@ -211,7 +211,7 @@ void SAL_CALL java_sql_PreparedStatement::setTime( sal_Int32 parameterIndex, con SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); java_sql_Time aT(x); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setTime", "(ILjava/sql/Time;)V", mID, parameterIndex, aT.getJavaObject()); } @@ -224,7 +224,7 @@ void SAL_CALL java_sql_PreparedStatement::setTimestamp( sal_Int32 parameterIndex SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); java_sql_Timestamp aD(x); callVoidMethod_ThrowSQL("setTimestamp", "(ILjava/sql/Timestamp;)V", mID, parameterIndex, aD.getJavaObject()); } @@ -237,7 +237,7 @@ void SAL_CALL java_sql_PreparedStatement::setDouble( sal_Int32 parameterIndex, d SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setDouble", "(ID)V", mID, parameterIndex, x); } @@ -250,7 +250,7 @@ void SAL_CALL java_sql_PreparedStatement::setFloat( sal_Int32 parameterIndex, fl SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setFloat", "(IF)V", mID, parameterIndex, x); } @@ -263,7 +263,7 @@ void SAL_CALL java_sql_PreparedStatement::setInt( sal_Int32 parameterIndex, sal_ SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setInt", "(II)V", mID, parameterIndex, x); } @@ -276,7 +276,7 @@ void SAL_CALL java_sql_PreparedStatement::setLong( sal_Int32 parameterIndex, sal SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setLong", "(IJ)V", mID, parameterIndex, x); } @@ -289,7 +289,7 @@ void SAL_CALL java_sql_PreparedStatement::setNull( sal_Int32 parameterIndex, sal SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setNull", "(II)V", mID, parameterIndex, sqlType); } @@ -332,10 +332,10 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter static const char * cSignature = "(ILjava/lang/Object;II)V"; static const char * cMethodName = "setObject"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); { - jobject obj = NULL; + jobject obj = nullptr; switch(targetSqlType) { case DataType::DECIMAL: @@ -386,8 +386,8 @@ void SAL_CALL java_sql_PreparedStatement::setObjectNull( sal_Int32 parameterInde SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); - callVoidMethod_ThrowSQL<jobject>("setObject", "(ILjava/lang/Object;)V", mID, parameterIndex, NULL); + static jmethodID mID(nullptr); + callVoidMethod_ThrowSQL<jobject>("setObject", "(ILjava/lang/Object;)V", mID, parameterIndex, nullptr); } @@ -412,7 +412,7 @@ void SAL_CALL java_sql_PreparedStatement::setShort( sal_Int32 parameterIndex, sa SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("setShort", "(IS)V", mID, parameterIndex, x); } @@ -431,7 +431,7 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co static const char * cSignature = "(I[B)V"; static const char * cMethodName = "setBytes"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); jbyteArray pByteArray = t.pEnv->NewByteArray(x.getLength()); jbyte * xData = reinterpret_cast<jbyte *>( @@ -465,7 +465,7 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete static const char * cSignature = "(ILjava/io/InputStream;I)V"; static const char * cMethodName = "setCharacterStream"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); Sequence< sal_Int8 > aSeq; if ( x.is() ) @@ -488,14 +488,14 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete args2[2].i = actualLength; // Java-Call jclass aClass = t.pEnv->FindClass("java/io/CharArrayInputStream"); - static jmethodID mID2 = NULL; + static jmethodID mID2 = nullptr; if ( !mID2 ) { // initialize temporary variable const char * cSignatureStream = "([BII)V"; mID2 = t.pEnv->GetMethodID( aClass, "<init>", cSignatureStream ); } - jobject tempObj = NULL; + jobject tempObj = nullptr; if(mID2) tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 ); @@ -522,7 +522,7 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn static const char * cSignature = "(ILjava/io/InputStream;I)V"; static const char * cMethodName = "setBinaryStream"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); { Sequence< sal_Int8 > aSeq; @@ -547,14 +547,14 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn // Java-Call jclass aClass = t.pEnv->FindClass("java/io/ByteArrayInputStream"); - static jmethodID mID2 = NULL; + static jmethodID mID2 = nullptr; if ( !mID2 ) { // initialize temporary variable const char * cSignatureStream = "([BII)V"; mID2 = t.pEnv->GetMethodID( aClass, "<init>", cSignatureStream ); } - jobject tempObj = NULL; + jobject tempObj = nullptr; if(mID2) tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 ); t.pEnv->CallVoidMethod( object, mID, parameterIndex,tempObj,(sal_Int32)actualLength); @@ -578,7 +578,7 @@ void SAL_CALL java_sql_PreparedStatement::clearParameters( ) throw(::com::sun:: { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("clearParameters",mID); } //t.pEnv } @@ -590,7 +590,7 @@ void SAL_CALL java_sql_PreparedStatement::clearBatch( ) throw(::com::sun::star: SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("clearBatch",mID); } //t.pEnv } @@ -603,7 +603,7 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("addBatch", mID); } //t.pEnv } @@ -616,7 +616,7 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd ::com::sun::star::uno::Sequence< sal_Int32 > aSeq; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jintArray out = static_cast<jintArray>(callObjectMethod(t.pEnv,"executeBatch","()[I", mID)); if(out) { @@ -634,10 +634,10 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/ResultSetMetaData;", mID); - return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection ); + return out==nullptr ? nullptr : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection ); } void SAL_CALL java_sql_PreparedStatement::acquire() throw() @@ -663,8 +663,8 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv) // convert Parameter args[0].l = convertwchar_tToJavaString(_pEnv,m_sSqlStatement); // Java-Call - jobject out = NULL; - static jmethodID mID(NULL); + jobject out = nullptr; + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/PreparedStatement;"; @@ -676,7 +676,7 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv) } else { - static jmethodID mID2 = NULL; + static jmethodID mID2 = nullptr; if ( !mID2 ) { static const char * cSignature2 = "(Ljava/lang/String;)Ljava/sql/PreparedStatement;"; diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx index be913ddab16a..4e96bfad3baa 100644 --- a/connectivity/source/drivers/jdbc/Reader.cxx +++ b/connectivity/source/drivers/jdbc/Reader.cxx @@ -26,7 +26,7 @@ using ::com::sun::star::uno::Sequence; //************ Class: java.io.Reader -jclass java_io_Reader::theClass = 0; +jclass java_io_Reader::theClass = nullptr; java_io_Reader::java_io_Reader( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ) { @@ -52,7 +52,7 @@ sal_Int32 SAL_CALL java_io_Reader::readSomeBytes( ::com::sun::star::uno::Sequenc void SAL_CALL java_io_Reader::skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if(nBytesToSkip <= 0) return; @@ -85,7 +85,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not static const char * cSignature = "()Z"; static const char * cMethodName = "ready"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallBooleanMethod( object, mID); ThrowRuntimeException(t.pEnv,*this); @@ -95,7 +95,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not void SAL_CALL java_io_Reader::closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowRuntime("close", mID); } @@ -136,7 +136,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< s static const char * cSignature = "([CII)I"; static const char * cMethodName = "read"; // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID); outChars = t.pEnv->CallIntMethod( object, mID, pCharArray, 0, nCharsToRead ); if ( !outChars ) diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx index b6cad44e1b18..d2ef7854ceed 100644 --- a/connectivity/source/drivers/jdbc/Ref.cxx +++ b/connectivity/source/drivers/jdbc/Ref.cxx @@ -24,7 +24,7 @@ using namespace connectivity; //************ Class: java.sql.Ref -jclass java_sql_Ref::theClass = 0; +jclass java_sql_Ref::theClass = nullptr; java_sql_Ref::java_sql_Ref( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ) { @@ -45,7 +45,7 @@ jclass java_sql_Ref::getMyClass() const OUString SAL_CALL java_sql_Ref::getBaseTypeName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getBaseTypeName",mID); } diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index 8694b9dace4b..88fbf7d72d6c 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -62,7 +62,7 @@ IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,"com.sun.star.sdbcx.JResultSet","com.s //************ Class: java.sql.ResultSet -jclass java_sql_ResultSet::theClass = 0; +jclass java_sql_ResultSet::theClass = nullptr; java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rParentLogger,java_sql_Connection& _rConnection, java_sql_Statement_Base* pStmt) :java_sql_ResultSet_BASE(m_aMutex) ,java_lang_Object( pEnv, myObj ) @@ -105,7 +105,7 @@ m_xMetaData.clear(); if( object ) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("close", mID); clearObject(*t.pEnv); } @@ -131,41 +131,41 @@ m_xMetaData.clear(); sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithStringArg("findColumn",mID,columnName); } Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getBinaryStream","(I)Ljava/io/InputStream;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_io_InputStream( t.pEnv, out ); + return out==nullptr ? nullptr : new java_io_InputStream( t.pEnv, out ); } Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getCharacterStream","(I)Ljava/io/Reader;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_io_Reader( t.pEnv, out ); + return out==nullptr ? nullptr : new java_io_Reader( t.pEnv, out ); } sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex ); } sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod; return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex); } @@ -175,7 +175,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde { Sequence< sal_Int8 > aSeq; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jbyteArray out = static_cast<jbyteArray>(callObjectMethodWithIntArg(t.pEnv,"getBytes","(I)[B", mID, columnIndex)); if (out) { @@ -191,7 +191,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde ::com::sun::star::util::Date SAL_CALL java_sql_ResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date(); @@ -200,7 +200,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jdouble (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod; return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex); } @@ -208,7 +208,7 @@ double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQL float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod; return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex); } @@ -216,21 +216,21 @@ float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLEx sal_Int32 SAL_CALL java_sql_ResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("getInt",mID,columnIndex); } sal_Int32 SAL_CALL java_sql_ResultSet::getRow( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowSQL("getRow", mID); } sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod; return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex); } @@ -239,56 +239,56 @@ sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL java_sql_ResultSet::getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/ResultSetMetaData;", mID); - return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection ); + return out==nullptr ? nullptr : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection ); } Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Array( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Array( t.pEnv, out ); } Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Clob( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Clob( t.pEnv, out ); } Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Blob( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Blob( t.pEnv, out ); } Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer - return out==0 ? 0 : new java_sql_Ref( t.pEnv, out ); + return out==nullptr ? nullptr : new java_sql_Ref( t.pEnv, out ); } Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException, std::exception) { - jobject out(0); + jobject out(nullptr); Any aRet; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); { @@ -298,7 +298,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap); // initialize temporary Variable // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(I)Ljava/lang/Object;"; @@ -321,7 +321,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen else if ( t.pEnv->IsInstanceOf(out,java_lang_Boolean::st_getMyClass()) ) { java_lang_Boolean aVal(t.pEnv,out); - static jmethodID methodID = NULL; + static jmethodID methodID = nullptr; aRet <<= aVal.callBooleanMethod("booleanValue",methodID); } else if ( t.pEnv->IsInstanceOf(out,java_sql_Date::st_getMyClass()) ) @@ -349,7 +349,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod; return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex); } @@ -358,7 +358,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getString",mID,columnIndex); } @@ -367,7 +367,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S ::com::sun::star::util::Time SAL_CALL java_sql_ResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time(); @@ -378,7 +378,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S ::com::sun::star::util::DateTime SAL_CALL java_sql_ResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex); // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime(); @@ -387,31 +387,31 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S sal_Bool SAL_CALL java_sql_ResultSet::isAfterLast( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "isAfterLast", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::isFirst( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "isFirst", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::isLast( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "isLast", mID ); } void SAL_CALL java_sql_ResultSet::beforeFirst( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("beforeFirst", mID); } void SAL_CALL java_sql_ResultSet::afterLast( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("afterLast", mID); } @@ -424,32 +424,32 @@ void SAL_CALL java_sql_ResultSet::close( ) throw(::com::sun::star::sdbc::SQLExc sal_Bool SAL_CALL java_sql_ResultSet::first( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "first", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::last( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "last", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "absolute", mID,row ); } sal_Bool SAL_CALL java_sql_ResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "relative", mID,row ); } sal_Bool SAL_CALL java_sql_ResultSet::previous( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "previous", mID ); } @@ -461,58 +461,58 @@ Reference< XInterface > SAL_CALL java_sql_ResultSet::getStatement( ) throw(SQLE sal_Bool SAL_CALL java_sql_ResultSet::rowDeleted( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "rowDeleted", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::rowInserted( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "rowInserted", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::rowUpdated( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "rowUpdated", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "isBeforeFirst", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::next( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "next", mID ); } sal_Bool SAL_CALL java_sql_ResultSet::wasNull( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethod( "wasNull", mID ); } void SAL_CALL java_sql_ResultSet::cancel( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowRuntime("cancel", mID); } void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("clearWarnings", mID); } ::com::sun::star::uno::Any SAL_CALL java_sql_ResultSet::getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { SDBThreadAttach t; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID); // WARNING: the caller becomes the owner of the returned pointer if( out ) @@ -529,79 +529,79 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc void SAL_CALL java_sql_ResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("insertRow", mID); } void SAL_CALL java_sql_ResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateRow", mID); } void SAL_CALL java_sql_ResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("deleteRow", mID); } void SAL_CALL java_sql_ResultSet::cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("cancelRowUpdates", mID); } void SAL_CALL java_sql_ResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("moveToInsertRow", mID); } void SAL_CALL java_sql_ResultSet::moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("moveToCurrentRow", mID); } void SAL_CALL java_sql_ResultSet::updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowSQL("updateNull", mID, columnIndex); } void SAL_CALL java_sql_ResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateBoolean", "(IZ)V", mID, columnIndex, x); } void SAL_CALL java_sql_ResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateByte", "(IB)V", mID, columnIndex, x); } void SAL_CALL java_sql_ResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateShort", "(IS)V", mID, columnIndex, x); } void SAL_CALL java_sql_ResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateInt", "(II)V", mID, columnIndex, x); } void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateLong", "(IJ)V", mID, columnIndex, x); } @@ -609,14 +609,14 @@ void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x void SAL_CALL java_sql_ResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateFloat", "(IF)V", mID, columnIndex, x); } void SAL_CALL java_sql_ResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateDouble", "(ID)V", mID, columnIndex, x); } @@ -628,7 +628,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const OUS { // initialize temporary variable // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(ILjava/lang/String;)V"; @@ -654,7 +654,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co { // initialize temporary variable // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(I[B)V"; @@ -686,7 +686,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { java_sql_Date aD(x); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateDate", "(ILjava/sql/Date;)V", mID, columnIndex, aD.getJavaObject()); } @@ -694,7 +694,7 @@ void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { java_sql_Time aD(x); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateTime", "(ILjava/sql/Time;)V", mID, columnIndex, aD.getJavaObject()); } @@ -702,7 +702,7 @@ void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { java_sql_Timestamp aD(x); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("updateTimestamp", "(ILjava/sql/Timestamp;)V", mID, columnIndex, aD.getJavaObject()); } @@ -716,7 +716,7 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con // initialize temporary variable // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(ILjava/io/InputStream;I)V"; @@ -747,7 +747,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, // initialize temporary variable // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(ILjava/io/Reader;I)V"; @@ -794,7 +794,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co // initialize temporary variable // Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(ILjava/lang/Object;I)V"; @@ -827,50 +827,50 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co sal_Int32 java_sql_ResultSet::getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowRuntime("getConcurrency", mID); } sal_Int32 java_sql_ResultSet::getResultSetType() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowRuntime("getType",mID); } sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowRuntime("getFetchDirection", mID); } sal_Int32 java_sql_ResultSet::getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowRuntime("getFetchSize", mID); } OUString java_sql_ResultSet::getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getCursorName",mID); } void java_sql_ResultSet::setFetchDirection(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setFetchDirection", mID, _par0); } void SAL_CALL java_sql_ResultSet::refreshRow( ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethod_ThrowSQL("refreshRow",mID); } void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); callVoidMethodWithIntArg_ThrowRuntime("setFetchSize", mID, _par0); } diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx index 508d76950163..fa72a45eb23f 100644 --- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx +++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::lang; //************ Class: java.sql.ResultSetMetaData -jclass java_sql_ResultSetMetaData::theClass = 0; +jclass java_sql_ResultSetMetaData::theClass = nullptr; java_sql_ResultSetMetaData::java_sql_ResultSetMetaData( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rResultSetLogger, java_sql_Connection& _rCon ) :java_lang_Object( pEnv, myObj ) ,m_aLogger( _rResultSetLogger ) @@ -57,14 +57,14 @@ jclass java_sql_ResultSetMetaData::getMyClass() const sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("getColumnDisplaySize",mID,column); } sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("getColumnType",mID,column); } @@ -73,7 +73,7 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLExcep { if ( m_nColumnCount == -1 ) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); m_nColumnCount = callIntMethod_ThrowSQL("getColumnCount", mID); } // if ( m_nColumnCount == -1 ) return m_nColumnCount; @@ -83,50 +83,50 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLExcep sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isCaseSensitive", mID,column ); } OUString SAL_CALL java_sql_ResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getSchemaName",mID,column); } OUString SAL_CALL java_sql_ResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getColumnName",mID,column); } OUString SAL_CALL java_sql_ResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getTableName",mID,column); } OUString SAL_CALL java_sql_ResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getCatalogName",mID,column); } OUString SAL_CALL java_sql_ResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getColumnTypeName",mID,column); } OUString SAL_CALL java_sql_ResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getColumnLabel",mID,column); } OUString SAL_CALL java_sql_ResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethodWithIntArg("getColumnClassName",mID,column); } @@ -135,14 +135,14 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) thr { if ( m_pConnection->isIgnoreCurrencyEnabled() ) return sal_False; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isCurrency", mID,column ); } sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isAutoIncrement", mID,column ); } @@ -150,52 +150,52 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isSigned", mID,column ); } sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("getPrecision",mID,column); } sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("getScale",mID,column); } sal_Int32 SAL_CALL java_sql_ResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethodWithIntArg_ThrowSQL("isNullable",mID,column); } sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isSearchable", mID,column ); } sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isReadOnly", mID,column ); } sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isDefinitelyWritable", mID,column ); } sal_Bool SAL_CALL java_sql_ResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callBooleanMethodWithIntArg( "isWritable", mID,column ); } diff --git a/connectivity/source/drivers/jdbc/SQLException.cxx b/connectivity/source/drivers/jdbc/SQLException.cxx index c05650e66beb..882d6cb6da33 100644 --- a/connectivity/source/drivers/jdbc/SQLException.cxx +++ b/connectivity/source/drivers/jdbc/SQLException.cxx @@ -43,7 +43,7 @@ java_sql_SQLException_BASE::java_sql_SQLException_BASE( JNIEnv * pEnv, jobject m { } -jclass java_sql_SQLException_BASE::theClass = 0; +jclass java_sql_SQLException_BASE::theClass = nullptr; java_sql_SQLException_BASE::~java_sql_SQLException_BASE() {} @@ -64,13 +64,13 @@ jclass java_sql_SQLException_BASE::st_getMyClass() css::sdbc::SQLException java_sql_SQLException_BASE::getNextException() const { SDBThreadAttach t; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); jobject out = callObjectMethod(t.pEnv,"getNextException","()Ljava/sql/SQLException;", mID); // WARNING: the caller will become the owner of the returned pointers !!! if( out ) { java_sql_SQLException_BASE warn_base(t.pEnv,out); - return css::sdbc::SQLException(java_sql_SQLException(warn_base,0)); + return css::sdbc::SQLException(java_sql_SQLException(warn_base,nullptr)); } return css::sdbc::SQLException(); @@ -78,12 +78,12 @@ css::sdbc::SQLException java_sql_SQLException_BASE::getNextException() const OUString java_sql_SQLException_BASE::getSQLState() const { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getSQLState",mID); } sal_Int32 java_sql_SQLException_BASE::getErrorCode() const { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callIntMethod_ThrowSQL("getErrorCode", mID); } diff --git a/connectivity/source/drivers/jdbc/SQLWarning.cxx b/connectivity/source/drivers/jdbc/SQLWarning.cxx index 68cb63a39924..b23526770717 100644 --- a/connectivity/source/drivers/jdbc/SQLWarning.cxx +++ b/connectivity/source/drivers/jdbc/SQLWarning.cxx @@ -23,7 +23,7 @@ using namespace connectivity; //************ Class: java.sql.SQLWarning -jclass java_sql_SQLWarning_BASE::theClass = 0; +jclass java_sql_SQLWarning_BASE::theClass = nullptr; java_sql_SQLWarning_BASE::~java_sql_SQLWarning_BASE() {} diff --git a/connectivity/source/drivers/jdbc/String.cxx b/connectivity/source/drivers/jdbc/String.cxx index db873c1bdcb6..db3553586338 100644 --- a/connectivity/source/drivers/jdbc/String.cxx +++ b/connectivity/source/drivers/jdbc/String.cxx @@ -24,7 +24,7 @@ using namespace connectivity; //************ Class: java.lang.String -jclass java_lang_String::theClass = 0; +jclass java_lang_String::theClass = nullptr; java_lang_String::~java_lang_String() {} diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx index d4172bd93300..f278224459c4 100644 --- a/connectivity/source/drivers/jdbc/Throwable.cxx +++ b/connectivity/source/drivers/jdbc/Throwable.cxx @@ -24,7 +24,7 @@ using namespace connectivity; //************ Class: java.lang.Throwable -jclass java_lang_Throwable::theClass = 0; +jclass java_lang_Throwable::theClass = nullptr; java_lang_Throwable::~java_lang_Throwable() {} @@ -44,21 +44,21 @@ jclass java_lang_Throwable::st_getMyClass() OUString java_lang_Throwable::getMessage() const { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getMessage",mID); } OUString java_lang_Throwable::getLocalizedMessage() const { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callStringMethod("getLocalizedMessage",mID); } #if OSL_DEBUG_LEVEL > 0 void java_lang_Throwable::printStackTrace() const { - static jmethodID mID(NULL); + static jmethodID mID(nullptr); return callVoidMethod_ThrowSQL("printStackTrace",mID); } #endif diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx index 492539ef9eba..791b86fc4ed2 100644 --- a/connectivity/source/drivers/jdbc/Timestamp.cxx +++ b/connectivity/source/drivers/jdbc/Timestamp.cxx @@ -28,8 +28,8 @@ using namespace connectivity; //************ Class: java.sql.Date -jclass java_sql_Date::theClass = 0; -java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java_util_Date( NULL, nullptr ) +jclass java_sql_Date::theClass = nullptr; +java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java_util_Date( nullptr, nullptr ) { SDBThreadAttach t; if( !t.pEnv ) @@ -43,7 +43,7 @@ java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java // Turn of Java-Call for the constructor // initialise temporary variables jobject tempObj; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Date;"; @@ -81,7 +81,7 @@ java_sql_Date::operator ::com::sun::star::util::Date() //************ Class: java.sql.Time -jclass java_sql_Time::theClass = 0; +jclass java_sql_Time::theClass = nullptr; java_sql_Time::~java_sql_Time() {} @@ -97,7 +97,7 @@ jclass java_sql_Time::st_getMyClass() theClass = findMyClass("java/sql/Time"); return theClass; } -java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( NULL, nullptr ) +java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( nullptr, nullptr ) { SDBThreadAttach t; if( !t.pEnv ) @@ -112,7 +112,7 @@ java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_ // Turn off Java-Call for the constructor // intialise temporary variables jobject tempObj; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Time;"; @@ -134,7 +134,7 @@ java_sql_Time::operator ::com::sun::star::util::Time() //************ Class: java.sql.Timestamp -jclass java_sql_Timestamp::theClass = 0; +jclass java_sql_Timestamp::theClass = nullptr; java_sql_Timestamp::~java_sql_Timestamp() {} @@ -153,7 +153,7 @@ jclass java_sql_Timestamp::st_getMyClass() } java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _rOut) - :java_util_Date( NULL, nullptr ) + :java_util_Date( nullptr, nullptr ) { SDBThreadAttach t; if( !t.pEnv ) @@ -168,7 +168,7 @@ java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _ // Turn off Java-Call for the constructor // initialise temporary variables jobject tempObj; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Timestamp;"; diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 753a6a81d9fc..3ef8a7fa37e8 100644 --- a/connectivity/source/drivers/jdbc/jservices.cxx +++ b/connectivity/source/drivers/jdbc/jservices.cxx @@ -63,7 +63,7 @@ struct ProviderRequest { try { - xRet = creator( xServiceManager, sImplementationName,Factory, Services,0); + xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr); } catch(...) { @@ -80,7 +80,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL jdbc_component_getFactory( void* pServiceManager, void* /*pRegistryKey*/) { - void* pRet = 0; + void* pRet = nullptr; if (pServiceManager) { ProviderRequest aReq(pServiceManager,pImplementationName); diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index a528e1128b7d..a2e0a29062b3 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::lang; void java_util_Properties::setProperty(const OUString& key, const OUString& value) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - jobject out(0); + jobject out(nullptr); { jvalue args[2]; @@ -49,19 +49,19 @@ void java_util_Properties::setProperty(const OUString& key, const OUString& valu static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;"; static const char * cMethodName = "setProperty"; // Turn off Java-Call - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID); out = t.pEnv->CallObjectMethod(object, mID, args[0].l,args[1].l); - ThrowSQLException(t.pEnv,NULL); + ThrowSQLException(t.pEnv,nullptr); t.pEnv->DeleteLocalRef(static_cast<jstring>(args[1].l)); t.pEnv->DeleteLocalRef(static_cast<jstring>(args[0].l)); - ThrowSQLException(t.pEnv,0); + ThrowSQLException(t.pEnv,nullptr); if(out) t.pEnv->DeleteLocalRef(out); } //t.pEnv // WARNING: The caller will be owner of the returned pointers!!! } -jclass java_util_Properties::theClass = 0; +jclass java_util_Properties::theClass = nullptr; java_util_Properties::~java_util_Properties() {} @@ -75,7 +75,7 @@ jclass java_util_Properties::getMyClass() const } -java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, nullptr ) +java_util_Properties::java_util_Properties( ): java_lang_Object( nullptr, nullptr ) { SDBThreadAttach t; if( !t.pEnv ) @@ -84,7 +84,7 @@ java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, nullptr ) // Initialize temperary Variables static const char * cSignature = "()V"; jobject tempObj; - static jmethodID mID(NULL); + static jmethodID mID(nullptr); obtainMethodId_throwSQL(t.pEnv, "<init>",cSignature, mID); tempObj = t.pEnv->NewObject( getMyClass(), mID); saveRef( t.pEnv, tempObj ); @@ -178,9 +178,9 @@ jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference< { ::com::sun::star::uno::Sequence< OUString > aNames = _rMap->getElementNames(); if ( aNames.getLength() > 0 ) - ::dbtools::throwFeatureNotImplementedSQLException( "Type maps", NULL ); + ::dbtools::throwFeatureNotImplementedSQLException( "Type maps", nullptr ); } - return 0; + return nullptr; } bool connectivity::isExceptionOccurred(JNIEnv *pEnv,bool _bClear) @@ -189,7 +189,7 @@ bool connectivity::isExceptionOccurred(JNIEnv *pEnv,bool _bClear) return false; jthrowable pThrowable = pEnv->ExceptionOccurred(); - bool bRet = pThrowable != NULL; + bool bRet = pThrowable != nullptr; if ( pThrowable ) { if ( _bClear ) @@ -204,11 +204,11 @@ jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Referen { SDBThreadAttach t; if( !t.pEnv || !x.is() ) - return NULL; + return nullptr; // Turn off Java-Call for the constructor // Initialize temperary variables jclass clazz = java_lang_Object::findMyClass("java/io/ByteArrayInputStream"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "([B)V"; @@ -231,11 +231,11 @@ jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Referen { SDBThreadAttach t; if( !t.pEnv || !x.is() ) - return NULL; + return nullptr; // Turn off Java-Call for the constructor // Initialize temperary Variables jclass clazz = java_lang_Object::findMyClass("java/io/CharArrayReader"); - static jmethodID mID(NULL); + static jmethodID mID(nullptr); if ( !mID ) { static const char * cSignature = "([C)V"; |