Kaydet (Commit) 07184989 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Replace deprecated std::auto_ptr with boost::scoped_ptr

Change-Id: Ic55d1a8b14ec0355a6289007d954e89cd41c7486
üst c6e2b7ac
......@@ -17,7 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "sal/config.h"
#include "boost/scoped_ptr.hpp"
#include "java/sql/Connection.hxx"
#include "java/lang/Class.hxx"
#include "java/tools.hxx"
......@@ -45,7 +47,6 @@
#include <unotools/confignode.hxx>
#include <list>
#include <memory>
using namespace connectivity;
using namespace connectivity::jdbc;
......@@ -690,11 +691,11 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
{
m_aLogger.log( LogLevel::INFO, STR_LOG_LOADING_DRIVER, _sDriverClass );
// the driver manager holds the class of the driver for later use
::std::auto_ptr< java_lang_Class > pDrvClass;
boost::scoped_ptr< java_lang_Class > pDrvClass;
if ( _sDriverClassPath.isEmpty() )
{
// if forName didn't find the class it will throw an exception
pDrvClass = ::std::auto_ptr< java_lang_Class >(java_lang_Class::forName(_sDriverClass));
pDrvClass.reset(java_lang_Class::forName(_sDriverClass));
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment