[Libreoffice-commits] core.git: jvmfwk/plugins

Stephan Bergmann sbergman at redhat.com
Mon Mar 13 16:44:27 UTC 2017


 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

New commits:
commit 849c82495e838afb09c3c0d63fa506a7f3e2a82c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Mar 13 17:43:38 2017 +0100

    Unnecessary OUString instances
    
    Change-Id: I81a59c7847e2109198a35cbdb49f5bcf3505c4ba

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index ef9da17..cb8063e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -59,11 +59,6 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
     //javax.accessibility.assistive_technologies from system properties
 
     typedef vector<pair<OUString, OUString> >::const_iterator it_prop;
-    OUString sVendorProperty("java.vendor");
-    OUString sVersionProperty("java.version");
-    OUString sHomeProperty("java.home");
-    OUString sArchProperty("os.arch");
-    OUString sAccessProperty("javax.accessibility.assistive_technologies");
 
     bool bVersion = false;
     bool bVendor = false;
@@ -74,17 +69,17 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
     typedef vector<pair<OUString, OUString> >::const_iterator it_prop;
     for (it_prop i = props.begin(); i != props.end(); ++i)
     {
-        if(! bVendor && sVendorProperty.equals(i->first))
+        if(! bVendor && i->first == "java.vendor")
         {
             m_sVendor = i->second;
             bVendor = true;
         }
-        else if (!bVersion && sVersionProperty.equals(i->first))
+        else if (!bVersion && i->first == "java.version")
         {
             m_sVersion = i->second;
             bVersion = true;
         }
-        else if (!bHome && sHomeProperty.equals(i->first))
+        else if (!bHome && i->first == "java.home")
         {
 #ifndef JVM_ONE_PATH_CHECK
            OUString fileURL;
@@ -105,12 +100,13 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
            bHome = true;
 #endif
         }
-        else if (!bArch && sArchProperty.equals(i->first))
+        else if (!bArch && i->first == "os.arch")
         {
             m_sArch = i->second;
             bArch = true;
         }
-        else if (!bAccess && sAccessProperty.equals(i->first))
+        else if (!bAccess
+                 && i->first == "javax.accessibility.assistive_technologies")
         {
             if (!i->second.isEmpty())
             {


More information about the Libreoffice-commits mailing list