summaryrefslogtreecommitdiff
path: root/xmerge
AgeCommit message (Collapse)AuthorFilesLines
2015-11-27CID#1326472, CID#1326473, CID#1326474 use try/finalizejan iversen1-108/+102
Coverity requires that closeable objects (use of new) call .close(), git commit 5a29db7a9945c4cd095799451a6c563d5aeeed57 implemented a series of .close etc calls, update to use a single try{}finalize{} instead. Change-Id: Iadc9de13d6a0af4b0aaca2dfdd0e2d0940a5223d Reviewed-on: https://gerrit.libreoffice.org/19807 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-11-05java: remove ((unnecessary)) parenthesesNoel Grandin9-11/+11
Change-Id: I39fbe3a260c8dbfc203662c54eec4db064b88195
2015-11-05java: combine nested if statementsNoel Grandin5-48/+27
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba
2015-11-04Solved CID 1326472, 1326473, 1326474jan iversen1-1/+19
Coverity requires that allocated objects (use of new) are directly release, by foo = null; The gc will do this automatically at some point in time, so this will simply release the resource a bit earlier, which can save problems if the function is called in a tight loop. Updated to add close() before clearing the variable, this would normally be done by gc, but now a bit earlier. The assignment to null is not needed specifically, but Coverity calls it a leak if not assigned. Forgot .close(); Change-Id: Id273e7f36778c1691b260d28e741c6e32148c9d9
2015-11-04Mechanically sanitize indentationStephan Bergmann1-357/+328
Change-Id: Ide8817aff3a6b5d07b56b54cecb36f7dc1407743
2015-10-28coverity#1326258 Explicit null dereferencedCaolán McNamara1-2/+2
Change-Id: I58b07353f4dca7fc24305bd0120ed7db18339e83
2015-10-28coverity#1326465 Dereference null return valueCaolán McNamara1-3/+5
Change-Id: I0bb704e3f49444c7b377ac22acb52cf2dd58325f
2015-10-25coverity#1326117 Unchecked return valueCaolán McNamara1-2/+5
Change-Id: I448f59fd43d90d3ad42ba55dbadee0664984e53a
2015-10-20coverity#1326242 Dereference after null checkCaolán McNamara1-12/+0
Change-Id: I827e6967938114946193f34d7102ff9cd132a1a9
2015-10-15coverity#1326266 Explicit null dereferencedCaolán McNamara1-26/+15
Change-Id: Ic6971a9006f82528a9943f8d425389545403162a
2015-10-15coverity#1326237 Explicit null dereferencedCaolán McNamara1-2/+2
Change-Id: Ic3ab796da48e28efaf1628f28b8632dd00c041b2
2015-10-15coverity#1326285 Dereference after null checkCaolán McNamara1-5/+2
Change-Id: I20c0cf4ad14252fdbf9a73c7675a0704e8a03823
2015-10-15coverity#1327172 UrF: Unread fieldCaolán McNamara1-6/+2
Change-Id: Iad3c349b3f66a5bba281b33de9ca689dd5015a83
2015-10-15cid#1326571 and cid#1326572 Unused valueNoel Grandin1-2/+0
Change-Id: I0e984135a5abf918ba556c700ffa111097fd48c1
2015-10-15coverity#1326899 HE: Equal objects must have equal hashcodesCaolán McNamara3-3/+20
and... coverity#1326898 HE: Equal objects must have equal hashcodes coverity#1326897 HE: Equal objects must have equal hashcodes coverity#1326896 HE: Equal objects must have equal hashcodes coverity#1326895 HE: Equal objects must have equal hashcodes Change-Id: Ic9cb7542c1bf0608a97e5b4756b737cdf1bb4bd8
2015-10-15cid#1326117 Unchecked return valueNoel Grandin1-1/+4
Change-Id: Ieaa1875a8731b5339d4ebf032b3f724ff889903f
2015-10-15cid#1327023 to cid#1327077 SIC: Inner class could be made staticNoel Grandin1-1/+1
Change-Id: I41f89c4feefe4e012d72c663ebb9bbcb4aa7f163
2015-10-14cid#1326716,cid#1326717 DLS: Dead local storeNoel Grandin1-13/+4
and clean up the method a little Change-Id: Iaa27bcd20a5b5b1b2b14f277371c5a013ae5d339
2015-10-14cid#1326608,cid#1326609 CN: Bad implementation of cloneable idiomNoel Grandin1-1/+1
Change-Id: Iac74be96b47720ab105f862e7d1a69f909214294
2015-09-29Fix typosAndrea Gelmini1-1/+1
Change-Id: If2e4adb2ce93c02ee14d831eedf4ef31da04b92d Reviewed-on: https://gerrit.libreoffice.org/18996 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-07-03Fix typosAndrea Gelmini1-1/+1
Change-Id: I98b4dfb0f72f315065693335e2f882bb2eed3afe Reviewed-on: https://gerrit.libreoffice.org/16713 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-06-23Revert "Typo: iff->if"Julien Nabet1-2/+2
This reverts commit cf92da3d6e1de14756efe3f1ee79f393a2f3787d. iff can mean "if and only if" so not a typo
2015-06-23Typo: iff->ifJulien Nabet1-2/+2
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-15java: 'final static' to 'static final'Noel Grandin7-27/+27
this is the canonical order, and it makes the code easier to read Change-Id: I272e7f1e140296e582702b6dbf77a03eefb65470 Reviewed-on: https://gerrit.libreoffice.org/16242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2015-06-11java:regulatize the order of 'final' and public/privateNoel Grandin1-2/+2
Make the order be 'public static' or 'private static' Just makes the code nicer to read. Change-Id: I182424bda45a2d68642e5d04c6091d268ace1fe2 Reviewed-on: https://gerrit.libreoffice.org/16202 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin2-8/+8
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2014-12-19xmerge: store the original exception in the cause field properlyNoel Grandin1-13/+12
Change-Id: I154b8b80aabd824edc62a7fdd831074fcf5cb21b
2014-12-12java: fix non-public UNO implementation classesNoel Grandin1-1/+1
which I messed up in commit 70f56bc22fe952c "java: reduce scope, make member classes private" Change-Id: I817b2a571e2124f551ccd5c0d8e1099d89f0ec46
2014-12-11java: reduce visibility of fields and methodsNoel Grandin8-16/+16
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-11-18java: make fields final where possibleNoel Grandin23-49/+49
found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini2-5/+5
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: convert fields to local variables where possibleNoel Grandin1-2/+1
found by PMD Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542 Reviewed-on: https://gerrit.libreoffice.org/12376 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12java: reduce excessive code indentation levelsNoel Grandin3-52/+57
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-18xmerge: use java.nio.ByteBuffer (JDK 1.4+)Robert Antoni Buj i Gelonch1-52/+16
Change-Id: I6072bb4699c9cd361e0cfe0a12b46cfc1abfe368 Reviewed-on: https://gerrit.libreoffice.org/11998 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-16java: when rethrowing, store the original exceptionNoel Grandin5-22/+23
Change-Id: I34ce000c48d2d79bfec854c8dd55d12f2bee29c7
2014-10-16xmerge: use String.formatRobert Antoni Buj i Gelonch2-38/+14
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#format(java.lang.String, java.lang.Object...) Change-Id: I98b7fca9dee870c9a1d0f9842cbb009a13537967 Reviewed-on: https://gerrit.libreoffice.org/11995 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-16java: ensure that the stream is cleaned up before the method returnsRobert Antoni Buj i Gelonch2-50/+59
Change-Id: Id3efeda2fd66173ba2f5662eaacb3629da54573d Reviewed-on: https://gerrit.libreoffice.org/11991 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-16java: always use braces for while loopsNoel Grandin2-2/+4
Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce
2014-10-16java: reduce the depth of some deeply nested if blocksNoel Grandin1-20/+12
Change-Id: I3c0c7f08d4d8ea594e72fc0d9b93d085d4ab4bf5
2014-10-13java: import from the same packageRobert Antoni Buj i Gelonch1-2/+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-13xmerge: ensure that the stream is cleaned up before the method returnsRobert Antoni Buj i Gelonch1-0/+7
Change-Id: I377ae1a7b71c207313ad3468a51b1ab06b9fffd5 Reviewed-on: https://gerrit.libreoffice.org/11939 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-10xmerge: The if statement is redundantRobert Antoni Buj i Gelonch6-30/+7
Change-Id: I56c5727470c4dba9ffa7c298fb6ccea5be750f33 Reviewed-on: https://gerrit.libreoffice.org/11894 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-07java: simplify conditions involving logical negationNoel Grandin1-2/+2
Change-Id: Ib45e58273e650ef9a31dbdb5f71e995a5976f50e
2014-10-07java: remove some unnecessary intermediary object creationNoel Grandin3-3/+3
Change-Id: Id4949fa08546e710fbf9bd0c7e3bf62979f29c83
2014-10-07xmerge: reuse the value of node.getNodeName() and remove duplicated constantsRobert Antoni Buj i Gelonch3-10/+8
Change-Id: Ia835139496ab8e5230a09df2caf23637a5559ba4 Reviewed-on: https://gerrit.libreoffice.org/11836 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-02xmerge: reuse the value of value.indexOf and remove duplicated codeRobert Antoni Buj i Gelonch3-29/+27
Change-Id: I44d72f7d9f8c58436657ea1517d8eb76332abb4b Reviewed-on: https://gerrit.libreoffice.org/11747 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-02xmerge: Converting ArrayList to ArrayRobert Antoni Buj i Gelonch1-3/+1
Change-Id: I67c70ce05d35c8f40bea153499820e7e52c2ff08 Reviewed-on: https://gerrit.libreoffice.org/11748 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-29fix more Java1.5 incompatibilityNoel Grandin2-3/+9
Change-Id: I32881e06d278df6319822a5ecf282aa97cf24bc8
2014-09-25java: when rethrowing exceptions, store the original causeNoel Grandin2-12/+6
so that we get a nice complete stacktrace when it hits the final handler Change-Id: Iec4fcc15a2a25c55f591b5e069dce3d010197a90
2014-09-11xmerge: Convert a primitive type into a stringrbuj1-1/+1
Avoid unnecessary temporaries when converting primitive data types into a String. Change-Id: Ied91859e756ff392b1a0ea8d6d889afae11b2f8d Reviewed-on: https://gerrit.libreoffice.org/11366 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>