Stephan Bergmann
5707ec3303
Use javax.xml.transform instead of reflection to write a Document
...
At least on Fedora 34 when building with --with-jdk-home=/usr/lib/jvm/java-16
against java-latest-openjdk-headless-16.0.0.0.36-1.rolling.fc34.x86_64,
CustomTarget_odk/build-examples_java failed with
> ERROR: Exception occurred: An error occurred while enabling: SayHello .../desktop/source/deployment/registry/dp_backend.cxx:645
>
> ERROR: unopkg failed.
>
> make[2]: *** [Makefile:92: .../workdir/CustomTarget/odk/build-examples_java/out/sdk/LINUXexample.out/misc/ScriptingFramework/SayHello/devguide_scriptingframework_SayHello_register_scriptpkg.flag] Error 1
because of
> info:bridges:1209707:1209707:bridges/source/jni_uno/jni_uno2java.cxx:117: exception occurred uno->java: [com.sun.star.lang.WrappedTargetException] java.io.IOException
> java stack trace:
> com.sun.star.lang.WrappedTargetException: java.io.IOException
> at com.sun.star.script.framework.container.UnoPkgContainer.writeUnoPackageDB(UnoPkgContainer.java:279)
> at com.sun.star.script.framework.container.UnoPkgContainer.processUnoPackage(UnoPkgContainer.java:330)
> at com.sun.star.script.framework.provider.ScriptProvider.insertByName(ScriptProvider.java:563)
> Caused by: java.io.IOException
> at com.sun.star.script.framework.container.XMLParserFactory$DefaultParser.write(XMLParserFactory.java:190)
> at com.sun.star.script.framework.container.DeployedUnoPackagesDB.write(DeployedUnoPackagesDB.java:107)
> at com.sun.star.script.framework.container.UnoPkgContainer.writeUnoPackageDB(UnoPkgContainer.java:270)
> ... 2 more
> Caused by: java.lang.IllegalAccessException: class com.sun.star.script.framework.container.XMLParserFactory$DefaultParser cannot access class com.sun.org.apache.xml.internal.serialize.XMLSerializer (in module java.xml) because module java.xml does not export com.sun.org.apache.xml.internal.serialize to unnamed module @50860e85
> at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:385)
> at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:687)
> at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:489)
> at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
> at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:350)
> at java.base/java.lang.Class.newInstance(Class.java:642)
> at com.sun.star.script.framework.container.XMLParserFactory$DefaultParser.write(XMLParserFactory.java:145)
> ... 4 more
The javax.xml.transform functionality appears to be available since Java 1.4, so
it should not be a problem if we unconditionally use it.
Change-Id: Idc31f8f6fb092b6603c537414497d24aec886ce7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113421
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-03-31 22:13:08 +02:00
Andrea Gelmini
dd2b321012
Fix typos
...
Change-Id: Ibe3cd52117f7f47e1806bde76114cb1644d78763
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100969
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Jenkins
2020-08-19 15:37:24 +02:00
Andrea Gelmini
f4a07458fb
Fix typos
...
Change-Id: I8a93a6ed49661ddfae390a0302fca1fab5c95f14
Reviewed-on: https://gerrit.libreoffice.org/79795
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Julien Nabet <serval2412@yahoo.fr >
2019-09-29 00:09:20 +02:00
Andrea Gelmini
c12c84e6d8
Fixing "...."
...
Change-Id: I3424e17cfdfb563fdc5882942031deafae8689fe
Reviewed-on: https://gerrit.libreoffice.org/78678
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2019-09-06 09:13:38 +02:00
Andrea Gelmini
bec318a4ac
Fix typos
...
Change-Id: Iac08e415f84741ecdb151788776ee15e7364fae1
Reviewed-on: https://gerrit.libreoffice.org/77762
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Julien Nabet <serval2412@yahoo.fr >
2019-08-31 14:38:58 +02:00
Andrea Gelmini
1a75143159
Fix typos
...
Change-Id: I3e6b96f4ea341130e98ee54ed8c124209b05d343
Reviewed-on: https://gerrit.libreoffice.org/77291
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2019-08-12 10:56:06 +02:00
Andreas Heinisch
1223bede82
tdf#123587 Beanshell editor: Show current file name as window title
...
Change-Id: I7a817d19cfadc46b1f35a4e42e5a6177c1910a4b
Reviewed-on: https://gerrit.libreoffice.org/75869
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-07-19 18:30:06 +02:00
Julien Nabet
04fbd174cb
cid#1448470: perf inefficient map iterator
...
Change-Id: If7dd6455ca02d6c78ac997bd9c2924863db1d906
Reviewed-on: https://gerrit.libreoffice.org/75059
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2019-07-03 22:54:07 +02:00
Caolán McNamara
fbc038cc4f
an uno -> a uno
...
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2019-05-10 14:50:59 +02:00
Andrea Gelmini
5c0af52feb
Fix typos
...
Change-Id: I8d5a8251a01af7cdf9832d98d8a6573b907f8532
Reviewed-on: https://gerrit.libreoffice.org/48683
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Jens Carl <j.carl43@gmx.de >
2018-01-27 08:49:38 +01:00
Andrea Gelmini
0d4996862b
Fix typos
...
Change-Id: I9701cc93a9f4315e71c133237fdd96ef6964c8ff
Reviewed-on: https://gerrit.libreoffice.org/29438
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-10-01 20:05:49 +00:00
Andrea Gelmini
fc2590cfa1
Fix typos
...
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-30 15:06:45 +00:00
Stephan Bergmann
4225092a35
cid#1326861,1326862: Eq: Problems with implementation of equals()
...
Cloneable, odd additional equals overloads, odd hasCode implementation---all
smells like clueless cargo cult. And I see no place where it would get used.
Change-Id: Icca89531ce9181fb47eacfb6fae704f4f45012a9
2016-03-04 15:51:04 +01:00
Stephan Bergmann
305453d2c7
This ScriptEntry ctor is always called with empty languagedepprops
...
Change-Id: Ia8ddfecf2f809e9f0132ba59812446973532476c
2016-03-04 15:37:15 +01:00
Stephan Bergmann
8a4e256d67
Scripting.location is unused
...
Change-Id: Ia534b5aa579a678f8b0273e6c8c12a6ad335c67a
2016-03-04 15:34:45 +01:00
Stephan Bergmann
90033c542b
ScriptEntry fields can be final
...
Change-Id: I7616641584b7ea8192cf3724d8b7d5b88af39da6
2016-03-04 15:31:38 +01:00
Stephan Bergmann
8e4c33799f
Turn forwarding among ScriptEntry ctors around, dropping one
...
Change-Id: If3c86c7e5c4acaf4a3e48194e24c3c73e4e99499
2016-03-04 15:30:46 +01:00
Stephan Bergmann
9b70fdf5ed
Remove unusd ScriptEntry ctor
...
Change-Id: I7109877e789659b87cbc16e9c5da39dcc8249e09
2016-03-04 15:29:19 +01:00
Stephan Bergmann
05dba6868e
Forwarding-only ctor, can be private
...
Change-Id: I9ed2aa9c2bf2e17705dc711560154a9596c8264a
2016-03-04 15:26:03 +01:00
Stephan Bergmann
04b5ae6221
This ScriptEntry ctor is only needed by ctor of derived class ScriptMetaData
...
Change-Id: If3e6aae326aa53825edca9d5dc207d185d288cce
2016-03-04 15:23:38 +01:00
Stephan Bergmann
2e96766428
Remove unused ScriptEntry.setLogicalName
...
Change-Id: Iad58e4227433b766bbdce92a53c95aed48320f88
2016-03-04 15:20:45 +01:00
Stephan Bergmann
cf6e5f5b6d
Parcel.getByName apparently wants to return ScriptMetaData
...
Change-Id: I4a710384ec3a0d719f2ad1fbbe7b43b0be1fa1d9
2016-03-04 15:09:14 +01:00
Noel Grandin
b73db446ac
java: combine nested if statements
...
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba
2015-11-05 14:55:15 +02:00
Caolán McNamara
d6a3c5786b
coverity#1326446 Dereference null return value
...
Change-Id: I18b3e0cc30e05e9a53a0f7ae9997b9f190f192f4
2015-10-25 15:41:01 +00:00
Caolán McNamara
337661a989
coverity#1326446 Dereference null return value
...
Change-Id: Ief00b565147bd4a08c4fd6de9df71d9126dc1f75
2015-10-22 16:45:09 +01:00
Caolán McNamara
86d275366a
coverity#1326553 Dereference before null check
...
Change-Id: I1fe2e0477f136f31b854672878d0544d9492d51b
2015-10-20 21:18:35 +01:00
Caolán McNamara
5d5e14e97e
coverity#1326899 HE: Equal objects must have equal hashcodes
...
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-15 09:12:36 +01:00
Caolán McNamara
d9bb701494
coverity#1326568 Unused value
...
Change-Id: Idf1efef484d3a89bd56ba9a6807d4191ef95cb41
2015-10-14 15:02:41 +01:00
Noel Grandin
43cbaac5b9
cid#1326361 Data race condition
...
Change-Id: Ia61737232d816bb05f3aedbe76e7905262906a79
2015-10-14 12:30:57 +02:00
Andrea Gelmini
5d5dc059cb
Fix typos
...
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9
Reviewed-on: https://gerrit.libreoffice.org/16523
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2015-06-28 12:35:58 +00:00
Noel Grandin
efd4bfa818
java:regulatize the order of 'final' and public/private
...
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-06-11 09:34:00 +00:00
Julien Nabet
1101ae6772
Typo: deleteing->deleting
...
Change-Id: I2bdde7524a97039c94a8da5ac5d2eba38c91d71a
2015-02-21 10:56:21 +01:00
Andras Timar
b55ef81671
typo: langugage -> language
...
Change-Id: Ifabd5a7851946b3e4109e22e6e9a1ff34575c1e5
2015-01-23 15:01:37 +01:00
Noel Grandin
08ece8d873
java: revert part of commit, scripting/ is public API
...
revert part of my commit
7557f23b31
"java: reduce visibility of fields and methods"
Change-Id: I2049a154b60b165d4d2217495935442d6da66e97
2014-12-11 15:20:09 +02:00
Noel Grandin
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
Noel Grandin
c199b76d88
java: remove some unused local variables
...
Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965
2014-12-05 11:15:57 +02:00
Noel Grandin
db203e59d6
java: remove some unused fields
...
Change-Id: I1b6fb6b47439c448ac31983702772e2115c70d56
2014-12-05 11:15:56 +02:00
Noel Grandin
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
Noel Grandin
0063cf2856
java: make fields final where possible
...
found by PMD
Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-18 12:44:28 +02:00
Noel Grandin
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
Noel Grandin
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
Noel Grandin
b2f69f6264
java: when rethrowing, store the original exception
...
Change-Id: I14666493e72da177fcfff1895ef3206f0e13cc01
2014-10-16 12:27:14 +02:00
Noel Grandin
fa22664be2
java: always use braces for while loops
...
Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce
2014-10-16 08:15:52 +02:00
Robert Antoni Buj i Gelonch
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
Robert Antoni Buj i Gelonch
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
Noel Grandin
68fa141097
java: use isEmpty() instead of "size() == 0"
...
Change-Id: I23e1038246999b0744d8e9ae83b66fa1f7dafa99
2014-10-07 13:20:03 +02:00
Robert Antoni Buj i Gelonch
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
Robert Antoni Buj i Gelonch
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
Robert Antoni Buj i Gelonch
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
Noel Grandin
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