summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-27 19:53:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 09:44:57 +0200
commit164fecadfde2569cb5324017d9bf22e2963008b3 (patch)
treef304a20cc66f46d593c91b5979a57833c80f1246 /connectivity
parent726d0a2d54da3e97de242c2c10be3afd2aedf943 (diff)
no need to allocate these on the heap
Change-Id: Ic1a1577ed837d3fa2b7b99474f4cee30300628f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 479699750e07..b2dd83168e5e 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -170,22 +170,22 @@ namespace
if ( _pEnvironment->IsInstanceOf( jThrow, java_sql_SQLException_BASE::st_getMyClass() ) )
{
- std::unique_ptr< java_sql_SQLException_BASE > pException( new java_sql_SQLException_BASE( _pEnvironment, jThrow ) );
- _out_rException = SQLException( pException->getMessage(), _rxContext,
- pException->getSQLState(), pException->getErrorCode(), Any() );
+ java_sql_SQLException_BASE aException( _pEnvironment, jThrow );
+ _out_rException = SQLException( aException.getMessage(), _rxContext,
+ aException.getSQLState(), aException.getErrorCode(), Any() );
return true;
}
else if ( _pEnvironment->IsInstanceOf( jThrow, java_lang_Throwable::st_getMyClass() ) )
{
- std::unique_ptr< java_lang_Throwable > pThrow( new java_lang_Throwable( _pEnvironment, jThrow ) );
+ java_lang_Throwable aThrow( _pEnvironment, jThrow );
#if OSL_DEBUG_LEVEL > 0
- pThrow->printStackTrace();
+ aThrow.printStackTrace();
#endif
- OUString sMessage = pThrow->getMessage();
+ OUString sMessage = aThrow.getMessage();
if ( sMessage.isEmpty() )
- sMessage = pThrow->getLocalizedMessage();
+ sMessage = aThrow.getLocalizedMessage();
if( sMessage.isEmpty() )
- sMessage = pThrow->toString();
+ sMessage = aThrow.toString();
_out_rException = SQLException( sMessage, _rxContext, OUString(), -1, Any() );
return true;
}