summaryrefslogtreecommitdiff
path: root/jvmfwk
AgeCommit message (Collapse)Author
2018-02-15Find Java 9 with the new registry keys on Windowscp-5.3-40Stephan Bergmann
See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37- 4D12-AB10-49F82F720027> section "Windows Registry Key Changes". Reviewed-on: https://gerrit.libreoffice.org/49792 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7) Conflicts: jvmfwk/plugins/sunmajor/pluginlib/util.cxx Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138 Reviewed-on: https://gerrit.libreoffice.org/49822 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-09-01tdf#100501: Adapt to Java 9 (at least on Linux x86-64)Stephan Bergmann
Checking with both jdk-9+181_linux-x64_bin.tar.gz and jre-9+181_linux-x64_bin.tar.gz as currently available at <http://jdk.java.net/9/> "JDK 9 Early-Access Builds": For one, make SunVersion::init understand <http://openjdk.java.net/jeps/223> "JEP 223: New Version-String Scheme" at least insofar as to accept strings like "9" with less than three dot-separated segments (where the missing segments are treated like "0"). For another, at least for Linux x86-64, libjvm.so is now apparently located in a path without an "amd64" architecture segment, "lib/server/libjvm.so". (But could that also be "client"?) Other platforms may need further adjustments. (cherry picked from commit 52ffad9bb7be800790de6d918154dbeade88cadd, plus cda4cea7cdfc9a8de814b901b3b957f029d36aaf "tdf#100501: Fix thinko") Reviewed-on: https://gerrit.libreoffice.org/41678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit c83aec1d026b9567e7e6d982e4d19f3a566b66d2) Change-Id: Idcebc833472c81a1dc74dcdd481b0a37274a8713 Reviewed-on: https://gerrit.libreoffice.org/41700 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit a2fb0739bd1a9823f9b52f8efabae0bcf9ff6b0c)
2017-03-24jvmfwk: fix JVM detection on 64-bit WindowsMichael Stahl
_WIN32 is also defined on 64-bit Windows so reorder these ifdefs. Should i be surprised that this breaks several dbaccess tests for me but all tinderboxes are green? (regression from 9143dd4ebe37b608e43d04434cf831624bf55b65) Change-Id: Id917952d3135768355af711688ff70bf6c019a6e (cherry picked from commit 2aa20cfb7a11dd8d86372af4065a5887a0b752ca) Reviewed-on: https://gerrit.libreoffice.org/35530 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c78d39066ace32e0324365bcf10882aa6e976a03)
2017-03-16Related tdf#54443 List only matching JREsSamuel Mehrbrodt
I.e. show only 64bit JRE for 64bit LO and 32bit JRE for 32bit LO Change-Id: Id5e890637c7e1014bcb4e6fdd9ed9a33765112d5 Reviewed-on: https://gerrit.libreoffice.org/35026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 9143dd4ebe37b608e43d04434cf831624bf55b65) Reviewed-on: https://gerrit.libreoffice.org/35162 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit c8f0a37ff804e6329b21a4b7bfabb0667263c6e5)
2017-03-01Make JVM -Xrunjdwp option work on macOSStephan Bergmann
I hope loading the jvm library as SAL_LOADMODULE_GLOBAL has no negative consequences (at least, there is prior art in the LINUX case already). Change-Id: If18b65bd96f7205fdf9fd41389e64e786c15af16 (cherry picked from commit f21994e7a240563283b7a17dcb435ce7c5156b60) Reviewed-on: https://gerrit.libreoffice.org/34676 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 90c7d328f3fca95f140affb5dd83622ae3b988c9)
2016-11-16Fix regression in bubbleSortVersionStephan Bergmann
...introduced with 789055bc2acb4c71483fd60ea258d158bd5aec10 "clang-tidy performance-unnecessary-copy-initialization" (so partially revert it). Whatever clang-tidy erroneously reported there, cur and next are lvalue references into vec, so this attempted copy now actually overwrote one with the other. The result was that if multiple JREs are detected on the system, "Options - LibreOffice - Advanced" would list a single one multiple times. Change-Id: I7ef454c0f37669722812383848602dc2bacf7cd1
2016-11-16Clean up jfw_findAllJREs return value computationStephan Bergmann
Change-Id: Iace2281ec4b5cfaa6e1de44b58a6705ca3a18c58
2016-11-08loplugin:unnecessaryvirtual in hwpfilter..rscNoel Grandin
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868 Reviewed-on: https://gerrit.libreoffice.org/30661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01Clean up javavendors_*.xml filesStephan Bergmann
...and drop unnecessary javavendors_template.xml Change-Id: Ib7f2d595d2086c1d3bf324f19693b9032cf00cd7
2016-11-01quickfix: Automatic selection of Oracle Java runtime on macOSStephan Bergmann
same issue as 36f637f7f21906fa3f37223e69b044db52036fb1 "tdf#103507 quickfix: Automatic selection of Oracle Java runtime on Windows" Change-Id: I3239bbf52263fb53bcd0ed54e8e983bda3b19182
2016-10-28tdf#103507 quickfix: Automatic selection of Oracle Java runtime on WindowsStephan Bergmann
...which had been broken since 5e9a2e9b0f33ab50aa3a84728db75383aede19d9 "Check each potential JRE location only once", as jfw_findAndSelectJRE calls jfw_plugin_getAllJavaInfos on each vendor in turn, but that now only operates on any items newly added by addAllJREInfos, so the first call to jfw_plugin_getAllJavaInfos (with sVendor being "Sun Microsystems Inc." unsuccesfully operated on all items, and the next call (with sVendor being "Oracle Corporation") didn't see any further items to operate on. So the quickfix (at least for any Java runtimes by Oracle) is to reorder the vendors in javavendors_wnt.xml. The proper fix will be to reorder the code so it obtains the list of all Java runtimes only once, and then matches that list against the known vendors. (Other plaforms appear not to be affected by this issue. Some jvmfwk/distributions/OpenOfficeorg/javavendors_*.xml already sort Oracle first, anyway. And e.g. on Linux, jfw_findAndSelectJRE typically already succeeds with calling jfw_plugin_getJavaInfosFromPath and so doesn't reach the problematic code. Change-Id: Ied571ae1d4745d53ce0c8697d0f1b268e1aac407
2016-10-16clang-cl loplugin: jvmfwkStephan Bergmann
Change-Id: I4ae0795469e70d6be3d2052d96a2f0dad3920d8b Reviewed-on: https://gerrit.libreoffice.org/29860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-05(initial) sparc64 portJames Clarke
Change-Id: I8ec9bb5415a9e6b9083ba89a7790872d67625de1
2016-07-22Related: tdf#101057 inherit MalformedVersionException from std::exceptionCaolán McNamara
so we don't get std::terminate on MacOSX if its thrown up to JavaVirtualMachine::getJavaVM Change-Id: I1c6b79bf16cbaa66b8f79d495239e301d3ca58de
2016-07-22Related: tdf#101057 allow java update version number > 99Caolán McNamara
Change-Id: Icc37cf248fbf35f108eb5bbb25c36fbd54a9fe85
2016-07-08loplugin:redundantcast: redundant static_casts in jvmfwkStephan Bergmann
Change-Id: I6aef36bd21043460e74b5e3d478665a35213bb1a
2016-07-04Fix some spelling errors in comments and stringsOtto Kekäläinen
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e Reviewed-on: https://gerrit.libreoffice.org/26883 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-15passing a NULL pointer to fileno is not allowedMarkus Mohrhard
See crash reports at http://crashreport.libreoffice.org/stats/signature/do_msvcr_magic+0x7 and documentation at https://msdn.microsoft.com/en-us/library/zs6wbdhx.aspx Change-Id: Ia9166d3b9fa10b87585821504e39cdfecbd22eda Reviewed-on: https://gerrit.libreoffice.org/26317 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-22Convert javaPluginError to scoped enumNoel Grandin
Change-Id: Ib3a32227d50fa9e0f9cc4106ce40a4c3e840f8c7 Reviewed-on: https://gerrit.libreoffice.org/25206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann
Change-Id: I0dccdf984f4b171feab20e8400376cf8846ffe2e
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-04-30Fix typosAndrea Gelmini
Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73 Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: I65fdd933e2a3973053359024d8d9c733f79a6477
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11tdf#94306 replace boost::noncopyable ...Jochen Nitschke
... in modules editeng to oox. Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes and one unused boost/checked_delete.hpp include in linguistic. Change-Id: I5a38d8e5ac1b4286bdeb3858d56490a53d13fe80 Reviewed-on: https://gerrit.libreoffice.org/23928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-05Values read from the Windows registry shouldn't be assert'edStephan Bergmann
Change-Id: I1a6cc78025790fa22e91ae91dda5644bdc384ca3
2016-03-15tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar
I replaced OSL_ASSERT() with standard C++ assert Change-Id: I92e07d62f3dfe2ad914c49e2b596aef28c35e225 Reviewed-on: https://gerrit.libreoffice.org/23231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-10Fix memory leaksStephan Bergmann
Change-Id: If9f7dc4a28d5e005959f0d4a0a2ed317b699f292
2016-03-10No more need for jfw_freeJavaInfoStephan Bergmann
Change-Id: I2426a76936b4099a243ce8c102da867e7868aac3
2016-03-10Turn JavaInfo sal_Sequence* member into rtl::ByteSequenceStephan Bergmann
Change-Id: Iecd476970b0b7a46afe223f71e95b0010048d7b1
2016-03-10Turn JavaInfo rtl_uString* members into OUStringStephan Bergmann
Change-Id: Ieb23b0c36ef56a4793a56cdb450df34e4d9bce1d
2016-03-10Manage JavaInfo instances via new/deleteStephan Bergmann
Change-Id: I10a113718e525b646c51aa8a19f9f2b75a36714a
2016-03-10No need to repeat SAL_CALL in definitionsStephan Bergmann
Change-Id: Ief75af9d08d9b7e31d821773db2363fa201f3038
2016-03-10No need for extern "C" hereStephan Bergmann
...and fix resulting loplugin:salbool fallout Change-Id: I5ae1497608d31c20b0d10676450a7673dee1c651
2016-03-09include/jvmfwk/*.h -> .hxx (only ever included from C++ code)Stephan Bergmann
Change-Id: Ia912e937d5a48afb6f8f5345b20bb7bd517fc4f1
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06jvmfwk/plugins: clean-up in util.cxxDouglas Mencken
These are some remnants from the-good-old-days of Mac OS X 10.4 support and 2005's commit b8871d23ea14d72ba1a22376e7812ea5840d1084 Change-Id: I9a14aaac94e4a6e4961a2fa9a5020d9cf3a07c9d Reviewed-on: https://gerrit.libreoffice.org/21124 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-11-24cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-17Don't assume sal_Unicode is unsigned shortStephan Bergmann
Change-Id: I0439e40b0843ba9a0939eb47e339f396d26f3c64
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann
Change-Id: Iee5d66a1c14e1583edb0945d23cec9986ce7a830
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I9dfcec9488b2a25e32d3934766d6d4b208a8c2dc
2015-11-09new loplugin: oncevarNoel Grandin
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-05java: combine nested if statementsNoel Grandin
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba