From 38f0ac868d27867ae998a2bb66cde09c0c5ad443 Mon Sep 17 00:00:00 2001 From: QI CUI Date: Mon, 26 Jan 2015 14:23:35 -0500 Subject: [PATCH 1/6] replace the openjdk6 to oraclejdk8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b49d8dae4..c1042e89c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: java jdk: - oraclejdk7 - - openjdk6 + - oraclejdk8 script: ./refine test From 3ff3700125c38afd2efb7be73ead64740be88edc Mon Sep 17 00:00:00 2001 From: QI CUI Date: Fri, 30 Jan 2015 14:02:49 -0500 Subject: [PATCH 2/6] use the LinkedHashMap instead of HashMap to make sure the retrive order --- .../google/refine/importers/tree/ImportColumnGroup.java | 6 +++--- .../refine/tests/importers/XmlImportUtilitiesTests.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main/src/com/google/refine/importers/tree/ImportColumnGroup.java b/main/src/com/google/refine/importers/tree/ImportColumnGroup.java index 233ac0da2..9b004b1b8 100644 --- a/main/src/com/google/refine/importers/tree/ImportColumnGroup.java +++ b/main/src/com/google/refine/importers/tree/ImportColumnGroup.java @@ -1,6 +1,6 @@ package com.google.refine.importers.tree; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import org.apache.commons.lang.StringUtils; @@ -9,8 +9,8 @@ import org.apache.commons.lang.StringUtils; * A column group describes a branch in tree structured data */ public class ImportColumnGroup extends ImportVertical { - public Map subgroups = new HashMap(); - public Map columns = new HashMap(); + public Map subgroups = new LinkedHashMap(); + public Map columns = new LinkedHashMap(); public int nextRowIndex; // TODO: this can be hoisted into superclass @Override diff --git a/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java b/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java index ccc0227e5..1270b96c0 100644 --- a/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java +++ b/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java @@ -264,10 +264,10 @@ public class XmlImportUtilitiesTests extends RefineTest { XmlImportUtilitiesStub.createColumnsFromImport(project, columnGroup); log(project); assertProjectCreated(project, 4, 0); - Assert.assertEquals(project.columnModel.columns.get(0).getName(), "world"); - Assert.assertEquals(project.columnModel.columns.get(1).getName(), "hello"); - Assert.assertEquals(project.columnModel.columns.get(2).getName(), "bar"); - Assert.assertEquals(project.columnModel.columns.get(3).getName(), "foo"); + Assert.assertEquals(project.columnModel.columns.get(0).getName(), "hello"); + Assert.assertEquals(project.columnModel.columns.get(1).getName(), "world"); + Assert.assertEquals(project.columnModel.columns.get(2).getName(), "foo"); + Assert.assertEquals(project.columnModel.columns.get(3).getName(), "bar"); Assert.assertEquals(project.columnModel.columnGroups.get(0).keyColumnIndex, 2); Assert.assertEquals(project.columnModel.columnGroups.get(0).startColumnIndex, 2); Assert.assertEquals(project.columnModel.columnGroups.get(0).columnSpan, 2); From 495dcd7bd574e9adf9908a0727f56ecd1d58c940 Mon Sep 17 00:00:00 2001 From: QI CUI Date: Fri, 30 Jan 2015 14:02:49 -0500 Subject: [PATCH 3/6] use the LinkedHashMap instead of HashMap to make sure the retrive order --- .../com/google/refine/importers/RdfTripleImporter.java | 4 ++-- .../google/refine/importers/tree/ImportColumnGroup.java | 6 +++--- .../refine/tests/importers/XmlImportUtilitiesTests.java | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main/src/com/google/refine/importers/RdfTripleImporter.java b/main/src/com/google/refine/importers/RdfTripleImporter.java index ed9d7dbae..739476c47 100644 --- a/main/src/com/google/refine/importers/RdfTripleImporter.java +++ b/main/src/com/google/refine/importers/RdfTripleImporter.java @@ -39,7 +39,7 @@ import static org.jrdf.graph.AnySubjectNode.ANY_SUBJECT_NODE; import java.io.InputStream; import java.util.ArrayList; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -107,7 +107,7 @@ public class RdfTripleImporter extends ImportingParserBase { ClosableIterable triples = graph.find(ANY_SUBJECT_NODE, ANY_PREDICATE_NODE, ANY_OBJECT_NODE); try { - Map> subjectToRows = new HashMap>(); + Map> subjectToRows = new LinkedHashMap>(); Column subjectColumn = new Column(project.columnModel.allocateNewCellIndex(), "subject"); project.columnModel.addColumn(0, subjectColumn, false); project.columnModel.setKeyColumnIndex(0); diff --git a/main/src/com/google/refine/importers/tree/ImportColumnGroup.java b/main/src/com/google/refine/importers/tree/ImportColumnGroup.java index 233ac0da2..9b004b1b8 100644 --- a/main/src/com/google/refine/importers/tree/ImportColumnGroup.java +++ b/main/src/com/google/refine/importers/tree/ImportColumnGroup.java @@ -1,6 +1,6 @@ package com.google.refine.importers.tree; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import org.apache.commons.lang.StringUtils; @@ -9,8 +9,8 @@ import org.apache.commons.lang.StringUtils; * A column group describes a branch in tree structured data */ public class ImportColumnGroup extends ImportVertical { - public Map subgroups = new HashMap(); - public Map columns = new HashMap(); + public Map subgroups = new LinkedHashMap(); + public Map columns = new LinkedHashMap(); public int nextRowIndex; // TODO: this can be hoisted into superclass @Override diff --git a/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java b/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java index ccc0227e5..1270b96c0 100644 --- a/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java +++ b/main/tests/server/src/com/google/refine/tests/importers/XmlImportUtilitiesTests.java @@ -264,10 +264,10 @@ public class XmlImportUtilitiesTests extends RefineTest { XmlImportUtilitiesStub.createColumnsFromImport(project, columnGroup); log(project); assertProjectCreated(project, 4, 0); - Assert.assertEquals(project.columnModel.columns.get(0).getName(), "world"); - Assert.assertEquals(project.columnModel.columns.get(1).getName(), "hello"); - Assert.assertEquals(project.columnModel.columns.get(2).getName(), "bar"); - Assert.assertEquals(project.columnModel.columns.get(3).getName(), "foo"); + Assert.assertEquals(project.columnModel.columns.get(0).getName(), "hello"); + Assert.assertEquals(project.columnModel.columns.get(1).getName(), "world"); + Assert.assertEquals(project.columnModel.columns.get(2).getName(), "foo"); + Assert.assertEquals(project.columnModel.columns.get(3).getName(), "bar"); Assert.assertEquals(project.columnModel.columnGroups.get(0).keyColumnIndex, 2); Assert.assertEquals(project.columnModel.columnGroups.get(0).startColumnIndex, 2); Assert.assertEquals(project.columnModel.columnGroups.get(0).columnSpan, 2); From b9f0ea110863b5d2039c8ca58378f1994da39230 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 6 Feb 2015 00:39:02 -0500 Subject: [PATCH 4/6] Add openjdk back in --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c1042e89c..b704dca00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,6 @@ language: java jdk: - oraclejdk7 - oraclejdk8 + - openjdk7 script: ./refine test From b3aae19568204e683dfea1ed0c1cbc7e766a0976 Mon Sep 17 00:00:00 2001 From: Thad Guidry Date: Fri, 6 Feb 2015 15:46:35 -0600 Subject: [PATCH 5/6] Update project.vt Optimized the loading of CSS and Javascript files a bit better for now. (The Butterfly controller.js still has some hardcoded style & script injection however that cause a few .less files to not be loaded in parallel, but that's a fix for another day.) --- main/webapp/modules/core/project.vt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/webapp/modules/core/project.vt b/main/webapp/modules/core/project.vt index 553641c60..65d44b075 100644 --- a/main/webapp/modules/core/project.vt +++ b/main/webapp/modules/core/project.vt @@ -36,12 +36,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OpenRefine - - - $scriptInjection $styleInjection + + + $scriptInjection