summaryrefslogtreecommitdiffstats
path: root/ridljar
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-12-11 13:23:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-04 22:03:54 +0100
commitae855bf48163ff64d94cfc34aff8e37abdb5518d (patch)
treecdfc726f47cc69c265288936157295c94d9ec949 /ridljar
parentupgrade to latest glm (diff)
downloadcore-ae855bf48163ff64d94cfc34aff8e37abdb5518d.tar.gz
core-ae855bf48163ff64d94cfc34aff8e37abdb5518d.zip
tdf#117331 Merge jurt and unoil into ridl
jurt.jar and unoil.jar are kept as effectively empty jars, each with a Class-Path: ridl.jar in their meta-inf/manifest.mf, so that 3rd-party code loading them (with or without also loading ridl.jar) will still have access to their content. Conceptually, the UNOIDL entities in unoil.jar (corresponding to module offapi) are not part of the URE, but are now made available by URE's ridl.jar. This should probably not cause problems in practice. At least for now, we seal exactly those packages in ridl.jar that were originally sealed in jurt.jar. Ideally, all of ridl.jar could be sealed now, but that would be mildly incompatible, as it would prevent 3rd-party code from introducing additional UNOIDL entities in the relevant namespaces (even if that is something we do not want 3rd-party code to do anyway). However, some JunitTest_jurt_* define classes in those sealed packages. In the past they got away with that by using gb_JunitTest_use_jar_classset,*,jurt. Instead they now need to gb_JunitTest_use_jar_classset,*,ridl and drop the gb_JunitTest_use_jar,*,ridl. But the former only makes available the classes that are specified in ridljar/Jar_ridl.mk with gb_Jar_add_sourcefiles, not the UNOIDL entities specified via gb_Jar_add_packagedirs. But the tests need the udkapi UNOIDL entities, so introduce gb_JunitTest_add_classpath to let the tests get them explicitly. (Curiously, JunitTest_jurt_uno and JnitTest_jurt_util use gb_JunitTest_use_jar_classset,*,jurt but don't seem to acutally need it; lets leave that for a follow-up clean up.) As a follow-up clean up, relevant files could be moved from jurt/ to ridljar/. Change-Id: I836f4e7bb47fb41f1306e3f223da90dba988eb9a Co-authored-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ridljar')
-rw-r--r--ridljar/Jar_ridl.mk67
-rw-r--r--ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader.java7
-rw-r--r--ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader.java2
-rw-r--r--ridljar/util/manifest37
4 files changed, 108 insertions, 5 deletions
diff --git a/ridljar/Jar_ridl.mk b/ridljar/Jar_ridl.mk
index 90bdc9449b41..9cb3bbd2aaa3 100644
--- a/ridljar/Jar_ridl.mk
+++ b/ridljar/Jar_ridl.mk
@@ -11,12 +11,25 @@ $(eval $(call gb_Jar_Jar,ridl))
$(eval $(call gb_Jar_use_customtargets,ridl,\
ridljar/javamaker \
+ unoil/javamaker \
+))
+
+$(eval $(call gb_Jar_use_jars,ridl, \
+ unoloader \
))
$(eval $(call gb_Jar_set_packageroot,ridl,com))
+$(eval $(call gb_Jar_set_manifest,ridl,$(SRCDIR)/ridljar/util/manifest))
+
+$(eval $(call gb_Jar_add_manifest_classpath,ridl, \
+ unoloader.jar \
+ $(if $(filter MACOSX,$(OS)),../../Frameworks/,../) \
+))
+
$(eval $(call gb_Jar_add_packagedirs,ridl,\
$(call gb_CustomTarget_get_workdir,ridljar/javamaker)/com \
+ $(call gb_CustomTarget_get_workdir,unoil/javamaker)/com \
))
$(eval $(call gb_Jar_add_sourcefiles,ridl,\
@@ -41,6 +54,60 @@ $(eval $(call gb_Jar_add_sourcefiles,ridl,\
ridljar/com/sun/star/uno/IQueryInterface \
ridljar/com/sun/star/uno/Type \
ridljar/com/sun/star/uno/UnoRuntime \
+ jurt/com/sun/star/comp/bridgefactory/BridgeFactory \
+ jurt/com/sun/star/comp/connections/Acceptor \
+ jurt/com/sun/star/comp/connections/Connector \
+ jurt/com/sun/star/comp/connections/ConstantInstanceProvider \
+ jurt/com/sun/star/comp/connections/Implementation \
+ jurt/com/sun/star/comp/connections/PipedConnection \
+ jurt/com/sun/star/comp/loader/FactoryHelper \
+ jurt/com/sun/star/comp/loader/JavaLoader \
+ jurt/com/sun/star/comp/loader/JavaLoaderFactory \
+ jurt/com/sun/star/comp/loader/RegistrationClassFinder \
+ jurt/com/sun/star/comp/servicemanager/ServiceManager \
+ jurt/com/sun/star/comp/urlresolver/UrlResolver \
+ jurt/com/sun/star/lib/connections/pipe/PipeConnection \
+ jurt/com/sun/star/lib/connections/pipe/pipeAcceptor \
+ jurt/com/sun/star/lib/connections/pipe/pipeConnector \
+ jurt/com/sun/star/lib/connections/socket/ConnectionDescriptor \
+ jurt/com/sun/star/lib/connections/socket/SocketConnection \
+ jurt/com/sun/star/lib/connections/socket/socketAcceptor \
+ jurt/com/sun/star/lib/connections/socket/socketConnector \
+ jurt/com/sun/star/lib/uno/Proxy \
+ jurt/com/sun/star/lib/uno/bridges/java_remote/BridgedObject \
+ jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory \
+ jurt/com/sun/star/lib/uno/bridges/java_remote/RequestHandler \
+ jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter \
+ jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter \
+ jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge \
+ jurt/com/sun/star/lib/uno/environments/java/java_environment \
+ jurt/com/sun/star/lib/uno/environments/remote/IProtocol \
+ jurt/com/sun/star/lib/uno/environments/remote/IReceiver \
+ jurt/com/sun/star/lib/uno/environments/remote/IThreadPool \
+ jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPool \
+ jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory \
+ jurt/com/sun/star/lib/uno/environments/remote/Job \
+ jurt/com/sun/star/lib/uno/environments/remote/JobQueue \
+ jurt/com/sun/star/lib/uno/environments/remote/Message \
+ jurt/com/sun/star/lib/uno/environments/remote/NativeThreadPool \
+ jurt/com/sun/star/lib/uno/environments/remote/ThreadId \
+ jurt/com/sun/star/lib/uno/environments/remote/ThreadPoolManager \
+ jurt/com/sun/star/lib/uno/environments/remote/remote_environment \
+ jurt/com/sun/star/lib/uno/protocols/urp/Cache \
+ jurt/com/sun/star/lib/uno/protocols/urp/Marshal \
+ jurt/com/sun/star/lib/uno/protocols/urp/PendingRequests \
+ jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal \
+ jurt/com/sun/star/lib/uno/protocols/urp/UrpMessage \
+ jurt/com/sun/star/lib/uno/protocols/urp/urp \
+ jurt/com/sun/star/lib/util/AsynchronousFinalizer \
+ jurt/com/sun/star/lib/util/NativeLibraryLoader \
+ jurt/com/sun/star/lib/util/StringHelper \
+ jurt/com/sun/star/lib/util/UrlToFileMapper \
+ jurt/com/sun/star/uno/AnyConverter \
+ jurt/com/sun/star/uno/Ascii \
+ jurt/com/sun/star/uno/AsciiString \
+ jurt/com/sun/star/uno/MappingException \
+ jurt/com/sun/star/uno/WeakReference \
))
# vim:set noet sw=4 ts=4:
diff --git a/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader.java b/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader.java
index 7adb33b9269e..c52165abfeb7 100644
--- a/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader.java
+++ b/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader.java
@@ -49,7 +49,7 @@ public final class UnoClassLoader extends URLClassLoader {
* Instantiates the root UNO class loader.
*
* @param base a base URL relative to which the URE JARs
- * (<code>java_uno.jar</code>, <code>juh.jar</code>, <code>jurt.jar</code>,
+ * (<code>java_uno.jar</code>, <code>juh.jar</code>,
* <code>ridl.jar</code>) can be found; must not be <code>null</code>.
*
* @param classPath an array of URLs that form the class path of this class
@@ -191,12 +191,11 @@ public final class UnoClassLoader extends URLClassLoader {
private static URL[] createUrls(URL base, URL[] classPath)
throws MalformedURLException
{
- final int JARS = 4;
+ final int JARS = 3;
URL[] urls = new URL[JARS + (classPath == null ? 0 : classPath.length)];
urls[0] = new URL(base, "java_uno.jar"); //TODO get rid of it here
urls[1] = new URL(base, "juh.jar");
- urls[2] = new URL(base, "jurt.jar");
- urls[3] = new URL(base, "ridl.jar");
+ urls[2] = new URL(base, "ridl.jar");
if (classPath != null) {
System.arraycopy(classPath, 0, urls, JARS, classPath.length);
}
diff --git a/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader.java b/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader.java
index 76f392cefd13..1ed16fcca94c 100644
--- a/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader.java
+++ b/ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader.java
@@ -38,7 +38,7 @@ public final class UnoLoader {
* Executes a UNO JAR.
*
* @param base a base URL relative to which the URE JARs
- * (<code>jurt.jar</code>, <code>ridl.jar</code>, etc.) can be found; must
+ * (<code>ridl.jar</code>, etc.) can be found; must
* not be <code>null</code>.
*
* @param jar the URL of a UNO JAR that specifies a Main-Class; must not be
diff --git a/ridljar/util/manifest b/ridljar/util/manifest
new file mode 100644
index 000000000000..ab777d6fe7ba
--- /dev/null
+++ b/ridljar/util/manifest
@@ -0,0 +1,37 @@
+Sealed: false
+
+Name: com/sun/star/comp/bridgefactory/
+Sealed: true
+
+Name: com/sun/star/comp/connections/
+Sealed: true
+
+Name: com/sun/star/comp/loader/
+Sealed: true
+
+Name: com/sun/star/comp/servicemanager/
+Sealed: true
+
+Name: com/sun/star/comp/urlresolver/
+Sealed: true
+
+Name: com/sun/star/lib/connections/pipe/
+Sealed: true
+
+Name: com/sun/star/lib/connections/socket/
+Sealed: true
+
+Name: com/sun/star/lib/uno/
+Sealed: true
+
+Name: com/sun/star/lib/uno/bridges/java_remote/
+Sealed: true
+
+Name: com/sun/star/lib/uno/environments/java/
+Sealed: true
+
+Name: com/sun/star/lib/uno/environments/remote/
+Sealed: true
+
+Name: com/sun/star/lib/uno/protocols/urp/
+Sealed: true