All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arangodb.shaded.vertx.core.spi.Utils Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
package com.arangodb.shaded.vertx.core.spi;

import com.arangodb.shaded.vertx.core.ServiceHelper;
import com.arangodb.shaded.vertx.core.json.jackson.JacksonFactory;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

class Utils {

  static com.arangodb.shaded.vertx.core.spi.JsonFactory load() {
    List factories = new ArrayList<>(ServiceHelper.loadFactories(com.arangodb.shaded.vertx.core.spi.JsonFactory.class));
    factories.sort(Comparator.comparingInt(JsonFactory::order));
    if (factories.size() > 0) {
      return factories.iterator().next();
    } else {
      return JacksonFactory.INSTANCE;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy