08ece8d873
java: revert part of commit, scripting/ is public API
...
revert part of my commit
7557f23b31dcfb4d86c122bb34d9675c0db9a694
"java: reduce visibility of fields and methods"
Change-Id: I2049a154b60b165d4d2217495935442d6da66e97
2014-12-11 15:20:09 +02:00
7557f23b31
java: reduce visibility of fields and methods
...
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-11 06:09:03 +00:00
c199b76d88
java: remove some unused local variables
...
Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965
2014-12-05 11:15:57 +02:00
db203e59d6
java: remove some unused fields
...
Change-Id: I1b6fb6b47439c448ac31983702772e2115c70d56
2014-12-05 11:15:56 +02:00
58eab57648
java: final fields that can be static
...
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-25 06:06:48 +00:00
0063cf2856
java: make fields final where possible
...
found by PMD
Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-18 12:44:28 +02:00
bb437029c1
java: convert fields to local variables where possible
...
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-12 11:03:29 +00:00
36ff1527c9
java: reduce excessive code indentation levels
...
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-11-12 08:01:55 +00:00
b2f69f6264
java: when rethrowing, store the original exception
...
Change-Id: I14666493e72da177fcfff1895ef3206f0e13cc01
2014-10-16 12:27:14 +02:00
fa22664be2
java: always use braces for while loops
...
Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce
2014-10-16 08:15:52 +02:00
0fdba36ab6
scripting: replace '.size() == 0' with '.isEmpty()' (collections)
...
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Map.html#isEmpty()
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html#isEmpty()
Change-Id: I76d8d8be2794655cb27ab121759494d7084b4744
Reviewed-on: https://gerrit.libreoffice.org/11967
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-10-14 12:29:02 +00:00
791ed2c654
scripting: use new exception constructors
...
Change-Id: I7eeece85d4e462bf2df010ee29c062941a677759
Reviewed-on: https://gerrit.libreoffice.org/11966
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-10-14 12:28:37 +00:00
68fa141097
java: use isEmpty() instead of "size() == 0"
...
Change-Id: I23e1038246999b0744d8e9ae83b66fa1f7dafa99
2014-10-07 13:20:03 +02:00
e41597eade
scripting: line break (code formatting)
...
Change-Id: Ib1a8d7e4bdaad2f4eae822d9af280fd5b6f9dd7b
Reviewed-on: https://gerrit.libreoffice.org/11794
Reviewed-by: David Tardon <dtardon@redhat.com >
Tested-by: David Tardon <dtardon@redhat.com >
2014-10-06 14:10:27 +00:00
4a0fc2fb02
scripting: organize imports
...
Change-Id: I26a1164d44f464a44ed7deb93ac39465feb0541c
Reviewed-on: https://gerrit.libreoffice.org/11768
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-10-03 05:25:06 +00:00
6f42a71439
scripting: Format_java_code.sh initial run
...
Conflicts:
scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
Change-Id: I09b94d8c96dfbaf498bd93a0088feb80a9e4afb6
2014-10-02 15:25:29 +02:00
83636d2c09
java: when rethrowing exceptions, store the original cause
...
so that we get a nice complete stacktrace when it hits the final
handler
Change-Id: Iec4fcc15a2a25c55f591b5e069dce3d010197a90
2014-09-25 13:47:25 +02:00
27d5b5c6dd
BRAND_BIN_SUBDIR -> BRAND_INI_DIR, to cater for new Mac OS X layout
...
Change-Id: Ic367545895a25a4cf6e95fc1be2f5db9f36a221b
2014-09-17 11:45:14 +02:00
f93ce4f7eb
scripting: decode(String) in URLDecoder has been deprecated
...
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URLDecoder.html#decode(java.lang.String)
Change-Id: I71ecb498c93d5e8d6959bdc3ab263a5ff48c1c21
Reviewed-on: https://gerrit.libreoffice.org/11453
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-09-16 06:16:49 +00:00
44304a8147
scripting: replace StringBuffer with StringBuilder method
...
In JDK 1.3, StringBuffer makes the String concatenations faster.
public String concat(String s1, String s2) {
StringBuffer sb = new StringBuffer();
sb.append(s1);
sb.append(s2);
return sb.toString();
}
JDK 1.5 comes with StringBuilder (which is faster than StringBuffer) and the method:
public String concat(String s1, String s2) {
return s1 + s2;
}
is translated to:
public String concat(String s1, String s2) {
return new StringBuilder().append(s1).append(s2).toString();
}
Change-Id: I2924fcdf23d7ffbb567d9e924d02edcab4d21be6
NOTE: StringBuffer is synchronized, StringBuilder is not.
Reviewed-on: https://gerrit.libreoffice.org/11436
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-09-14 06:33:05 +00:00
fafb0db5d2
scripting: use String.length()==0 instead of String.equals(empty string)
...
Change-Id: Icff6a5d19aaf7ac7ebb0cd54140bd388cba0f24d
Reviewed-on: https://gerrit.libreoffice.org/11431
Reviewed-by: David Tardon <dtardon@redhat.com >
Tested-by: David Tardon <dtardon@redhat.com >
2014-09-13 15:09:44 +00:00
8171113420
scripting: use a character literal
...
Change-Id: Iabd3514f3c64ff851463cb9b2c1c425164285eb5
Reviewed-on: https://gerrit.libreoffice.org/11430
Reviewed-by: David Tardon <dtardon@redhat.com >
Tested-by: David Tardon <dtardon@redhat.com >
2014-09-13 15:05:45 +00:00
e41cc6898a
scripting: Enhanced For-Loops
...
Change-Id: Ib5e59a8c153e7d788c14153fa3b94c8b2d0a068c
Reviewed-on: https://gerrit.libreoffice.org/11292
Reviewed-by: David Tardon <dtardon@redhat.com >
Tested-by: David Tardon <dtardon@redhat.com >
2014-09-13 15:03:32 +00:00
4d6bd06c33
scripting: there isn't any benefit by reducing the scope here.
...
Change-Id: I73ebfac7b44d3fba7da70788784492fa3c53c572
Reviewed-on: https://gerrit.libreoffice.org/11312
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-09-07 13:01:56 -05:00
c562a0b58d
scripting: remove import from the same package
...
Change-Id: If3a07e81f5d738395d6718302512c0172b90d977
Reviewed-on: https://gerrit.libreoffice.org/11285
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-09-05 02:30:53 -05:00
015d65c7ea
scripting: use contains to check if a string contains a substring
...
Change-Id: I7cbd32310e362f43f0a456e45b58930eb5453f0c
Reviewed-on: https://gerrit.libreoffice.org/11289
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: Thomas Arnhold <thomas@arnhold.org >
2014-09-04 20:36:09 -05:00
a795c3660b
scripting: the if statement is redundant
...
Change-Id: I7e61d740d6f58afbcdad630deb0de0ef548efcfb
Reviewed-on: https://gerrit.libreoffice.org/11288
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: Thomas Arnhold <thomas@arnhold.org >
2014-09-04 20:34:16 -05:00
652b807658
scripting: the assigned value is never used
...
Change-Id: I430da93e985291300ac5fdaccc7f907535771a07
Reviewed-on: https://gerrit.libreoffice.org/11287
Reviewed-by: Thomas Arnhold <thomas@arnhold.org >
Tested-by: Thomas Arnhold <thomas@arnhold.org >
2014-09-04 20:31:50 -05:00
908ccc22d8
scripting: fix javadoc error: unknown tag: null
...
Change-Id: I7d9ec1759a1689943d51636926024278cec0dc3b
Reviewed-on: https://gerrit.libreoffice.org/11234
Reviewed-by: David Tardon <dtardon@redhat.com >
Tested-by: David Tardon <dtardon@redhat.com >
2014-09-02 06:11:11 -05:00
609f7b8503
remove do-nothing code
...
Change-Id: I101cc3be44f029f7353e8d40823c0d6b2bd761b3
2014-08-20 12:12:27 +02:00
8c9fdc4a96
java: remove modifiers implied by the context
...
found by PMD
Change-Id: I04cbf986ddbcffff987784f381b8a9f52f1b3f31
2014-08-20 11:45:28 +02:00
252ed1708a
double-checked locking is not thread-safe in Java
...
found by PMD
Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
2014-08-20 10:35:51 +02:00
3a8d351988
java: remove unused methods
...
Change-Id: Ibb905e6f3e7d92a0e558f1f6562e5b472cd2717b
2014-08-19 14:57:13 +02:00
0d916bb240
java: remove unused imports
...
Change-Id: Ic60b30141fd1dc61acfb97b811aec680a2ab9c22
2014-08-14 10:59:49 +02:00
34bcf9b498
java: remove dead methods
...
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
2014-08-13 10:24:10 +02:00
8583da1e93
java: remove unused fields
...
found by UCDetector
Change-Id: I4a7c56a9918054c23469de5680658e7b501f0165
2014-08-13 08:49:24 +02:00
68cd011c90
java: reduce scope, make some methods private
...
found by UCDetector
Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
2014-08-13 08:49:23 +02:00
da677dfd59
java: reduce scope, make fields private
...
found by UCDetector
Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
2014-08-13 08:49:22 +02:00
14d1a11ec4
java: reduce scope, make constructors private
...
found by UCDetector
Change-Id: If05277fd2fe77ceabb4c7c87aeb8569e3406102d
2014-08-13 08:49:22 +02:00
1c496506bc
java: remove useless javadoc tags
...
that are not conveying any useful information
Change-Id: Ic37934b8cc376fcdcb3d295232452f411dfd43b1
2014-08-12 09:41:31 +02:00
0477e6c39b
java: add @Override annotation to overriding methods
...
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
2014-08-12 09:41:28 +02:00
d5a31b2215
java: remove unused parameters
...
Change-Id: Ifc44c51ddbd21fabaad686bc3d38e2dab54d97aa
2014-08-11 12:33:02 +02:00
41709cc268
java: remove unused parameters
...
Change-Id: I47c618117e079bb2ef90d92c449c8166ea957fa5
2014-08-11 12:33:02 +02:00
616b3ad504
java: remove exceptions from throws clauses that are not
...
.. actually thrown
Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
2014-08-08 09:48:20 +02:00
a274d19d11
java: remove redundant super-interfaces
...
Change-Id: Iaf671ef87057362c804999a5154d8e8277bbc4b8
2014-08-08 09:48:18 +02:00
2d700944b5
java: remove unused imports
...
Change-Id: Idbba5bb89bee4d88ed0306d5151e238a1bc19cec
2014-08-08 09:48:17 +02:00
8d6cf7a147
java: remove dead methods
...
Change-Id: I9f2e705fd603a7c8832c0f0772bee9f395380a0d
2014-08-08 09:48:16 +02:00
0c5f51ebbc
java: remove commented out code
...
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
2014-08-05 11:31:50 +02:00
d26540bb05
java: remove unused fields
...
Change-Id: I6c93864f501f646a8940eac221a88c87b3f75525
2014-08-05 11:31:50 +02:00
f124688cfd
java: remove various unused variables
...
Change-Id: Id9f30938f594cb6fe73bf40adfffa65ec1b42cd1
2014-08-05 11:31:49 +02:00