diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-01 12:24:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-02 07:48:21 +0000 |
commit | c0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 (patch) | |
tree | e5bb6d31a17587452dde579803286f68ffc73672 /extensions | |
parent | 52360bf8dd567598593cb212ac85f0c919315618 (diff) |
unnecessary use of OUStringBuffer in throwing exceptions
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f
Reviewed-on: https://gerrit.libreoffice.org/33788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index a1a0fde40b64..87d686e39082 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -148,10 +148,7 @@ void LdapConnection::initConnection() { if (mLdapDefinition.mServer.isEmpty()) { - OUStringBuffer message ; - - message.append("Cannot initialise connection to LDAP: No server specified.") ; - throw ldap::LdapConnectionException(message.makeStringAndClear()) ; + throw ldap::LdapConnectionException("Cannot initialise connection to LDAP: No server specified."); } if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT; @@ -165,13 +162,9 @@ void LdapConnection::initConnection() #endif if (mConnection == nullptr) { - OUStringBuffer message ; - - message.append("Cannot initialise connection to LDAP server ") ; - message.append(mLdapDefinition.mServer) ; - message.append(":") ; - message.append(mLdapDefinition.mPort) ; - throw ldap::LdapConnectionException(message.makeStringAndClear()); + throw ldap::LdapConnectionException( + "Cannot initialise connection to LDAP server " + + mLdapDefinition.mServer + ":" + OUString::number(mLdapDefinition.mPort)); } } |