[ooo-build-commit] .: patches/dev300
Petr Mladek
pmladek at kemper.freedesktop.org
Fri Aug 6 10:02:18 PDT 2010
patches/dev300/apply | 3 +
patches/dev300/build-java-1.4-jurt.diff | 92 ++++++++++++++++++++++++++++++++
2 files changed, 95 insertions(+)
New commits:
commit fb7ec096025ef065b7bb3ac25685ba4a96774bb8
Author: Petr Mladek <pmladek at walk.suse.cz>
Date: Fri Aug 6 19:00:24 2010 +0200
fix jurt build with Sun Java 1.4 on SLED10
* patches/dev300/build-java-1.4-jurt.diff:
* patches/dev300/apply: Java 1.4 does not support HashMap<String, Level1Entry>
and Iterator<Level2Entry> templates; the universal types and explicit casts
must be used instead
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 9f8e367..bfcb29d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1085,6 +1085,9 @@ build-java-1.4-UnoRuntime-queryInterface.diff, i#12345, pmladek
# the paths are probably hardcoded somewhere but where?
# the old solution with shell wrapper is good enough in this case
build-java-1.4-regcomp.diff, i#12345, pmladek
+# Java 1.4 does not support HashMap<String, Level1Entry> and Iterator<Level2Entry> templates
+# the universal types and explicit cast must be used instead
+build-java-1.4-jurt.diff, i#12345, pmladek
# another fallback to load libhsqldb with JRE 1.4
connectivity-load-libhsqldb-with-jre-1.4.diff, n#431360, pmladek
diff --git a/patches/dev300/build-java-1.4-jurt.diff b/patches/dev300/build-java-1.4-jurt.diff
new file mode 100644
index 0000000..5fcd6d2
--- /dev/null
+++ b/patches/dev300/build-java-1.4-jurt.diff
@@ -0,0 +1,92 @@
+--- jurt/com/sun/star/lib/uno/environments/java/java_environment.java.old 2010-07-21 15:32:50.000000000 +0200
++++ jurt/com/sun/star/lib/uno/environments/java/java_environment.java 2010-08-06 18:52:49.000000000 +0200
+@@ -159,9 +159,9 @@ public final class java_environment impl
+ Object object, String oid, Type type)
+ {
+ cleanUp();
+- Level1Entry l1 = level1map.get(oid);
++ Level1Entry l1 = (Level1Entry)level1map.get(oid);
+ if (l1 != null) {
+- Level2Entry l2 = l1.level2map.get(type);
++ Level2Entry l2 = (Level2Entry)l1.level2map.get(type);
+ if (l2 != null) {
+ Object o = l2.get();
+ if (o != null) {
+@@ -190,10 +190,10 @@ public final class java_environment impl
+ }
+
+ public synchronized boolean revoke(String oid, Type type) {
+- Level1Entry l1 = level1map.get(oid);
++ Level1Entry l1 = (Level1Entry)level1map.get(oid);
+ Level2Entry l2 = null;
+ if (l1 != null) {
+- l2 = l1.level2map.get(type);
++ l2 = (Level2Entry)l1.level2map.get(type);
+ if (l2 != null && l2.release()) {
+ removeLevel2Entry(l1, oid, type);
+ }
+@@ -203,7 +203,7 @@ public final class java_environment impl
+ }
+
+ public synchronized Object get(String oid, Type type) {
+- Level1Entry l1 = level1map.get(oid);
++ Level1Entry l1 = (Level1Entry)level1map.get(oid);
+ return l1 == null ? null : l1.find(type);
+ }
+
+@@ -225,7 +225,7 @@ public final class java_environment impl
+ // created since now e1.get() == null), and only then e1 is
+ // enqueued. To not erroneously remove the new e2 in that case,
+ // check whether the map still contains e1:
+- Level1Entry l1 = level1map.get(l2.oid);
++ Level1Entry l1 = (Level1Entry)level1map.get(l2.oid);
+ if (l1 != null && l1.level2map.get(l2.type) == l2) {
+ removeLevel2Entry(l1, l2.oid, l2.type);
+ }
+@@ -245,17 +245,17 @@ public final class java_environment impl
+ public Object find(Type type) {
+ // First, look for an exactly matching entry; then, look for an
+ // arbitrary entry for a subtype of the request type:
+- Level2Entry l2 = level2map.get(type);
++ Level2Entry l2 = (Level2Entry)level2map.get(type);
+ if (l2 != null) {
+ Object o = l2.get();
+ if (o != null) {
+ return o;
+ }
+ }
+- for (Iterator<Level2Entry> i = level2map.values().iterator();
++ for (Iterator i = level2map.values().iterator();
+ i.hasNext();)
+ {
+- l2 = i.next();
++ l2 = (Level2Entry)i.next();
+ if (type.isSupertypeOf(l2.type)) {
+ Object o = l2.get();
+ if (o != null) {
+@@ -266,11 +266,11 @@ public final class java_environment impl
+ return null;
+ }
+
+- public final HashMap<Type, Level2Entry> level2map =
+- new HashMap<Type, Level2Entry>();
++ public final HashMap level2map =
++ new HashMap();
+ }
+
+- private static final class Level2Entry extends WeakReference<Object> {
++ private static final class Level2Entry extends WeakReference {
+ public Level2Entry(
+ String oid, Type type, Object object, ReferenceQueue queue)
+ {
+@@ -295,8 +295,8 @@ public final class java_environment impl
+ private int count = 1;
+ }
+
+- private final HashMap<String, Level1Entry> level1map =
+- new HashMap<String, Level1Entry>();
++ private final HashMap level1map =
++ new HashMap();
+ private final ReferenceQueue queue = new ReferenceQueue();
+ }
+
More information about the ooo-build-commit
mailing list