summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-16 08:09:33 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-16 08:09:33 +0000
commit808952c5a35fca216f4ec7ff86689ed5ce112be4 (patch)
tree3c0206da61c583cf975c5ccbb4c036e0d944c5d4 /connectivity
parent28dd761b8d365cb0fed867784041e8ea51ae90fa (diff)
INTEGRATION: CWS dba19 (1.20.32); FILE MERGED
2004/11/04 08:22:55 oj 1.20.32.1: #i36537# check if stmt is NULL
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 4696da278c..a5a93760e8 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ResultSet.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: hr $ $Date: 2004-11-09 12:13:52 $
+ * last change: $Author: obo $ $Date: 2004-11-16 09:09:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,16 +135,19 @@ IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,"com.sun.star.sdbcx.JResultSet","com.s
//**************************************************************
jclass java_sql_ResultSet::theClass = 0;
-java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj,java_sql_Statement_Base* pStmt)
+java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj,java_sql_Statement_Base* pStmt)
: java_sql_ResultSet_BASE(m_aMutex),
OPropertySetHelper(java_sql_ResultSet_BASE::rBHelper),
-
java_lang_Object( pEnv, myObj )
{
+ SDBThreadAttach::addRef();
+ osl_incrementInterlockedCount(&m_refCount);
if ( pStmt )
m_xStatement = *pStmt;
- SDBThreadAttach::addRef();
+ osl_decrementInterlockedCount(&m_refCount);
}
+// -----------------------------------------------------------------------------
+
java_sql_ResultSet::~java_sql_ResultSet()
{
if ( !java_sql_ResultSet_BASE::rBHelper.bDisposed && !java_sql_ResultSet_BASE::rBHelper.bInDispose )
@@ -202,7 +205,7 @@ void java_sql_ResultSet::disposing(void)
clearObject(*t.pEnv);
}
} //t.pEnv
-
+
SDBThreadAttach::releaseRef();
}
// -------------------------------------------------------------------------
@@ -227,7 +230,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const ::rtl::OUString& column
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment gelöscht worden!");
if( t.pEnv ){
-
+
// temporaere Variable initialisieren
static char * cSignature = "(Ljava/lang/String;)I";
static char * cMethodName = "findColumn";
@@ -242,7 +245,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const ::rtl::OUString& column
// und aufraeumen
t.pEnv->DeleteLocalRef(str);
- ThrowSQLException(t.pEnv,*this);
+ ThrowSQLException(t.pEnv,*this);
} //mID
} //t.pEnv
return (sal_Int32)out;