Sorting names of contexts for elaboration
This commit is contained in:
parent
42b452dbc3
commit
da3331ad74
|
@ -1,6 +1,8 @@
|
|||
package org.gcube.context;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.gcube.resourcemanagement.support.server.managers.context.ContextManager;
|
||||
import org.gcube.resourcemanagement.support.shared.types.datamodel.D4SEnvironment;
|
||||
|
@ -21,7 +23,8 @@ public abstract class ContextElaborator {
|
|||
public void all() throws Exception{
|
||||
try {
|
||||
LinkedHashMap<String, D4SEnvironment> contexts = ContextManager.readContextsWithUUIDs();
|
||||
for (String context : contexts.keySet()) {
|
||||
SortedSet<String> orderedContextNames = new TreeSet<>(contexts.keySet());
|
||||
for (String context : orderedContextNames) {
|
||||
D4SEnvironment d4sEnvironment = contexts.get(context);
|
||||
try {
|
||||
logger.debug("Going to elaborate {}", context);
|
||||
|
|
|
@ -14,6 +14,7 @@ public class TestContextList extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
ContextTest.setContextByName("/pred4s");
|
||||
File src = new File("src");
|
||||
File test = new File(src, "test");
|
||||
File resources = new File(test, "resources");
|
||||
|
|
Loading…
Reference in New Issue