diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-10 17:32:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-10 21:41:24 +0100 |
commit | 8546831b3b36e29c1ee42b790cbecd3fd8d8bbaf (patch) | |
tree | ef67dc83a9484c999ff1937469a582cff506ae2e /jvmfwk | |
parent | 5dcdb35ab1e99dbeb283d3694ab7ebba354e9197 (diff) |
Turn JavaInfo sal_Sequence* member into rtl::ByteSequence
Change-Id: Iecd476970b0b7a46afe223f71e95b0010048d7b1
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 7 | ||||
-rw-r--r-- | jvmfwk/source/elements.cxx | 3 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 12 |
3 files changed, 6 insertions, 16 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 214a50137dd8..a3db87f687ad 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -162,10 +162,9 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info) } OUString sVendorData = buf.makeStringAndClear(); - rtl::ByteSequence byteSeq( reinterpret_cast<sal_Int8*>(sVendorData.pData->buffer), - sVendorData.getLength() * sizeof(sal_Unicode)); - pInfo->arVendorData = byteSeq.get(); - rtl_byte_sequence_acquire(pInfo->arVendorData); + pInfo->arVendorData = rtl::ByteSequence( + reinterpret_cast<sal_Int8*>(sVendorData.pData->buffer), + sVendorData.getLength() * sizeof(sal_Unicode)); return pInfo; } diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 8c6d590283e3..639e935b723f 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -984,8 +984,7 @@ JavaInfo * CNodeJavaInfo::makeJavaInfo() const pInfo->sVersion = sVersion; pInfo->nFeatures = nFeatures; pInfo->nRequirements = nRequirements; - pInfo->arVendorData = arVendorData.getHandle(); - rtl_byte_sequence_acquire(pInfo->arVendorData); + pInfo->arVendorData = arVendorData; return pInfo; } diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index a6cac212bd67..6f9c45584d94 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -630,13 +630,12 @@ bool jfw_areEqualJavaInfo(JavaInfo const * pInfoA,JavaInfo const * pInfoB) return true; if (pInfoA == nullptr || pInfoB == nullptr) return false; - rtl::ByteSequence sData(pInfoA->arVendorData); if (pInfoA->sVendor == pInfoB->sVendor && pInfoA->sLocation == pInfoB->sLocation && pInfoA->sVersion == pInfoB->sVersion && pInfoA->nFeatures == pInfoB->nFeatures && pInfoA->nRequirements == pInfoB->nRequirements - && sData == pInfoB->arVendorData) + && pInfoA->arVendorData == pInfoB->arVendorData) { return true; } @@ -646,9 +645,6 @@ bool jfw_areEqualJavaInfo(JavaInfo const * pInfoA,JavaInfo const * pInfoB) void jfw_freeJavaInfo(JavaInfo *pInfo) { - if (pInfo == nullptr) - return; - rtl_byte_sequence_release(pInfo->arVendorData); delete pInfo; } @@ -1073,11 +1069,7 @@ CJavaInfo::~CJavaInfo() JavaInfo * CJavaInfo::copyJavaInfo(const JavaInfo * pInfo) { - if (pInfo == nullptr) - return nullptr; - JavaInfo* newInfo = new JavaInfo(*pInfo); - rtl_byte_sequence_acquire(newInfo->arVendorData); - return newInfo; + return pInfo == nullptr ? nullptr : new JavaInfo(*pInfo); } |