summaryrefslogtreecommitdiff
path: root/javaunohelper
AgeCommit message (Collapse)AuthorFilesLines
2015-01-20Some more loplugin:cstylecast: javaunohelperStephan Bergmann3-15/+15
Change-Id: If0728af19ba48896678cc3196c922185e403a885
2015-01-09java: simplify array creationNoel Grandin1-7/+7
and remove the need to worry about keeping indexes correct Change-Id: I9a5fc00f7e28f305279b41099274c96daebebb95
2015-01-09fix indexesCaolán McNamara1-3/+3
Change-Id: I99d3a715cce203eb2303c76da3b20e6d853a9d23
2015-01-07drop crashrep unused since start of LibreOfficeCaolán McNamara1-1/+0
Change-Id: I3df1216054c133314b2317849744a0a37e9fbc8f Reviewed-on: https://gerrit.libreoffice.org/13733 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-07javaunohelper: missing includeMiklos Vajna1-0/+1
Change-Id: Ie8427e9ad7a2a03d6698ee95ce0f11fb458c00e3
2015-01-07WaE: -Werror=unused-variable with #define DISABLE_DYNLOADINGCaolán McNamara1-8/+7
and also a leak in that mode with a missing ReleaseStringChars after GetStringChars in one use, and a use after free in the other use where ReleaseStringChars is called Change-Id: I2da0310429daf8519554fd7aaf47bba9f6f0e85c
2015-01-05java: remove more dead codeNoel Grandin1-2/+2
found by looking for unused parameters (in Eclipse) Change-Id: I03cf9bc8312e59747b2d0ac153ee2fc8d76be893
2015-01-05java: remove dead codeNoel Grandin3-8/+0
found by UCDetector Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
2014-12-19java: reduce visibility of some methods and fieldsNoel Grandin1-1/+1
found by UCDetector Change-Id: I0a0a00d1fae1fed2e6aef198b7a1482d7e7e29f0
2014-12-16java: remove OOoRunnerLightNoel Grandin1-1/+1
and just use OOoRunner, there is no point in having a stripped down jar, the cost of firing up the Java VM completely dwarfs any benefit of having a smaller jar. Change-Id: Ibcc3c5bd6e9b9c918041142dd32db0ea5dddc25b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-12-15java: remove some unused fields and variablesNoel Grandin3-3/+3
Change-Id: I5d6071096307adbe7df0178000346cf915afa3e7 Reviewed-on: https://gerrit.libreoffice.org/13477 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-15silence coverity#705667 Resource leakCaolán McNamara1-9/+7
still leaks on usual success case of course Change-Id: Ia6e0f61b5a08271c03690bbb1c0af59081bea663
2014-12-15stronger checks when creating Java UNO componentsNoel Grandin1-9/+41
check the visibility of construction method at load time for Java UNO components. This means that we get more informative errors at startup, instead of failures much later on when we actually create the component. Change-Id: I08cd16875cf53cfeeef7e8954ecd0d3177d70eb5 Reviewed-on: https://gerrit.libreoffice.org/13446 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-11java: remove some unnecessary interfacesNoel Grandin1-4/+1
Change-Id: Ie2da7cbbd1733881ff2da6fa095c37c21cf19fe8 Reviewed-on: https://gerrit.libreoffice.org/13435 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-11java: reduce visibility of fields and methodsNoel Grandin1-2/+2
found by PMD Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6 Reviewed-on: https://gerrit.libreoffice.org/13409 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-10java: improve use of WrappedTargetException to set cause properlyNoel Grandin2-6/+6
since we introduced the new constructors that pass the cause all the way up to java.lang.Throwable. Also simplify some exeception printing sites, because Throwable will correctly print out child exceptions for us. Change-Id: Ibbecce3c6f971fbc80d6de2052ab4f33a4503c0a
2014-12-03Fold URE: WindowsStephan Bergmann1-2/+1
...assuming the delayLoadHook in cli_ure/source/native/native_bootstrap.cxx is no longer necessary and loading of cppuhelper from the program dir cannot fail regardless in whatever scenario the cli_cppuhelper library itself is loaded. Change-Id: I13f32b327bca4cce9780864f5e57cdad3860afe5
2014-11-28Fold URE: Linux ure/share/java/* -> program/classes/Stephan Bergmann1-1/+1
Change-Id: I86864f832c0377d307cfa0b2c137f452e43797eb
2014-11-28Fold URE: Linux ure/lib/* -> program/Stephan Bergmann1-1/+6
The ../../../program/ links in the URE jar Class-Paths are a temporary kludge (and juh.jar had lacked adaption for Mac OS X). Change-Id: I2542d8a582866485dd61c05df3fc6b4b39a8403d
2014-11-25java: remove some comment noiseNoel Grandin2-14/+0
Change-Id: I1c258b853097448d4a59334d915e94dba4c7eb34
2014-11-25java: final fields that can be staticNoel Grandin1-1/+1
found by PMD Change-Id: I2b48f35d252d6e914c2a18a2c175b075a9d3ac0f Reviewed-on: https://gerrit.libreoffice.org/13099 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-18java: remove some unnecessary castsNoel Grandin1-38/+38
Change-Id: I30f316ee87bd8fe4bc56f6e928fb36d3ab0c8e94
2014-11-18java: make fields final where possibleNoel Grandin8-16/+16
found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini2-2/+2
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12java: reduce excessive code indentation levelsNoel Grandin1-92/+93
by using early return in some methods Change-Id: I3611c8c89b3a94ef7e1772d178acf065fd7fcdc7 Reviewed-on: https://gerrit.libreoffice.org/12374 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-30coverity#705665 osl_Module->osl::ModuleCaolán McNamara1-11/+13
and coverity#705666 Resource leak still actually fails to dlclose module, but explicitly does that Change-Id: Idbf5608b052e3a7c5a465a73d8ad067a0a9494c5
2014-10-18javaunohelper: remove unused importRobert Antoni Buj i Gelonch1-1/+2
Change-Id: Ibee790a50e35219a8427b7037331943b778292a2 Reviewed-on: https://gerrit.libreoffice.org/11997 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-17java: final fields that can be staticNoel Grandin2-2/+2
Change-Id: I8c06be7bc0b8a38c662209f0de72a00550e25447
2014-10-16java: when rethrowing, store the original exceptionNoel Grandin5-56/+31
Change-Id: I34ce000c48d2d79bfec854c8dd55d12f2bee29c7
2014-10-16java: always use braces for while loopsNoel Grandin3-6/+12
Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce
2014-10-16java: reduce the depth of some deeply nested if blocksNoel Grandin1-62/+67
Change-Id: I3c0c7f08d4d8ea594e72fc0d9b93d085d4ab4bf5
2014-10-13java: import from the same packageRobert Antoni Buj i Gelonch1-1/+0
Change-Id: I1bb0999783f365e20b682c3707e73c65724265c9 Reviewed-on: https://gerrit.libreoffice.org/11955 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-07java: no need to check for null before calling instanceofNoel Grandin1-1/+1
the instanceof check returns false when passed a null value Change-Id: I7742d0d9cf25ef23d9adee7328f701c7efeea8b5
2014-10-02javaunohelper: More robust way to wait for finalizationRobert Antoni Buj i Gelonch1-9/+5
Change-Id: I09fa2462d8131381f380574b8a9aeaf080211b2b Reviewed-on: https://gerrit.libreoffice.org/11759 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-02More robust way to wait for finalizationStephan Bergmann2-7/+5
Change-Id: I99aa3ac27c5157a6858978da20e480bc9847d88f
2014-09-29loplugin: cstylecastNoel Grandin1-2/+2
Change-Id: I53b69a488c70769cbb841db519bc28fd211dc087
2014-09-29fix more Java1.5 incompatibilityNoel Grandin2-31/+53
Change-Id: I9c4d62e4d3703e4e1015efe2b2917d54f82bc83f
2014-09-28javaunohelper: migrate PropertySet_Test to JUnitRobert Antoni Buj i Gelonch2-1175/+1204
$ make JunitTest_juh Change-Id: Ie6ed5070db01d8c183ddaae1852117667eae02f3 Reviewed-on: https://gerrit.libreoffice.org/11668 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-25java: when rethrowing exceptions, store the original causeNoel Grandin7-27/+34
so that we get a nice complete stacktrace when it hits the final handler Change-Id: Iec4fcc15a2a25c55f591b5e069dce3d010197a90
2014-09-24javaunohelper: WeakBase_Test & MultiTypeInterfaceContainer_Test -> JUnitRobert Antoni Buj i Gelonch4-219/+100
Integrate WeakBase_Test and MultiTypeInterfaceContainer_Test in juh tests. Remove unused import in InterfaceContainer_Test. Remove getImplementationId() test in WeakBase_Test. Deprecated as of the commit: 90b27c9493f4225e1612364b5813971b45b681a6 $ make JunitTest_juh Change-Id: I1205c001e7f15bc5a28289051194fb225e114f13 Reviewed-on: https://gerrit.libreoffice.org/11630 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2014-09-24javaunohelper: migrate InterfaceContainer_Test to JUnitRobert Antoni Buj i Gelonch3-476/+249
integrate InterfaceContainer_Test in juh tests use java.util.logging in ComponentContext_Test $ make JunitTest_juh Change-Id: I92a855f8dea4bc893bb65e23e57ea4b12f59a31d Reviewed-on: https://gerrit.libreoffice.org/11615 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-23javaunohelper: migrate ComponentBase_Test to JUnitRobert Antoni Buj i Gelonch4-88/+74
Use -XX:MaxGCPauseMillis=50 in conjunction with Thread.sleep(51) to wait 51ms after a GC call, instead of waiting 10s. http://docs.oracle.com/javase/1.5.0/docs/guide/vm/gc-ergonomics.html $ make JunitTest_juh Change-Id: Id2cdada0e493fd450aab5dbec164502e0173857f Reviewed-on: https://gerrit.libreoffice.org/11593 Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2014-09-23javaunohelper: Using "final" modifier whenever applicable in javaRobert Antoni Buj i Gelonch6-6/+5
All classes that belongs to the com.sun.star.lib.uno.adapter package are not part of the stable URE interface. (cf. <http://api.libreoffice.org/docs/java/ref/index.html>), for that reason those classes may be final. Remove unused import in com.sun.star.comp.helper.ComponentContext class. Change-Id: I68be8da4324f5163505e65365bf49a6a9cd00672 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-22javaunohelper: migrate ComponentContext_Test to JUnitRobert Antoni Buj i Gelonch3-53/+68
$ make JunitTest_juh_ComponentContext Change-Id: Ibcd8ed7b1da7da82593e51b6f25a53763e9455f7 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-22javaunohelper: Using "final" modifier whenever applicable in javaRobert Antoni Buj i Gelonch2-2/+2
* com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter class may be final. There is a overridable method call in the constructor. * Private methods can't be overridden. The private method "instantiate" is declared final in the com.sun.star.lib.uno.helper.Factory class. Change-Id: I7dba78a3d1857bbc328f6a581d8e9a5ae130739d Reviewed-on: https://gerrit.libreoffice.org/11546 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-21javaunohelper: use java.util.logging in testsRobert Antoni Buj i Gelonch6-301/+168
Change-Id: Icdc61dc88a11afae5257bcddda32adb691cb5883 Reviewed-on: https://gerrit.libreoffice.org/11564 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-09-19javaunohelper: use HashMap instead of Hashtable CollectionRobert Antoni Buj i Gelonch3-15/+20
Change-Id: I04e3245342a83df762fbec35a1523021a021f896 Reviewed-on: https://gerrit.libreoffice.org/11547 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-15javaunohelper: warning: unchecked castrbuj1-4/+4
Change-Id: I7c47e3a8657ec2368543088743879085878d78fb Reviewed-on: https://gerrit.libreoffice.org/11444 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-13javaunohelper: use a character literalrbuj1-1/+1
Change-Id: Ib0a69ac4714cd694ccd6a9bea87e32c1aadb0428 Reviewed-on: https://gerrit.libreoffice.org/11433 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-09-13javaunohelper: use String.length()==0 instead of String.equals(empty string)rbuj2-2/+2
Change-Id: Ic738dbbee4ce972ebf7efcfda33ccbb3f3ac48ff Reviewed-on: https://gerrit.libreoffice.org/11432 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>