From 881569ea7a449a14bbba6b5cc3028401cf195826 Mon Sep 17 00:00:00 2001 From: stephey Date: Tue, 26 Apr 2011 00:51:56 +0000 Subject: [PATCH] Don't include java.lang in non-jni builds.. and someone forgot a void in our Vector ensureCapacity declaration........ --- Robust/src/ClassLibrary/Vector.java | 2 +- Robust/src/IR/Tree/BuildIR.java | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Robust/src/ClassLibrary/Vector.java b/Robust/src/ClassLibrary/Vector.java index 884f2a6b..2a32e897 100644 --- a/Robust/src/ClassLibrary/Vector.java +++ b/Robust/src/ClassLibrary/Vector.java @@ -80,7 +80,7 @@ public class Vector { } } - private ensureCapacity(int minCapacity) { + private void ensureCapacity(int minCapacity) { if (minCapacity>array.length) { int newsize; if (capacityIncrement<=0) diff --git a/Robust/src/IR/Tree/BuildIR.java b/Robust/src/IR/Tree/BuildIR.java index 4deb4d03..974c1dad 100644 --- a/Robust/src/IR/Tree/BuildIR.java +++ b/Robust/src/IR/Tree/BuildIR.java @@ -42,8 +42,10 @@ public class BuildIR { mandatoryImports = new Hashtable(); multiimports = new Hashtable(); - //add java.lang as our default multi-import - this.addMultiImport(sourcefile, "java.lang", false); + if(state.JNI) { + //add java.lang as our default multi-import + this.addMultiImport(sourcefile, "java.lang", false); + } ParseNode ipn = pn.getChild("imports").getChild("import_decls_list"); if (ipn != null) { @@ -71,8 +73,7 @@ public class BuildIR { String packageName = null; if (ppn!=null) { NameDescriptor nd = parseClassName(ppn.getChild("name")); - packageName = nd.getPathFromRootToHere(); - + packageName = nd.getPathFromRootToHere(); //Trick -> import the package directory as a multi-import and it'll //automatically recognize files in the same directory. addMultiImport(sourcefile, packageName, true); @@ -734,7 +735,7 @@ public class BuildIR { //This will get the mapping of a terminal class name //to a canonical classname (with imports/package locations in them) - private String resolveName(String terminal) { + private String resolveName(String terminal) { if(mandatoryImports.containsKey(terminal)) { return (String) mandatoryImports.get(terminal); } else { -- 2.34.1