diff --git a/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java b/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java index d73b5c29bca..5a5220e3761 100644 --- a/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java +++ b/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java @@ -63,7 +63,7 @@ public class TestMailEntityProcessor { paramMap.put("recurse", "false"); paramMap.put("processAttachement", "false"); DataImporter di = new DataImporter(); - di.loadDataConfig(getConfigFromMap(paramMap)); + di.loadAndInit(getConfigFromMap(paramMap)); DataConfig.Entity ent = di.getConfig().document.entities.get(0); ent.isDocRoot = true; DataImporter.RequestParams rp = new DataImporter.RequestParams(); @@ -80,7 +80,7 @@ public class TestMailEntityProcessor { paramMap.put("recurse", "true"); paramMap.put("processAttachement", "false"); DataImporter di = new DataImporter(); - di.loadDataConfig(getConfigFromMap(paramMap)); + di.loadAndInit(getConfigFromMap(paramMap)); DataConfig.Entity ent = di.getConfig().document.entities.get(0); ent.isDocRoot = true; DataImporter.RequestParams rp = new DataImporter.RequestParams(); @@ -98,7 +98,7 @@ public class TestMailEntityProcessor { paramMap.put("processAttachement", "false"); paramMap.put("exclude", ".*grandchild.*"); DataImporter di = new DataImporter(); - di.loadDataConfig(getConfigFromMap(paramMap)); + di.loadAndInit(getConfigFromMap(paramMap)); DataConfig.Entity ent = di.getConfig().document.entities.get(0); ent.isDocRoot = true; DataImporter.RequestParams rp = new DataImporter.RequestParams(); @@ -116,7 +116,7 @@ public class TestMailEntityProcessor { paramMap.put("processAttachement", "false"); paramMap.put("include", ".*grandchild.*"); DataImporter di = new DataImporter(); - di.loadDataConfig(getConfigFromMap(paramMap)); + di.loadAndInit(getConfigFromMap(paramMap)); DataConfig.Entity ent = di.getConfig().document.entities.get(0); ent.isDocRoot = true; DataImporter.RequestParams rp = new DataImporter.RequestParams(); @@ -135,7 +135,7 @@ public class TestMailEntityProcessor { paramMap.put("exclude", ".*top1.*"); paramMap.put("include", ".*grandchild.*"); DataImporter di = new DataImporter(); - di.loadDataConfig(getConfigFromMap(paramMap)); + di.loadAndInit(getConfigFromMap(paramMap)); DataConfig.Entity ent = di.getConfig().document.entities.get(0); ent.isDocRoot = true; DataImporter.RequestParams rp = new DataImporter.RequestParams(); @@ -153,7 +153,7 @@ public class TestMailEntityProcessor { paramMap.put("processAttachement", "false"); paramMap.put("fetchMailsSince", "2008-12-26 00:00:00"); DataImporter di = new DataImporter(); - di.loadDataConfig(getConfigFromMap(paramMap)); + di.loadAndInit(getConfigFromMap(paramMap)); DataConfig.Entity ent = di.getConfig().document.entities.get(0); ent.isDocRoot = true; DataImporter.RequestParams rp = new DataImporter.RequestParams(); diff --git a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java index f63aafe32cd..7d0c8dc2ff2 100644 --- a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java +++ b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java @@ -164,7 +164,7 @@ public class DataImporter { } - void loadDataConfig(String configFile) { + private void loadDataConfig(String configFile) { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); diff --git a/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java b/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java index 30c40224746..d0f7d8a8998 100644 --- a/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java +++ b/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java @@ -43,7 +43,7 @@ public class TestDocBuilder { public void singleEntityNoRows() { try { DataImporter di = new DataImporter(); - di.loadDataConfig(dc_singleEntity); + di.loadAndInit(dc_singleEntity); DataConfig cfg = di.getConfig(); DataConfig.Entity ent = cfg.document.entities.get(0); MockDataSource.setIterator("select * from x", new ArrayList().iterator()); @@ -71,7 +71,7 @@ public class TestDocBuilder { public void testDeltaImportNoRows_MustNotCommit() { try { DataImporter di = new DataImporter(); - di.loadDataConfig(dc_deltaConfig); + di.loadAndInit(dc_deltaConfig); DataConfig cfg = di.getConfig(); DataConfig.Entity ent = cfg.document.entities.get(0); MockDataSource.setIterator("select * from x", new ArrayList().iterator()); @@ -96,7 +96,7 @@ public class TestDocBuilder { public void singleEntityOneRow() { try { DataImporter di = new DataImporter(); - di.loadDataConfig(dc_singleEntity); + di.loadAndInit(dc_singleEntity); DataConfig cfg = di.getConfig(); DataConfig.Entity ent = cfg.document.entities.get(0); List l = new ArrayList(); @@ -135,7 +135,7 @@ public class TestDocBuilder { public void testImportCommand() { try { DataImporter di = new DataImporter(); - di.loadDataConfig(dc_singleEntity); + di.loadAndInit(dc_singleEntity); DataConfig cfg = di.getConfig(); DataConfig.Entity ent = cfg.document.entities.get(0); List l = new ArrayList(); @@ -173,7 +173,7 @@ public class TestDocBuilder { public void singleEntityMultipleRows() { try { DataImporter di = new DataImporter(); - di.loadDataConfig(dc_singleEntity); + di.loadAndInit(dc_singleEntity); DataConfig cfg = di.getConfig(); DataConfig.Entity ent = cfg.document.entities.get(0); ent.isDocRoot = true;