From 35955cc701911da3f8ba0668e9de41871a2a2b51 Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Fri, 23 May 2008 00:40:56 +0000 Subject: [PATCH] Fixed another couple of bugs in service generation discovered when generating services for vilya git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5122 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/tools/GenServiceTask.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/java/com/threerings/presents/tools/GenServiceTask.java b/src/java/com/threerings/presents/tools/GenServiceTask.java index 9a2752d2e..323b38583 100644 --- a/src/java/com/threerings/presents/tools/GenServiceTask.java +++ b/src/java/com/threerings/presents/tools/GenServiceTask.java @@ -317,6 +317,11 @@ public class GenServiceTask extends InvocationTask // convert primitive java types to ooo util types imports.replace("long", "com.threerings.util.Long"); + // convert object arrays to typed arrays + if (imports.removeAll("[L*") > 0) { + imports.add("com.threerings.io.TypedArray"); + } + // get rid of remaining primitives and java.lang types imports.removeGlobals(); @@ -404,6 +409,11 @@ public class GenServiceTask extends InvocationTask // change Foo$Bar to Foo_Bar imports.translateInnerClasses(); + // use a typed array for any arrays of objects + if (imports.removeAll("[L*") > 0) { + imports.add("com.threerings.io.TypedArray"); + } + // convert java primitive types to ooo util types imports.replace("long", "com.threerings.util.Long");