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
This commit is contained in:
@@ -317,6 +317,11 @@ public class GenServiceTask extends InvocationTask
|
|||||||
// convert primitive java types to ooo util types
|
// convert primitive java types to ooo util types
|
||||||
imports.replace("long", "com.threerings.util.Long");
|
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
|
// get rid of remaining primitives and java.lang types
|
||||||
imports.removeGlobals();
|
imports.removeGlobals();
|
||||||
|
|
||||||
@@ -404,6 +409,11 @@ public class GenServiceTask extends InvocationTask
|
|||||||
// change Foo$Bar to Foo_Bar
|
// change Foo$Bar to Foo_Bar
|
||||||
imports.translateInnerClasses();
|
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
|
// convert java primitive types to ooo util types
|
||||||
imports.replace("long", "com.threerings.util.Long");
|
imports.replace("long", "com.threerings.util.Long");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user