summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-20 17:58:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-20 17:58:44 +0200
commit5dcfbe57c8c35814d0e8e20c7069be340151da8f (patch)
treec5e0a949c00369e20ba3adbc3e3b2120c13e8b73 /jvmfwk
parent454f5c3018c6d61d5872f7c23c7590c2157444e4 (diff)
Clean up VendorBase (virtual) member functions
Change-Id: I1377dfded1246c8e96db3addc28489886c7f2d99
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx1
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx1
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx20
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx36
5 files changed, 23 insertions, 39 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx
index 2c2b1b76e58b..d95a9a48afd1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx
@@ -34,7 +34,6 @@ public:
static rtl::Reference<VendorBase> createInstance();
- using VendorBase::getLibraryPaths;
virtual char const* const* getRuntimePaths(int * size) SAL_OVERRIDE;
virtual char const* const* getLibraryPaths(int* size) SAL_OVERRIDE;
virtual int compareVersions(const OUString& sSecond) const SAL_OVERRIDE;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index db58c547e7c4..3d4e3f431a24 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -157,10 +157,10 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
pInfo->nRequirements = info->needsRestart() ? JFW_REQUIRE_NEEDRESTART : 0;
OUStringBuffer buf(1024);
buf.append(info->getRuntimeLibrary());
- if (!info->getLibraryPaths().isEmpty())
+ if (!info->getLibraryPath().isEmpty())
{
buf.appendAscii("\n");
- buf.append(info->getLibraryPaths());
+ buf.append(info->getLibraryPath());
buf.appendAscii("\n");
}
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx
index a25a8e5e3e79..1d63794cc265 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx
@@ -33,7 +33,6 @@ public:
static rtl::Reference<VendorBase> createInstance();
- using VendorBase::getLibraryPaths;
virtual char const* const* getRuntimePaths(int * size) SAL_OVERRIDE;
virtual char const* const* getLibraryPaths(int* size) SAL_OVERRIDE;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index c72ac27660ae..563c850b9f77 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -54,12 +54,6 @@ VendorBase::VendorBase(): m_bAccessibility(false)
{
}
-rtl::Reference<VendorBase> VendorBase::createInstance()
-{
- VendorBase *pBase = new VendorBase();
- return rtl::Reference<VendorBase>(pBase);
-}
-
bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
{
//get java.vendor, java.version, java.home,
@@ -209,7 +203,7 @@ const OUString & VendorBase::getHome() const
return m_sHome;
}
-const OUString & VendorBase::getLibraryPaths() const
+const OUString & VendorBase::getLibraryPath() const
{
return m_sLD_LIBRARY_PATH;
}
@@ -225,21 +219,11 @@ bool VendorBase::supportsAccessibility() const
bool VendorBase::needsRestart() const
{
- if (!getLibraryPaths().isEmpty())
+ if (!getLibraryPath().isEmpty())
return true;
return false;
}
-int VendorBase::compareVersions(const OUString& /*sSecond*/) const
-{
- OSL_FAIL("[Java framework] VendorBase::compareVersions must be "
- "overridden in derived class.");
- return 0;
-}
-
-
-
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
index 29f264143f56..721017377964 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
@@ -88,7 +88,9 @@ class VendorBase: public salhelper::SimpleReferenceObject
{
public:
VendorBase();
- /* returns relative paths to the java executable as
+ /* static char const* const * getJavaExePaths(int* size);
+
+ returns relative paths to the java executable as
file URLs.
For example "bin/java.exe". You need
@@ -103,9 +105,10 @@ public:
The signature of this function must correspond to
getJavaExePaths_func.
*/
- static char const* const * getJavaExePaths(int* size);
- /* creates an instance of this class. MUST be overridden
+ /* static rtl::Reference<VendorBase> createInstance();
+
+ creates an instance of this class. MUST be overridden
in a derived class.
####################################################
OVERRIDE in derived class
@@ -113,7 +116,6 @@ public:
@param
Key - value pairs of the system properties of the JRE.
*/
- static rtl::Reference<VendorBase> createInstance();
/* called automatically on the instance created by createInstance.
@@ -132,18 +134,18 @@ public:
virtual char const* const* getLibraryPaths(int* size);
- virtual const OUString & getVendor() const;
- virtual const OUString & getVersion() const;
- virtual const OUString & getHome() const;
- virtual const OUString & getRuntimeLibrary() const;
- virtual const OUString & getLibraryPaths() const;
- virtual bool supportsAccessibility() const;
- /* determines if prior to running java something has to be done,
- like setting the LD_LIBRARY_PATH. This implementation checks
- if an LD_LIBRARY_PATH (getLD_LIBRARY_PATH) needs to be set and
- if so, needsRestart returns true.
- */
- virtual bool needsRestart() const;
+ const OUString & getVendor() const;
+ const OUString & getVersion() const;
+ const OUString & getHome() const;
+ const OUString & getRuntimeLibrary() const;
+ const OUString & getLibraryPath() const;
+ bool supportsAccessibility() const;
+ /* determines if prior to running java something has to be done,
+ like setting the LD_LIBRARY_PATH. This implementation checks
+ if an LD_LIBRARY_PATH (getLD_LIBRARY_PATH) needs to be set and
+ if so, needsRestart returns true.
+ */
+ bool needsRestart() const;
/* compares versions of this vendor. MUST be overridden
in a derived class.
@@ -158,7 +160,7 @@ public:
@throw
MalformedVersionException if the version string was not recognized.
*/
- virtual int compareVersions(const OUString& sSecond) const;
+ virtual int compareVersions(const OUString& sSecond) const = 0;
protected: