summaryrefslogtreecommitdiff
path: root/javaunohelper
AgeCommit message (Collapse)AuthorFilesLines
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>
2014-09-09javaunohelper: fix some misspellingsrbuj5-17/+17
Change-Id: Ibfa6e6ed2a4b4d3fa4b5e5cf624e42442653d358 Reviewed-on: https://gerrit.libreoffice.org/11363 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-09-07javaunohelper: fix javadoc error: unknown tag: attention (Doxygen)rbuj1-2/+3
Change-Id: Idd1d92699cab0ccb26b95e9d5392c6fc7a8a2aa6 Reviewed-on: https://gerrit.libreoffice.org/11308 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-02javaunohelper: fix javadoc error: unknown tag: returnsrbuj1-1/+1
Change-Id: I2cd47bd928da322be6c392d65d2a04152553fbef Reviewed-on: https://gerrit.libreoffice.org/11246 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-08-20java: remove unnecessary constructor declarationsNoel Grandin5-23/+0
in the absence of any other constructors, the compiler will automatically generate a public no-arg constructor Change-Id: I70eca507cd8e16e33580b3398d41d70690bc2909
2014-08-20java: avoid if..else when returning boolean valuesNoel Grandin1-8/+2
Change-Id: Iab52762a9abfe8735223372b09638ce9d8d44318
2014-08-20java: avoid unnecessary comparisons in boolean expressionsNoel Grandin10-42/+42
i.e. stuff like "x == true" Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
2014-08-20double-checked locking is not thread-safe in JavaNoel Grandin1-8/+2
found by PMD Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
2014-08-19java: no need to instantiate String objects directlyNoel Grandin1-6/+6
Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03
2014-08-19java: use 'Byte.valueOf' instead of 'new Byte'Noel Grandin2-25/+25
Change-Id: Ia99765a6226317ee41ffb02a1b0dd7e6fd944a90
2014-08-19java: use 'Short.valueOf' instead of 'new Short'Noel Grandin2-12/+12
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
2014-08-19java: use 'Long.valueOf' instead of 'new Long'Noel Grandin2-12/+12
Change-Id: If4fff3dd37326fbcdd01b743355a16591d71fa69
2014-08-19java: use 'Integer.valueOf' instead of 'new Integer'Noel Grandin3-30/+30
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
2014-08-19java: use Boolean.valueOf instead of instantiating Boolean objectsNoel Grandin3-23/+23
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19java: classes in java.lang package do not need to be fully qualifiedNoel Grandin1-6/+6
Change-Id: I7b18f62336c3a8ca4c538b30ce04c99f202a4756
2014-08-16javaunohelper: The assigned value is sometimes usedrbuj1-2/+5
Change-Id: I292921ef5b98ffbae9a0d5b631498a2d6efefbfd Reviewed-on: https://gerrit.libreoffice.org/10941 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-08-14java: remove useless instanceof testsNoel Grandin1-2/+2
Change-Id: Idb058179f90ddbe5157d564ed5f9c9168898fb0c
2014-08-14java: remove commented out codeNoel Grandin2-5/+0
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
2014-08-12javaunohelper: Fix Bootstrap_Test.java & add warning messagesrbuj1-4/+8
Accept bootstrap parameters that contained more than one = Reject empty key Change-Id: Ie04364867d56d5687cbbc2c142ea73be90bbafdf Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-08-12java: add @Override annotation to overriding methodsNoel Grandin7-0/+19
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
2014-08-11javaunohelper: enhancements in decodeUTF8rbuj1-10/+5
Change-Id: I452dbd54251eea683d307c346dc4949a42eedc30 Reviewed-on: https://gerrit.libreoffice.org/10862 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-11javaunohelper: Number parsingrbuj1-31/+35
Change-Id: Ie6856ea4c196479aef1ce00a7cf2709fea8b3e42 Reviewed-on: https://gerrit.libreoffice.org/10860 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-10javaunohelper: Iterate over each Entry in a Map & Enhanced for-loopsrbuj1-8/+4
Change-Id: I7abd62e0717bfc9c9b36a431092ddd92ef72684a Reviewed-on: https://gerrit.libreoffice.org/10852 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-10javaunohelper: Enhancement loading bootstrap_parameters in Bootstrap_Test.javarbuj1-7/+10
Change-Id: I685fc278ec812d766ff83993d234ca3261a71dba Reviewed-on: https://gerrit.libreoffice.org/10850 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>