conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
public abstract class AbstractAssociation extends Field<AbstractFeature> implements Serializable {
=======
public abstract class AbstractAssociation extends Field<Feature> implements FeatureAssociation, Cloneable, Serializable {
>>>>>>>
public abstract class AbstractAssociation extends Field<AbstractFeature> implements Cloneable, Serializable { |
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type may be changed to the {@code InternationalString} interface in GeoAPI 4.0.
* </div>
*
* @return Recognition of those who contributed to the resource(s).
=======
* @return recognition of those who contributed to the resource(s).
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type may be changed to the {@code InternationalString} interface in GeoAPI 4.0.
* </div>
*
* @return recognition of those who contributed to the resource(s).
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type may be changed to the {@code InternationalString} interface in GeoAPI 4.0.
* </div>
*
* @param newValues The new credits.
=======
* @param newValues the new credits.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type may be changed to the {@code InternationalString} interface in GeoAPI 4.0.
* </div>
*
* @param newValues the new credits.
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code ResponsibleParty} is replaced by the {@link Responsibility} parent interface.
* This change may be applied in GeoAPI 4.0.
* </div>
*
* @return Means of communication with person(s) and organizations(s) associated with the resource(s).
=======
* @return means of communication with person(s) and organizations(s) associated with the resource(s).
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code ResponsibleParty} is replaced by the {@link Responsibility} parent interface.
* This change may be applied in GeoAPI 4.0.
* </div>
*
* @return means of communication with person(s) and organizations(s) associated with the resource(s).
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code ResponsibleParty} is replaced by the {@link Responsibility} parent interface.
* This change may be applied in GeoAPI 4.0.
* </div>
*
* @param newValues The new points of contacts.
=======
* @param newValues the new points of contacts.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code ResponsibleParty} is replaced by the {@link Responsibility} parent interface.
* This change may be applied in GeoAPI 4.0.
* </div>
*
* @param newValues the new points of contacts.
<<<<<<<
=======
* Returns the smallest resolvable temporal period in a resource.
*
* @return smallest resolvable temporal period in a resource.
*
* @since 0.5
*/
@Override
/// @XmlElement(name = "temporalResolution")
public Collection<Duration> getTemporalResolutions() {
return temporalResolutions = nonNullCollection(temporalResolutions, Duration.class);
}
/**
* Sets the smallest resolvable temporal period in a resource.
*
* @param newValues the new temporal resolutions.
*
* @since 0.5
*/
public void setTemporalResolutions(final Collection<? extends Duration> newValues) {
temporalResolutions = writeCollection(newValues, temporalResolutions, Duration.class);
}
/**
>>>>>>>
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code AssociatedResource} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @return Associated resource information.
=======
* @return associated resource information.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code AssociatedResource} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @return associated resource information.
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code AssociatedResource} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @param newValues The new associated resources.
=======
* @param newValues the new associated resources.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code AssociatedResource} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @param newValues the new associated resources. |
<<<<<<<
* Creates a data source for a Derby database at the given {@code $SIS_DATA/Databases/SpatialMetadata} location.
* If the database does not exist, it will be created.
*
* @param path The {@code $SIS_DATA/Databases/SpatialMetadata} directory.
* @return The data source.
* @throws Exception if the data source can not be created.
*/
private static DataSource forJavaDB(Path path) throws Exception {
/*
* If a "derby.system.home" property is set, we may be able to get a shorter path by making it
* relative to Derby home. The intend is to have a nicer URL like "jdbc:derby:SpatialMetadata"
* instead than "jdbc:derby:/a/long/path/to/SIS/Data/Databases/SpatialMetadata". In addition
* to making loggings and EPSGDataAccess.getAuthority() output nicer, it also reduces the risk
* of encoding issues if the path contains spaces or non-ASCII characters.
*/
try {
final String home = System.getProperty(HOME_KEY);
if (home != null) {
path = Paths.get(home).relativize(path);
}
} catch (RuntimeException e) { // (IllegalArgumentException | SecurityException) on the JDK7 branch.
// The path can not be relativized. This is okay. Use the public method as the logging source.
Logging.recoverableException(Logging.getLogger(Loggers.SQL), Initializer.class, "getDataSource", e);
}
/*
* Create the Derby data source using the context class loader if possible,
* or otherwise a URL class loader to the JavaDB distributed with the JDK.
*/
path = path.normalize();
final DataSource ds = forJavaDB(path.toString());
/*
* If the database does not exist, create it. We allow creation only here because we are inside
* the $SIS_DATA directory. The Java code creating the schemas is provided in other SIS modules.
* For example sis-referencing may create the EPSG dataset.
*/
if (!Files.exists(path)) {
final Method m = ds.getClass().getMethod("setCreateDatabase", String.class);
m.invoke(ds, "create");
final Connection c = ds.getConnection();
try {
for (Initializer init : ServiceLoader.load(Initializer.class)) {
init.createSchema(c);
}
} finally {
m.invoke(ds, "no"); // Any value other than "create".
c.close();
}
}
return ds;
}
/**
=======
>>>>>>>
<<<<<<<
Shutdown.register(new Callable<Object>() {
@Override public Object call() throws Exception {
shutdown();
return null;
}
});
=======
>>>>>>> |
<<<<<<<
* @since 0.4 (derived from geotk-2.0)
* @version 0.4
=======
* @since 0.4
* @version 0.5
>>>>>>>
* @since 0.4
* @version 0.4 |
<<<<<<<
private static void verifyFeatureType(final DefaultFeatureType type) {
final Iterator<? extends AbstractIdentifiedType> it = type.getProperties(true).iterator();
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "mfidref", String.class, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "startTime", Instant.class, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "endTime", Instant.class, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "trajectory", double[].class, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "state", String.class, 0);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "\"type\" code", Integer.class, 0);
=======
private static void verifyFeatureType(final FeatureType type, final Class<?> geometryType, final int maxOccurs) {
final Iterator<? extends PropertyType> it = type.getProperties(true).iterator();
assertPropertyTypeEquals((AttributeType<?>) it.next(), "mfidref", String.class, 1, 1);
assertPropertyTypeEquals((AttributeType<?>) it.next(), "startTime", Instant.class, 1, 1);
assertPropertyTypeEquals((AttributeType<?>) it.next(), "endTime", Instant.class, 1, 1);
assertPropertyTypeEquals((AttributeType<?>) it.next(), "trajectory", geometryType, 1, 1);
assertPropertyTypeEquals((AttributeType<?>) it.next(), "state", String.class, 0, maxOccurs);
assertPropertyTypeEquals((AttributeType<?>) it.next(), "\"type\" code", Integer.class, 0, maxOccurs);
>>>>>>>
private static void verifyFeatureType(final DefaultFeatureType type, final Class<?> geometryType, final int maxOccurs) {
final Iterator<? extends AbstractIdentifiedType> it = type.getProperties(true).iterator();
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "mfidref", String.class, 1, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "startTime", Instant.class, 1, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "endTime", Instant.class, 1, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "trajectory", geometryType, 1, 1);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "state", String.class, 0, maxOccurs);
assertPropertyTypeEquals((DefaultAttributeType<?>) it.next(), "\"type\" code", Integer.class, 0, maxOccurs);
<<<<<<<
private static void assertPropertyTypeEquals(final DefaultAttributeType<?> p,
final String name, final Class<?> valueClass, final int minOccurs)
=======
private static void assertPropertyTypeEquals(final AttributeType<?> p,
final String name, final Class<?> valueClass, final int minOccurs, final int maxOccurs)
>>>>>>>
private static void assertPropertyTypeEquals(final DefaultAttributeType<?> p,
final String name, final Class<?> valueClass, final int minOccurs, final int maxOccurs)
<<<<<<<
private static void assertPropertyEquals(final AbstractFeature f, final String mfidref,
=======
private void assertPropertyEquals(final Feature f, final String mfidref,
>>>>>>>
private void assertPropertyEquals(final AbstractFeature f, final String mfidref, |
<<<<<<<
// Branch-specific imports
import java.nio.file.Path;
import java.nio.file.Paths;
import org.apache.sis.internal.jdk8.JDK8;
=======
>>>>>>>
// Branch-specific imports
import org.apache.sis.internal.jdk8.JDK8; |
<<<<<<<
if (type != null) {
if (WKTKeywords.GeodeticCRS.equals(type)) return new Geodetic(properties, (GeodeticCRS) baseCRS, conversion, (EllipsoidalCS) derivedCS);
if (WKTKeywords.VerticalCRS.equals(type)) return new Vertical(properties, (VerticalCRS) baseCRS, conversion, (VerticalCS) derivedCS);
if (WKTKeywords.TimeCRS .equals(type)) return new Temporal(properties, (TemporalCRS) baseCRS, conversion, (TimeCS) derivedCS);
if (WKTKeywords.EngineeringCRS.equals(type)) {
=======
if (type != null) switch (type) {
case WKTKeywords.GeodeticCRS: return new Geodetic(properties, (GeodeticCRS) baseCRS, conversion, derivedCS);
case WKTKeywords.VerticalCRS: return new Vertical(properties, (VerticalCRS) baseCRS, conversion, (VerticalCS) derivedCS);
case WKTKeywords.TimeCRS: return new Temporal(properties, (TemporalCRS) baseCRS, conversion, (TimeCS) derivedCS);
case WKTKeywords.EngineeringCRS: {
>>>>>>>
if (type != null) {
if (WKTKeywords.GeodeticCRS.equals(type)) return new Geodetic(properties, (GeodeticCRS) baseCRS, conversion, derivedCS);
if (WKTKeywords.VerticalCRS.equals(type)) return new Vertical(properties, (VerticalCRS) baseCRS, conversion, (VerticalCS) derivedCS);
if (WKTKeywords.TimeCRS .equals(type)) return new Temporal(properties, (TemporalCRS) baseCRS, conversion, (TimeCS) derivedCS);
if (WKTKeywords.EngineeringCRS.equals(type)) {
<<<<<<<
if (type != null) {
if (WKTKeywords.GeodeticCRS.equals(type)) return new Geodetic(properties, (GeodeticCRS) baseCRS, interpolationCRS, method, baseToDerived, (EllipsoidalCS) derivedCS);
if (WKTKeywords.VerticalCRS.equals(type)) return new Vertical(properties, (VerticalCRS) baseCRS, interpolationCRS, method, baseToDerived, (VerticalCS) derivedCS);
if (WKTKeywords.TimeCRS .equals(type)) return new Temporal(properties, (TemporalCRS) baseCRS, interpolationCRS, method, baseToDerived, (TimeCS) derivedCS);
if (WKTKeywords.EngineeringCRS.equals(type)) {
=======
if (type != null) switch (type) {
case WKTKeywords.GeodeticCRS: return new Geodetic(properties, (GeodeticCRS) baseCRS, interpolationCRS, method, baseToDerived, derivedCS);
case WKTKeywords.VerticalCRS: return new Vertical(properties, (VerticalCRS) baseCRS, interpolationCRS, method, baseToDerived, (VerticalCS) derivedCS);
case WKTKeywords.TimeCRS: return new Temporal(properties, (TemporalCRS) baseCRS, interpolationCRS, method, baseToDerived, (TimeCS) derivedCS);
case WKTKeywords.EngineeringCRS: {
>>>>>>>
if (type != null) {
if (WKTKeywords.GeodeticCRS.equals(type)) return new Geodetic(properties, (GeodeticCRS) baseCRS, interpolationCRS, method, baseToDerived, derivedCS);
if (WKTKeywords.VerticalCRS.equals(type)) return new Vertical(properties, (VerticalCRS) baseCRS, interpolationCRS, method, baseToDerived, (VerticalCS) derivedCS);
if (WKTKeywords.TimeCRS .equals(type)) return new Temporal(properties, (TemporalCRS) baseCRS, interpolationCRS, method, baseToDerived, (TimeCS) derivedCS);
if (WKTKeywords.EngineeringCRS.equals(type)) { |
<<<<<<<
=======
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.opengis.metadata.citation.Party;
import org.opengis.metadata.citation.Responsibility;
>>>>>>>
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
<<<<<<<
/// @XmlElement(name = "role", required = true)
@UML(identifier="role", obligation=MANDATORY, specification=ISO_19115)
=======
@Override
@XmlElement(name = "role", required = true)
@XmlJavaTypeAdapter(CI_RoleCode.Since2014.class)
>>>>>>>
@XmlElement(name = "role", required = true)
@XmlJavaTypeAdapter(CI_RoleCode.Since2014.class)
@UML(identifier="role", obligation=MANDATORY, specification=ISO_19115)
<<<<<<<
/// @XmlElement(name = "extent")
@UML(identifier="extent", obligation=OPTIONAL, specification=ISO_19115)
=======
@Override
// @XmlElement at the end of this class.
>>>>>>>
// @XmlElement at the end of this class.
@UML(identifier="extent", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<<
/// @XmlElement(name = "party", required = true)
@UML(identifier="party", obligation=MANDATORY, specification=ISO_19115)
public Collection<AbstractParty> getParties() {
return parties = nonNullCollection(parties, AbstractParty.class);
=======
@Override
// @XmlElement at the end of this class.
public Collection<Party> getParties() {
return parties = nonNullCollection(parties, Party.class);
>>>>>>>
// @XmlElement at the end of this class.
@UML(identifier="party", obligation=MANDATORY, specification=ISO_19115)
public Collection<AbstractParty> getParties() {
return parties = nonNullCollection(parties, AbstractParty.class); |
<<<<<<<
import java.util.Spliterator;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import java.util.function.Consumer;
import org.apache.sis.feature.AbstractFeature;
import org.apache.sis.feature.DefaultFeatureType;
import org.apache.sis.feature.DefaultAttributeType;
import org.apache.sis.feature.AbstractIdentifiedType;
=======
import org.opengis.feature.Feature;
import org.opengis.feature.FeatureType;
import org.opengis.feature.PropertyType;
import org.opengis.feature.AttributeType;
>>>>>>>
import org.apache.sis.feature.AbstractFeature;
import org.apache.sis.feature.DefaultFeatureType;
import org.apache.sis.feature.DefaultAttributeType;
import org.apache.sis.feature.AbstractIdentifiedType; |
<<<<<<<
import java.util.Objects;
=======
import org.apache.sis.internal.jdk7.Objects;
import org.opengis.feature.AttributeType;
>>>>>>>
import org.apache.sis.internal.jdk7.Objects; |
<<<<<<<
final List<OperationMethod> methods = new ArrayList<OperationMethod>(factory.getAvailableMethods(SingleOperation.class));
=======
final List<OperationMethod> methods = new ArrayList<>(factory.getAvailableMethods(SingleOperation.class));
JDK8.removeIf(methods, new org.apache.sis.internal.jdk8.Predicate<OperationMethod>() {
@Override public boolean test(OperationMethod method) {
return method.getClass().getName().endsWith("Mock");
}
});
>>>>>>>
final List<OperationMethod> methods = new ArrayList<OperationMethod>(factory.getAvailableMethods(SingleOperation.class));
JDK8.removeIf(methods, new org.apache.sis.internal.jdk8.Predicate<OperationMethod>() {
@Override public boolean test(OperationMethod method) {
return method.getClass().getName().endsWith("Mock");
}
}); |
<<<<<<<
=======
* Returns a SIS metadata implementation with the values of the given arbitrary implementation.
* This method performs the first applicable action in the following choices:
*
* <ul>
* <li>If the given object is {@code null}, then this method returns {@code null}.</li>
* <li>Otherwise if the given object is already an instance of
* {@code DefaultReleasability}, then it is returned unchanged.</li>
* <li>Otherwise a new {@code DefaultReleasability} instance is created using the
* {@linkplain #DefaultReleasability(Releasability) copy constructor} and returned.
* Note that this is a <cite>shallow</cite> copy operation, since the other
* metadata contained in the given object are not recursively copied.</li>
* </ul>
*
* @param object the object to get as a SIS implementation, or {@code null} if none.
* @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultReleasability castOrCopy(final Releasability object) {
if (object == null || object instanceof DefaultReleasability) {
return (DefaultReleasability) object;
}
return new DefaultReleasability(object);
}
/**
>>>>>>>
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code Responsibility} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @return Parties to which the release statement applies.
=======
* @return parties to which the release statement applies.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code Responsibility} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @return parties to which the release statement applies.
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code Responsibility} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @param newValues The new parties.
=======
* @param newValues the new parties.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* The element type will be changed to the {@code Responsibility} interface
* when GeoAPI will provide it (tentatively in GeoAPI 3.1).
* </div>
*
* @param newValues the new parties. |
<<<<<<<
TypeBuilder(final AbstractIdentifiedType template, final Locale locale) {
=======
TypeBuilder(final IdentifiedType template, final Locale locale) {
identification = new HashMap<String,Object>(4);
>>>>>>>
TypeBuilder(final AbstractIdentifiedType template, final Locale locale) {
identification = new HashMap<String,Object>(4); |
<<<<<<<
public void setNumberType(final CodeList<?> newValue) {
checkWritePermission();
=======
public void setNumberType(final TelephoneType newValue) {
checkWritePermission(numberType);
>>>>>>>
public void setNumberType(final CodeList<?> newValue) {
checkWritePermission(numberType); |
<<<<<<<
String visibilityJsonString = (String) propertyMetadata.get(VISIBILITY_JSON_PROPERTY);
JSONObject visibilityJson = updateVisibilityJson(visibilityJsonString, visibilitySource, workspaceId);
if (propertyMetadata != null) {
propertyMetadata.put(VISIBILITY_JSON_PROPERTY, visibilityJson.toString());
}
Visibility visibility = visibilityTranslator.toVisibility(visibilityJson);
=======
LumifyVisibility lumifyVisibility = visibilityTranslator.toVisibilityWithWorkspace(visibilitySource, workspaceId);
propertyMetadata.put(VISIBILITY_SOURCE_PROPERTY, visibilitySource);
>>>>>>>
String visibilityJsonString = (String) propertyMetadata.get(VISIBILITY_JSON_PROPERTY);
JSONObject visibilityJson = updateVisibilityJson(visibilityJsonString, visibilitySource, workspaceId);
propertyMetadata.put(VISIBILITY_JSON_PROPERTY, visibilityJson.toString());
LumifyVisibility lumifyVisibility = visibilityTranslator.toVisibility(visibilityJson);
<<<<<<<
JSONObject visibilityJson = updateVisibilityJson(null, visibilitySource, workspaceId);
Visibility visibility = visibilityTranslator.toVisibility(visibilityJson);
return graph.prepareEdge(sourceVertex, destVertex, predicateLabel, visibility, authorizations)
.setProperty(VISIBILITY_JSON_PROPERTY, visibilityJson.toString(), visibility)
.save();
}
public static JSONObject updateVisibilityJson(String jsonString, String visibilitySource, String workspaceId) {
JSONObject json;
if (jsonString == null) {
json = new JSONObject();
} else {
json = new JSONObject(jsonString);
}
json.put("source", visibilitySource);
JSONArray workspacesJsonArray = JSONUtil.getOrCreateJSONArray(json, "workspaces");
JSONUtil.addToJSONArrayIfDoesNotExist(workspacesJsonArray, workspaceId);
return json;
=======
LumifyVisibility lumifyVisibility = visibilityTranslator.toVisibilityWithWorkspace(visibilitySource, workspaceId);
return graph.addEdge(sourceVertex, destVertex, predicateLabel, lumifyVisibility.getVisibility(), authorizations);
>>>>>>>
JSONObject visibilityJson = updateVisibilityJson(null, visibilitySource, workspaceId);
LumifyVisibility lumifyVisibility = visibilityTranslator.toVisibility(visibilityJson);
return graph.prepareEdge(sourceVertex, destVertex, predicateLabel, lumifyVisibility.getVisibility(), authorizations)
.setProperty(VISIBILITY_JSON_PROPERTY, visibilityJson.toString(), lumifyVisibility.getVisibility())
.save();
}
public static JSONObject updateVisibilityJson(String jsonString, String visibilitySource, String workspaceId) {
JSONObject json;
if (jsonString == null) {
json = new JSONObject();
} else {
json = new JSONObject(jsonString);
}
json.put("source", visibilitySource);
JSONArray workspacesJsonArray = JSONUtil.getOrCreateJSONArray(json, "workspaces");
JSONUtil.addToJSONArrayIfDoesNotExist(workspacesJsonArray, workspaceId);
return json; |
<<<<<<<
final DefaultNameFactory f = decoder.nameFactory;
setBandIdentifier(f.createMemberName(null, name, f.createTypeName(null, variable.getDataTypeName())));
=======
final NameFactory f = decoder.nameFactory;
final StringBuilder buffer = new StringBuilder(20);
variable.writeDataTypeName(buffer);
setBandIdentifier(f.createMemberName(null, name, f.createTypeName(null, buffer.toString())));
>>>>>>>
final DefaultNameFactory f = decoder.nameFactory;
final StringBuilder buffer = new StringBuilder(20);
variable.writeDataTypeName(buffer);
setBandIdentifier(f.createMemberName(null, name, f.createTypeName(null, buffer.toString()))); |
<<<<<<<
=======
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.file.FileSystemException;
import java.nio.file.Files;
>>>>>>>
import java.io.PrintWriter;
import java.io.StringWriter; |
<<<<<<<
// Unconditionally create a new set, because the
// user may hold a reference to the previous one.
final Set<E> c = nonNullSet(null, type);
=======
/*
* Unconditionally create a new set, because the
* user may hold a reference to the previous one.
*/
final Set<CharSequence> c = nonNullSet(null, CharSequence.class);
>>>>>>>
/*
* Unconditionally create a new set, because the
* user may hold a reference to the previous one.
*/
final Set<E> c = nonNullSet(null, type);
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return Feature types to which the information applies.
=======
* @return feature types to which the information applies.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return feature types to which the information applies.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues The new feature types.
=======
* @param newValues the new feature types.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues the new feature types.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return Attribute types to which the information applies.
=======
* @return attribute types to which the information applies.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return attribute types to which the information applies.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues The new attribute types.
=======
* @param newValues the new attribute types.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues the new attribute types.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return Feature instances to which the information applies.
=======
* @return feature instances to which the information applies.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return feature instances to which the information applies.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues The new feature instances.
=======
* @param newValues the new feature instances.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues the new feature instances.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return Attribute instances to which the information applies.
=======
* @return attribute instances to which the information applies.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @return attribute instances to which the information applies.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues The new attribute instances.
=======
* @param newValues the new attribute instances.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@code Set<CharSequence>} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-238">GEO-238</a> for more information.</div>
*
* @param newValues the new attribute instances.
<<<<<<<
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@link InternationalString} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-221">GEO-221</a> for more information.</div>
*
* @return Class of information that does not fall into the other categories, or {@code null}.
=======
* @return class of information that does not fall into the other categories, or {@code null}.
>>>>>>>
* <div class="warning"><b>Upcoming API change:</b>
* The type of this property may be changed to {@link InternationalString} for ISO 19115:2014 conformance.
* See <a href="http://jira.codehaus.org/browse/GEO-221">GEO-221</a> for more information.</div>
*
* @return class of information that does not fall into the other categories, or {@code null}. |
<<<<<<<
=======
import java.awt.image.RasterFormatException;
import org.opengis.coverage.grid.SequenceType;
>>>>>>>
import java.awt.image.RasterFormatException; |
<<<<<<<
* Creates the {@link IdentifierMapAdapter} instance to test for the given identifiers.
* This {@code IdentifierMapAdapterTest} class creates {@link IdentifierMapAdapter} instances.
* Subclasses will override this method in order to create instances of the class to test.
*
* @param identifiers The identifiers to wrap in an {@code IdentifierMapAdapter}.
* @return The {@code IdentifierMapAdapter} to test.
*/
IdentifierMapAdapter create(final Collection<Identifier> identifiers) {
return new IdentifierMapAdapter(identifiers);
}
/**
* Asserts that the content of the given map is equals to the given content, represented
* as a string. Subclasses can override this method in order to alter the expected string.
* This is needed when, using the "special case rules", {@code "href"} have been replaced
* be {@code "xlink:href"}.
*
* @param expected The expected content.
* @return The map to compare with the expected content.
*/
void assertMapEquals(final String expected, final Map<Citation,String> map) {
assertEquals(expected, map.toString());
}
/**
* Returns a string representation of the given {@code href} value.
* The default implementation returns the value unchanged.
*/
String toHRefString(final String href) {
return href;
}
/**
* Tests read and write operations on an {@link IdentifierMapAdapter}, using a well-formed
* identifier collection (no null values, no duplicated authorities).
*
* <p>This test does not use the {@link IdentifierMap}-specific API.</p>
*/
@Test
public void testGetAndPut() {
final List<Identifier> identifiers = new ArrayList<Identifier>();
final Map<Citation,String> map = create(identifiers);
assertTrue ("Newly created map shall be empty.", map.isEmpty());
assertEquals("Newly created map shall be empty.", 0, map.size());
/*
* Add two entries, then verify the map content.
*/
assertTrue(identifiers.add(new IdentifierMapEntry(ID, "myID")));
assertTrue(identifiers.add(new IdentifierMapEntry(UUID, "myUUID")));
assertFalse ("After add, map shall not be empty.", map.isEmpty());
assertEquals("After add, map shall not be empty.", 2, map.size());
assertEquals("After add, map shall not be empty.", 2, identifiers.size());
assertTrue ("Shall contain the entry we added.", map.containsKey(ID));
assertTrue ("Shall contain the entry we added.", map.containsKey(UUID));
assertFalse ("Shall not contain entry we didn't added.", map.containsKey(HREF));
assertTrue ("Shall contain the entry we added.", map.containsValue("myID"));
assertTrue ("Shall contain the entry we added.", map.containsValue("myUUID"));
assertFalse ("Shall not contain entry we didn't added.", map.containsValue("myHREF"));
assertEquals("Shall contain the entry we added.", "myID", map.get(ID));
assertEquals("Shall contain the entry we added.", "myUUID", map.get(UUID));
assertNull ("Shall not contain entry we didn't added.", map.get(HREF));
assertMapEquals("{gml:id=“myID”, gco:uuid=“myUUID”}", map);
/*
* Alter one entry (no new entry added).
*/
assertEquals("Shall get the old value.", "myUUID", map.put(UUID, "myNewUUID"));
assertFalse ("Shall not contain anymore the old value.", map.containsValue("myUUID"));
assertTrue ("Shall contain the new value.", map.containsValue("myNewUUID"));
assertMapEquals("{gml:id=“myID”, gco:uuid=“myNewUUID”}", map);
assertEquals("Map size shall be unchanged.", 2, map.size());
assertEquals("Map size shall be unchanged.", 2, identifiers.size());
/*
* Add a third identifier.
*/
assertNull ("Shall not contain entry we didn't added.", map.put(HREF, "myHREF"));
assertTrue ("Shall contain the entry we added.", map.containsValue("myHREF"));
assertTrue ("Shall contain the entry we added.", map.containsKey(HREF));
assertMapEquals("{gml:id=“myID”, gco:uuid=“myNewUUID”, xlink:href=“myHREF”}", map);
assertEquals("Map size shall be updated.", 3, map.size());
assertEquals("Map size shall be updated.", 3, identifiers.size());
/*
* Remove an identifier using the Map.remove(…) API.
*/
assertEquals("Shall get the old value.", "myNewUUID", map.remove(UUID));
assertFalse ("Shall not contain the entry we removed.", map.containsValue("myNewUUID"));
assertFalse ("Shall not contain the entry we removed.", map.containsKey(UUID));
assertMapEquals("{gml:id=“myID”, xlink:href=“myHREF”}", map);
assertEquals("Map size shall be updated.", 2, map.size());
assertEquals("Map size shall be updated.", 2, identifiers.size());
/*
* Remove an identifier using the Set.remove(…) API on values.
*/
assertTrue (map.values().remove(toHRefString("myHREF")));
assertFalse ("Shall not contain the entry we removed.", map.containsValue("myHREF"));
assertFalse ("Shall not contain the entry we removed.", map.containsKey(HREF));
assertMapEquals("{gml:id=“myID”}", map);
assertEquals("Map size shall be updated.", 1, map.size());
assertEquals("Map size shall be updated.", 1, identifiers.size());
/*
* Remove an identifier using the Set.remove(…) API on keys.
*/
assertTrue (map.keySet().remove(ID));
assertFalse ("Shall not contain the entry we removed.", map.containsValue("myID"));
assertFalse ("Shall not contain the entry we removed.", map.containsKey(ID));
assertMapEquals("{}", map);
assertEquals("Map size shall be updated.", 0, map.size());
assertEquals("Map size shall be updated.", 0, identifiers.size());
}
/**
* Tests write operations on an {@link IdentifierMap} using specific API.
*/
@Test
public void testPutSpecialized() {
final List<Identifier> identifiers = new ArrayList<Identifier>();
final IdentifierMap map = create(identifiers);
final String myID = "myID";
final java.util.UUID myUUID = fromString("a1eb6e53-93db-4942-84a6-d9e7fb9db2c7");
final URI myURI = URI.create("http://mylink");
assertNull(map.putSpecialized(ID, myID));
assertNull(map.putSpecialized(UUID, myUUID));
assertNull(map.putSpecialized(HREF, myURI));
assertMapEquals("{gml:id=“myID”,"
+ " gco:uuid=“a1eb6e53-93db-4942-84a6-d9e7fb9db2c7”,"
+ " xlink:href=“http://mylink”}", map);
assertSame(myID, map.getSpecialized(ID));
assertSame(myUUID, map.getSpecialized(UUID));
assertSame(myURI, map.getSpecialized(HREF));
assertEquals("myID", map.get(ID));
assertEquals("a1eb6e53-93db-4942-84a6-d9e7fb9db2c7", map.get(UUID));
assertEquals("http://mylink", map.get(HREF));
}
/**
* Tests read operations on an {@link IdentifierMap} using specific API.
*/
@Test
public void testGetSpecialized() {
final List<Identifier> identifiers = new ArrayList<Identifier>();
final IdentifierMap map = create(identifiers);
assertNull(map.put(ID, "myID"));
assertNull(map.put(UUID, "a1eb6e53-93db-4942-84a6-d9e7fb9db2c7"));
assertNull(map.put(HREF, "http://mylink"));
assertMapEquals("{gml:id=“myID”,"
+ " gco:uuid=“a1eb6e53-93db-4942-84a6-d9e7fb9db2c7”,"
+ " xlink:href=“http://mylink”}", map);
assertEquals("myID", map.get (ID));
assertEquals("a1eb6e53-93db-4942-84a6-d9e7fb9db2c7", map.get (UUID));
assertEquals("http://mylink", map.get (HREF));
assertEquals("myID", map.getSpecialized(ID));
assertEquals(URI.create("http://mylink"), map.getSpecialized(HREF));
assertEquals(fromString("a1eb6e53-93db-4942-84a6-d9e7fb9db2c7"), map.getSpecialized(UUID));
}
/**
* Tests the handling of duplicated authorities.
*/
@Test
public void testDuplicatedAuthorities() {
final List<Identifier> identifiers = new ArrayList<Identifier>();
assertTrue(identifiers.add(new IdentifierMapEntry(ID, "myID1")));
assertTrue(identifiers.add(new IdentifierMapEntry(UUID, "myUUID")));
assertTrue(identifiers.add(new IdentifierMapEntry(ID, "myID2")));
final IdentifierMap map = create(identifiers);
assertEquals("Duplicated authorities shall be filtered.", 2, map.size());
assertEquals("Duplicated authorities shall still exist.", 3, identifiers.size());
assertEquals("myID1", map.get(ID));
assertEquals("myUUID", map.get(UUID));
final Iterator<Citation> it = map.keySet().iterator();
assertTrue(it.hasNext());
assertSame(ID, it.next());
it.remove();
assertTrue(it.hasNext());
assertSame(UUID, it.next());
assertFalse("Duplicated authority shall have been removed.", it.hasNext());
assertEquals(1, identifiers.size());
assertEquals(1, map.size());
}
/**
=======
>>>>>>>
<<<<<<<
final List<Identifier> identifiers = new ArrayList<Identifier>();
final Map<Citation,String> map = create(identifiers);
=======
final List<Identifier> identifiers = new ArrayList<>();
final Map<Citation,String> map = new IdentifierMapAdapter(identifiers);
>>>>>>>
final List<Identifier> identifiers = new ArrayList<Identifier>();
final Map<Citation,String> map = new IdentifierMapAdapter(identifiers); |
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @return Information identifying the issue of the series, or {@code null}.
=======
* @return information identifying the issue of the series, or {@code null}.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @return information identifying the issue of the series, or {@code null}.
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @param newValue The new issue identification, or {@code null} if none.
=======
* @param newValue the new issue identification, or {@code null} if none.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @param newValue the new issue identification, or {@code null} if none.
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @return Details on which pages of the publication the article was published, or {@code null}.
=======
* @return details on which pages of the publication the article was published, or {@code null}.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @return details on which pages of the publication the article was published, or {@code null}.
<<<<<<<
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @param newValue The new page, or {@code null} if none.
=======
* @param newValue the new page, or {@code null} if none.
>>>>>>>
* <div class="warning"><b>Upcoming API change — generalization</b><br>
* As of ISO 19115:2014, {@code String} is replaced by the {@link InternationalString} interface.
* This change will be tentatively applied in GeoAPI 4.0.
* </div>
*
* @param newValue the new page, or {@code null} if none. |
<<<<<<<
import org.opengis.referencing.ReferenceIdentifier;
=======
import org.apache.sis.internal.simple.SimpleCitation;
>>>>>>>
import org.opengis.referencing.ReferenceIdentifier;
import org.apache.sis.internal.simple.SimpleCitation;
<<<<<<<
assertEquals("EPSG", builder.properties.get(ReferenceIdentifier.CODESPACE_KEY));
assertSame (IOGP, builder.properties.get(Identifier.AUTHORITY_KEY));
=======
assertEquals("EPSG", builder.properties.get(Identifier.CODESPACE_KEY));
assertSame (Citations.EPSG, builder.properties.get(Identifier.AUTHORITY_KEY));
>>>>>>>
assertEquals("EPSG", builder.properties.get(ReferenceIdentifier.CODESPACE_KEY));
assertSame (Citations.EPSG, builder.properties.get(Identifier.AUTHORITY_KEY));
<<<<<<<
assertEquals("EPSG", builder.properties.get(ReferenceIdentifier.CODESPACE_KEY));
assertSame (IOGP, builder.properties.get(Identifier.AUTHORITY_KEY));
builder.setCodeSpace(EPSG, "EPSG");
assertEquals("EPSG", builder.properties.get(ReferenceIdentifier.CODESPACE_KEY));
assertSame ( EPSG, builder.properties.get(Identifier.AUTHORITY_KEY));
=======
assertEquals("EPSG", builder.properties.get(Identifier.CODESPACE_KEY));
assertSame (Citations.EPSG, builder.properties.get(Identifier.AUTHORITY_KEY));
builder.setCodeSpace(IOGP, "EPSG");
assertEquals("EPSG", builder.properties.get(Identifier.CODESPACE_KEY));
assertSame ( IOGP, builder.properties.get(Identifier.AUTHORITY_KEY));
>>>>>>>
assertEquals("EPSG", builder.properties.get(ReferenceIdentifier.CODESPACE_KEY));
assertSame (Citations.EPSG, builder.properties.get(Identifier.AUTHORITY_KEY));
builder.setCodeSpace(IOGP, "EPSG");
assertEquals("EPSG", builder.properties.get(ReferenceIdentifier.CODESPACE_KEY));
assertSame ( IOGP, builder.properties.get(Identifier.AUTHORITY_KEY));
<<<<<<<
if (key.equals(Identifier.AUTHORITY_KEY)) {
assertSame("Authority and codespace shall be unchanged.", IOGP, value);
} else if (key.equals(ReferenceIdentifier.CODESPACE_KEY)) {
assertEquals("Authority and codespace shall be unchanged.", "EPSG", value);
} else {
assertNull("Should not contain any non-null value except the authority.", value);
=======
{ // This is a switch(String) in the JDK7 branch.
if (key.equals(Identifier.AUTHORITY_KEY)) {
assertSame("Authority and codespace shall be unchanged.", Citations.EPSG, value);
} else if (key.equals(Identifier.CODESPACE_KEY)) {
assertEquals("Authority and codespace shall be unchanged.", "EPSG", value);
} else {
assertNull("Should not contain any non-null value except the authority.", value);
}
>>>>>>>
{ // This is a switch(String) in the JDK7 branch.
if (key.equals(Identifier.AUTHORITY_KEY)) {
assertSame("Authority and codespace shall be unchanged.", Citations.EPSG, value);
} else if (key.equals(ReferenceIdentifier.CODESPACE_KEY)) {
assertEquals("Authority and codespace shall be unchanged.", "EPSG", value);
} else {
assertNull("Should not contain any non-null value except the authority.", value);
} |
<<<<<<<
// Related to JDK8
import org.apache.sis.internal.jdk8.Function;
=======
// Branch-dependent imports
import java.util.function.Function;
>>>>>>>
// Branch-dependent imports
import org.apache.sis.internal.jdk8.Function; |
<<<<<<<
public class SimpleIdentifier implements ReferenceIdentifier, Serializable {
=======
public class SimpleIdentifier implements Identifier, Deprecable, Serializable {
>>>>>>>
public class SimpleIdentifier implements ReferenceIdentifier, Deprecable, Serializable {
<<<<<<<
=======
* Returns a natural language description of the meaning of the code value.
*
* @return Natural language description, or {@code null} if none.
*
* @since 0.5
*/
@Override
public InternationalString getDescription() {
return null;
}
/**
* An optional free text.
*
* @since 0.6
*/
@Override
public InternationalString getRemarks() {
return null;
}
/**
* {@code true} if this identifier is deprecated.
*
* @since 0.6
*/
@Override
public boolean isDeprecated() {
return isDeprecated;
}
/**
>>>>>>>
* An optional free text.
*
* @since 0.6
*/
@Override
public InternationalString getRemarks() {
return null;
}
/**
* {@code true} if this identifier is deprecated.
*
* @since 0.6
*/
@Override
public boolean isDeprecated() {
return isDeprecated;
}
/** |
<<<<<<<
transform = ((MathTransformProvider) method).createMathTransform(parameters);
} catch (IllegalArgumentException exception) {
=======
transform = ((MathTransformProvider) method).createMathTransform(this, parameters);
} catch (IllegalArgumentException | IllegalStateException exception) {
>>>>>>>
transform = ((MathTransformProvider) method).createMathTransform(this, parameters);
} catch (IllegalArgumentException exception) { |
<<<<<<<
* @return The wrapper for the code list value.
=======
* @param wrapper the wrapper.
* @return the wrapped value.
>>>>>>>
* @return the wrapper for the code list value.
<<<<<<<
* @return The code list class.
=======
* @param e the value to wrap.
* @return the wrapped value.
>>>>>>>
* @return the code list class. |
<<<<<<<
import static org.apache.sis.referencing.IdentifiedObjects.isHeuristicMatchForName;
// Branch-dependent imports
import org.apache.sis.internal.jdk8.JDK8;
=======
>>>>>>>
// Branch-dependent imports
import org.apache.sis.internal.jdk8.JDK8; |
<<<<<<<
} else if (element instanceof CodeList<?>) {
replacement = Types.getCodeTitle((CodeList<?>) element).toString(getLocale());
=======
} else if (element instanceof ControlledVocabulary) {
replacement = Types.getCodeTitle((ControlledVocabulary) element).toString(getLocale());
} else if (element instanceof Unit<?>) {
replacement = PatchedUnitFormat.toString((Unit<?>) element);
>>>>>>>
} else if (element instanceof CodeList<?>) {
replacement = Types.getCodeTitle((CodeList<?>) element).toString(getLocale());
} else if (element instanceof Unit<?>) {
replacement = PatchedUnitFormat.toString((Unit<?>) element); |
<<<<<<<
// Branch-dependent imports
import java.util.Objects;
import org.apache.sis.internal.jdk8.JDK8;
=======
>>>>>>>
import org.apache.sis.internal.jdk8.JDK8; |
<<<<<<<
final CheckedArrayList list = new CheckedArrayList<String>(String.class);
=======
final CheckedArrayList<String> list = new CheckedArrayList<>(String.class);
final String message = testAddWrongType(list);
assertTrue("element", message.contains("element"));
assertTrue("Integer", message.contains("Integer"));
assertTrue("String", message.contains("String"));
}
/**
* Implementation of {@link #testAddWrongType()}, also shared by {@link #testAddWrongTypeToSublist()}.
* Returns the exception message.
*/
@SuppressWarnings({"unchecked","rawtypes"})
private static String testAddWrongType(final List list) {
>>>>>>>
final CheckedArrayList<String> list = new CheckedArrayList<String>(String.class);
final String message = testAddWrongType(list);
assertTrue("element", message.contains("element"));
assertTrue("Integer", message.contains("Integer"));
assertTrue("String", message.contains("String"));
}
/**
* Implementation of {@link #testAddWrongType()}, also shared by {@link #testAddWrongTypeToSublist()}.
* Returns the exception message.
*/
@SuppressWarnings({"unchecked","rawtypes"})
private static String testAddWrongType(final List list) { |
<<<<<<<
@Override
public Stream<AbstractFeature> features(boolean parallel) {
=======
public Stream<Feature> features(boolean parallel) {
>>>>>>>
public Stream<AbstractFeature> features(boolean parallel) { |
<<<<<<<
import org.opengis.annotation.UML;
=======
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
>>>>>>>
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
<<<<<<<
import static org.opengis.annotation.Obligation.OPTIONAL;
import static org.opengis.annotation.Specification.ISO_19115;
=======
import org.apache.sis.internal.jaxb.FilterByVersion;
import org.apache.sis.internal.jaxb.LegacyNamespaces;
import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
>>>>>>>
import org.apache.sis.internal.jaxb.FilterByVersion;
import org.apache.sis.internal.jaxb.LegacyNamespaces;
import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
// Branch-specific imports
import org.opengis.annotation.UML;
import static org.opengis.annotation.Obligation.OPTIONAL;
import static org.opengis.annotation.Specification.ISO_19115;
<<<<<<<
/// @XmlElement(name = "processingLevelCode")
@UML(identifier="processingLevelCode", obligation=OPTIONAL, specification=ISO_19115)
=======
@Override
@XmlElement(name = "processingLevelCode")
@XmlJavaTypeAdapter(MD_Identifier.Since2014.class)
>>>>>>>
@XmlElement(name = "processingLevelCode")
@XmlJavaTypeAdapter(MD_Identifier.Since2014.class)
@UML(identifier="processingLevelCode", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<<
/// @XmlElement(name = "attributeGroup")
@UML(identifier="attributeGroup", obligation=OPTIONAL, specification=ISO_19115)
public Collection<DefaultAttributeGroup> getAttributeGroups() {
return attributeGroups = nonNullCollection(attributeGroups, DefaultAttributeGroup.class);
=======
@Override
// @XmlElement at the end of this class.
public Collection<AttributeGroup> getAttributeGroups() {
return attributeGroups = nonNullCollection(attributeGroups, AttributeGroup.class);
>>>>>>>
// @XmlElement at the end of this class.
@UML(identifier="attributeGroup", obligation=OPTIONAL, specification=ISO_19115)
public Collection<DefaultAttributeGroup> getAttributeGroups() {
return attributeGroups = nonNullCollection(attributeGroups, DefaultAttributeGroup.class);
<<<<<<<
final Collection<DefaultAttributeGroup> groups = getAttributeGroups();
if (groups != null) { // May be null on marshalling.
for (final DefaultAttributeGroup g : groups) {
final Collection<? extends CoverageContentType> contentTypes = g.getContentTypes();
if (contentTypes != null) { // May be null on marshalling.
for (final CoverageContentType t : contentTypes) {
if (type == null) {
type = t;
} else {
LegacyPropertyAdapter.warnIgnoredExtraneous(CoverageContentType.class,
DefaultCoverageDescription.class, "getContentType");
break;
=======
if (FilterByVersion.LEGACY_METADATA.accept()) {
final Collection<AttributeGroup> groups = getAttributeGroups();
if (groups != null) { // May be null on marshalling.
for (final AttributeGroup g : groups) {
final Collection<? extends CoverageContentType> contentTypes = g.getContentTypes();
if (contentTypes != null) { // May be null on marshalling.
for (final CoverageContentType t : contentTypes) {
if (type == null) {
type = t;
} else {
LegacyPropertyAdapter.warnIgnoredExtraneous(CoverageContentType.class,
DefaultCoverageDescription.class, "getContentType");
break;
}
>>>>>>>
if (FilterByVersion.LEGACY_METADATA.accept()) {
final Collection<DefaultAttributeGroup> groups = getAttributeGroups();
if (groups != null) { // May be null on marshalling.
for (final DefaultAttributeGroup g : groups) {
final Collection<? extends CoverageContentType> contentTypes = g.getContentTypes();
if (contentTypes != null) { // May be null on marshalling.
for (final CoverageContentType t : contentTypes) {
if (type == null) {
type = t;
} else {
LegacyPropertyAdapter.warnIgnoredExtraneous(CoverageContentType.class,
DefaultCoverageDescription.class, "getContentType");
break;
}
<<<<<<<
return new LegacyPropertyAdapter<RangeDimension,DefaultAttributeGroup>(getAttributeGroups()) {
=======
if (!FilterByVersion.LEGACY_METADATA.accept()) return null;
return new LegacyPropertyAdapter<RangeDimension,AttributeGroup>(getAttributeGroups()) {
>>>>>>>
if (!FilterByVersion.LEGACY_METADATA.accept()) return null;
return new LegacyPropertyAdapter<RangeDimension,DefaultAttributeGroup>(getAttributeGroups()) { |
<<<<<<<
final ParameterValue<Integer> nonExistent = new DefaultParameterDescriptor<Integer>(
singletonMap(NAME_KEY, "Optional 5"), Integer.class, null, null, null, false).createValue();
=======
final ParameterValue<Integer> nonExistent = new DefaultParameterDescriptor<>(
singletonMap(NAME_KEY, "Optional 5"), 0, 1, Integer.class, null, null, null).createValue();
>>>>>>>
final ParameterValue<Integer> nonExistent = new DefaultParameterDescriptor<Integer>(
singletonMap(NAME_KEY, "Optional 5"), 0, 1, Integer.class, null, null, null).createValue(); |
<<<<<<<
final String name = getDisplayName();
mb.addResourceScope(ScopeCode.valueOf("COLLECTION"), Resources.formatInternational(Resources.Keys.DirectoryContent_1, name));
=======
mb.addResourceScope(ScopeCode.COLLECTION, Resources.formatInternational(Resources.Keys.DirectoryContent_1, getDisplayName()));
>>>>>>>
mb.addResourceScope(ScopeCode.valueOf("COLLECTION"), Resources.formatInternational(Resources.Keys.DirectoryContent_1, getDisplayName())); |
<<<<<<<
// Branch-dependent imports
import org.apache.sis.internal.jdk7.Objects;
=======
import java.util.List;
import java.util.Objects;
>>>>>>>
import java.util.List;
import org.apache.sis.internal.jdk7.Objects; |
<<<<<<<
import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
=======
import org.opengis.metadata.citation.TelephoneType;
import org.apache.sis.internal.metadata.legacy.LegacyPropertyAdapter;
>>>>>>>
import org.apache.sis.internal.metadata.legacy.LegacyPropertyAdapter; |
<<<<<<<
// Related to JDK7.
import org.apache.sis.internal.jdk7.Objects;
=======
// Branch-dependent imports
import java.util.Objects;
>>>>>>>
// Branch-dependent imports
import org.apache.sis.internal.jdk7.Objects; |
<<<<<<<
=======
* Tests the {@link MetadataStandard#ISO_19123} constant. Getters shall
* be accessible even if there is no implementation on the classpath.
*/
@Test
@DependsOnMethod("testGetAccessor")
public void testWithoutImplementation() {
standard = MetadataStandard.ISO_19123;
assertFalse("isMetadata(String)", isMetadata(String.class));
assertTrue ("isMetadata(Citation)", isMetadata(Citation.class)); // Transitive dependency
assertTrue ("isMetadata(DefaultCitation)", isMetadata(DefaultCitation.class)); // Transitive dependency
assertTrue ("isMetadata(RectifiedGrid)", isMetadata(RectifiedGrid.class));
/*
* Ensure that the getters have been found.
*/
final Map<String,String> names = standard.asNameMap(RectifiedGrid.class, KeyNamePolicy.UML_IDENTIFIER, KeyNamePolicy.JAVABEANS_PROPERTY);
assertFalse("Getters should have been found even if there is no implementation.", names.isEmpty());
assertEquals("dimension", names.get("dimension"));
assertEquals("cells", names.get("cell"));
/*
* Ensure that the type are recognized, especially RectifiedGrid.getOffsetVectors()
* which is of type List<double[]>.
*/
Map<String,Class<?>> types;
types = standard.asTypeMap(RectifiedGrid.class, KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.PROPERTY_TYPE);
assertEquals("The return type is the int primitive type.", Integer.TYPE, types.get("dimension"));
assertEquals("The offset vectors are stored in a List.", List.class, types.get("offsetVectors"));
types = standard.asTypeMap(RectifiedGrid.class, KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE);
assertEquals("As elements in a list of dimensions.", Integer.class, types.get("dimension"));
assertEquals("As elements in the list of offset vectors.", double[].class, types.get("offsetVectors"));
}
/**
>>>>>>> |
<<<<<<<
new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 1", "Ambiguity"), type, null, null, DEFAULT_VALUE, true),
new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 2", "Alias 2"), type, null, null, DEFAULT_VALUE, true),
new DefaultParameterDescriptor<Integer>(name(properties, "Optional 3", "Alias 3"), type, null, null, DEFAULT_VALUE, false),
new MultiOccurrenceDescriptor <Integer>(name(properties, "Optional 4", "Ambiguity"), type, null, null, DEFAULT_VALUE, false)
=======
new DefaultParameterDescriptor<>(name(properties, "Mandatory 1", "Ambiguity"), 1, 1, type, null, null, DEFAULT_VALUE),
new DefaultParameterDescriptor<>(name(properties, "Mandatory 2", "Alias 2"), 1, 1, type, null, null, DEFAULT_VALUE),
new DefaultParameterDescriptor<>(name(properties, "Optional 3", "Alias 3"), 0, 1, type, null, null, DEFAULT_VALUE),
new DefaultParameterDescriptor<>(name(properties, "Optional 4", "Ambiguity"), 0, 2, type, null, null, DEFAULT_VALUE)
>>>>>>>
new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 1", "Ambiguity"), 1, 1, type, null, null, DEFAULT_VALUE),
new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 2", "Alias 2"), 1, 1, type, null, null, DEFAULT_VALUE),
new DefaultParameterDescriptor<Integer>(name(properties, "Optional 3", "Alias 3"), 0, 1, type, null, null, DEFAULT_VALUE),
new DefaultParameterDescriptor<Integer>(name(properties, "Optional 4", "Ambiguity"), 0, 2, type, null, null, DEFAULT_VALUE)
<<<<<<<
p1 = new DefaultParameterDescriptor<Integer>(name(properties, "Name", null), type, null, null, null, true);
p2 = new DefaultParameterDescriptor<Integer>(name(properties, " NAME ", null), type, null, null, null, true);
=======
p1 = new DefaultParameterDescriptor<>(name(properties, "Name", null), 1, 1, type, null, null, null);
p2 = new DefaultParameterDescriptor<>(name(properties, " NAME ", null), 1, 1, type, null, null, null);
>>>>>>>
p1 = new DefaultParameterDescriptor<Integer>(name(properties, "Name", null), 1, 1, type, null, null, null);
p2 = new DefaultParameterDescriptor<Integer>(name(properties, " NAME ", null), 1, 1, type, null, null, null); |
<<<<<<<
// Related to JDK7 and JDK8
import org.apache.sis.internal.jdk7.Objects;
=======
// Branch-dependent imports
import java.util.Objects;
>>>>>>>
// Branch-dependent imports
import org.apache.sis.internal.jdk7.Objects; |
<<<<<<<
final Date lastWeek = new Date(now.getTime() - 7*day);
final Date other = new Date(lastWeek.getTime() + 2*day);
assertTrue(ranges.add(new Range<Date>(Date.class, lastWeek, true, other, false)));
=======
final Date lastWeek = new Date(now.getTime() - 7*MILLISECONDS_PER_DAY);
final Date other = new Date(lastWeek.getTime() + 2*MILLISECONDS_PER_DAY);
assertTrue(ranges.add(new Range<>(Date.class, lastWeek, true, other, false)));
>>>>>>>
final Date lastWeek = new Date(now.getTime() - 7*MILLISECONDS_PER_DAY);
final Date other = new Date(lastWeek.getTime() + 2*MILLISECONDS_PER_DAY);
assertTrue(ranges.add(new Range<Date>(Date.class, lastWeek, true, other, false))); |
<<<<<<<
import org.opengis.referencing.ReferenceIdentifier;
=======
import org.apache.sis.internal.referencing.NilReferencingObject;
>>>>>>>
import org.opengis.referencing.ReferenceIdentifier;
import org.apache.sis.internal.referencing.NilReferencingObject; |
<<<<<<<
Connection c = source.getConnection();
try {
for (Initializer init : ServiceLoader.load(Initializer.class)) {
=======
try (Connection c = source.getConnection()) {
for (Initializer init : DefaultFactories.createServiceLoader(Initializer.class)) {
>>>>>>>
Connection c = source.getConnection();
try {
for (Initializer init : DefaultFactories.createServiceLoader(Initializer.class)) { |
<<<<<<<
public PropertyItem(String elementId, String name, String key, JsonNode oldData, JsonNode newData, SandboxStatus sandboxStatus, boolean deleted, String visibilityString) {
super("PropertyDiffItem", sandboxStatus, deleted);
=======
public PropertyItem(String elementType, String elementId, String name, String key, JsonNode oldData, JsonNode newData, SandboxStatus sandboxStatus, String visibilityString) {
super("PropertyDiffItem", sandboxStatus);
this.elementType = elementType;
>>>>>>>
public PropertyItem(String elementType, String elementId, String name, String key, JsonNode oldData, JsonNode newData, SandboxStatus sandboxStatus, boolean deleted, String visibilityString) {
super("PropertyDiffItem", sandboxStatus, deleted);
this.elementType = elementType; |
<<<<<<<
import org.apache.sis.internal.jdk7.Objects;
=======
import java.util.Objects;
import org.opengis.feature.IdentifiedType;
>>>>>>>
import org.apache.sis.internal.jdk7.Objects;
import org.opengis.feature.IdentifiedType; |
<<<<<<<
import com.altamiracorp.securegraph.Visibility;
import org.json.JSONObject;
=======
>>>>>>>
import org.json.JSONObject;
<<<<<<<
Visibility toVisibility(JSONObject visibilityJson);
=======
LumifyVisibility toVisibility(String source, String... additionalRequiredVisibilities);
LumifyVisibility toVisibilityWithWorkspace(String source, String workspaceId);
>>>>>>>
LumifyVisibility toVisibility(JSONObject visibilityJson); |
<<<<<<<
if (id != null && equalsFiltered(code, id.getCode(), LETTERS_AND_DIGITS, true)) {
if (identifier instanceof ReferenceIdentifier) {
final String codeSpace = ((ReferenceIdentifier) identifier).getCodeSpace();
if (codeSpace != null && id instanceof ReferenceIdentifier) {
final String cs = ((ReferenceIdentifier) id).getCodeSpace();
=======
if (id != null && equalsFiltered(code, id.getCode())) {
if (identifier != null) {
final String codeSpace = identifier.getCodeSpace();
if (codeSpace != null) {
final String cs = id.getCodeSpace();
>>>>>>>
if (id != null && equalsFiltered(code, id.getCode())) {
if (identifier instanceof ReferenceIdentifier) {
final String codeSpace = ((ReferenceIdentifier) identifier).getCodeSpace();
if (codeSpace != null && id instanceof ReferenceIdentifier) {
final String cs = ((ReferenceIdentifier) id).getCodeSpace(); |
<<<<<<<
public final void writeByte(final int v) throws IOException {
ensureBufferAccepts(Byte.SIZE / Byte.SIZE);
buffer.put((byte) v);
=======
public final void writeByte(final int value) throws IOException {
ensureBufferAccepts(Byte.BYTES);
buffer.put((byte) value);
>>>>>>>
public final void writeByte(final int value) throws IOException {
ensureBufferAccepts(Byte.SIZE / Byte.SIZE);
buffer.put((byte) value);
<<<<<<<
public final void writeShort(final int v) throws IOException {
ensureBufferAccepts(Short.SIZE / Byte.SIZE);
buffer.putShort((short) v);
=======
public final void writeShort(final int value) throws IOException {
ensureBufferAccepts(Short.BYTES);
buffer.putShort((short) value);
>>>>>>>
public final void writeShort(final int value) throws IOException {
ensureBufferAccepts(Short.SIZE / Byte.SIZE);
buffer.putShort((short) value);
<<<<<<<
public final void writeChar(final int v) throws IOException {
ensureBufferAccepts(Character.SIZE / Byte.SIZE);
buffer.putChar((char) v);
=======
public final void writeChar(final int value) throws IOException {
ensureBufferAccepts(Character.BYTES);
buffer.putChar((char) value);
>>>>>>>
public final void writeChar(final int value) throws IOException {
ensureBufferAccepts(Character.SIZE / Byte.SIZE);
buffer.putChar((char) value);
<<<<<<<
public final void writeInt(final int v) throws IOException {
ensureBufferAccepts(Integer.SIZE / Byte.SIZE);
buffer.putInt(v);
=======
public final void writeInt(final int value) throws IOException {
ensureBufferAccepts(Integer.BYTES);
buffer.putInt(value);
>>>>>>>
public final void writeInt(final int value) throws IOException {
ensureBufferAccepts(Integer.SIZE / Byte.SIZE);
buffer.putInt(value);
<<<<<<<
public final void writeLong(final long v) throws IOException {
ensureBufferAccepts(Long.SIZE / Byte.SIZE);
buffer.putLong(v);
=======
public final void writeLong(final long value) throws IOException {
ensureBufferAccepts(Long.BYTES);
buffer.putLong(value);
>>>>>>>
public final void writeLong(final long value) throws IOException {
ensureBufferAccepts(Long.SIZE / Byte.SIZE);
buffer.putLong(value);
<<<<<<<
public final void writeFloat(final float v) throws IOException {
ensureBufferAccepts(Float.SIZE / Byte.SIZE);
buffer.putFloat(v);
=======
public final void writeFloat(final float value) throws IOException {
ensureBufferAccepts(Float.BYTES);
buffer.putFloat(value);
>>>>>>>
public final void writeFloat(final float value) throws IOException {
ensureBufferAccepts(Float.SIZE / Byte.SIZE);
buffer.putFloat(value);
<<<<<<<
public final void writeDouble(final double v) throws IOException {
ensureBufferAccepts(Double.SIZE / Byte.SIZE);
buffer.putDouble(v);
=======
public final void writeDouble(final double value) throws IOException {
ensureBufferAccepts(Double.BYTES);
buffer.putDouble(value);
>>>>>>>
public final void writeDouble(final double value) throws IOException {
ensureBufferAccepts(Double.SIZE / Byte.SIZE);
buffer.putDouble(value); |
<<<<<<<
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features()) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features()) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features()) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features()) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features()) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features()) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
final Stream<AbstractFeature> f1 = reader.features(false);
final Iterator<AbstractFeature> i1 = f1.iterator();
=======
final Stream<Feature> f1 = reader.features();
final Iterator<Feature> i1 = f1.iterator();
>>>>>>>
final Stream<AbstractFeature> f1 = reader.features();
final Iterator<AbstractFeature> i1 = f1.iterator();
<<<<<<<
final Stream<AbstractFeature> f2 = reader.features(false);
final Iterator<AbstractFeature> i2 = f2.iterator();
=======
final Stream<Feature> f2 = reader.features();
final Iterator<Feature> i2 = f2.iterator();
>>>>>>>
final Stream<AbstractFeature> f2 = reader.features();
final Iterator<AbstractFeature> i2 = f2.iterator();
<<<<<<<
final Stream<AbstractFeature> f3 = reader.features(false);
final Iterator<AbstractFeature> i3 = f3.iterator();
=======
final Stream<Feature> f3 = reader.features();
final Iterator<Feature> i3 = f3.iterator();
>>>>>>>
final Stream<AbstractFeature> f3 = reader.features();
final Iterator<AbstractFeature> i3 = f3.iterator(); |
<<<<<<<
// Related to JDK7
import org.apache.sis.internal.jdk7.Objects;
=======
// Branch-dependent imports
import java.util.Objects;
>>>>>>>
// Branch-dependent imports
import org.apache.sis.internal.jdk7.Objects; |
<<<<<<<
// Related to JDK7
import org.apache.sis.internal.jdk7.Objects;
=======
// Branch-dependent imports
import java.util.Objects;
>>>>>>>
// Branch-dependent imports
import org.apache.sis.internal.jdk7.Objects; |
<<<<<<<
import com.altamiracorp.securegraph.Graph;
import com.google.inject.*;
import org.reflections.Reflections;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper;
=======
import com.google.inject.*;
>>>>>>>
import com.altamiracorp.securegraph.Graph;
import com.google.inject.*;
<<<<<<<
import java.util.Set;
=======
import java.util.ServiceLoader;
>>>>>>>
import java.util.ServiceLoader;
<<<<<<<
LOGGER.info("Searching for BootstrapBindingProviders.");
Reflections reflections = new Reflections(ClasspathHelper.forJavaClassPath(), new SubTypesScanner());
Set<Class<? extends BootstrapBindingProvider>> bindingProviders = reflections.getSubTypesOf(BootstrapBindingProvider.class);
LOGGER.info("Found %d BootstrapBindingProviders", bindingProviders.size());
if (LOGGER.isDebugEnabled()) {
for (Class<? extends BootstrapBindingProvider> pc : bindingProviders) {
LOGGER.debug("Found BootstrapBindingProvider: %s", pc.getName());
}
}
=======
LOGGER.info("Running BootstrapBindingProviders");
ServiceLoader<BootstrapBindingProvider> bindingProviders = ServiceLoader.load(BootstrapBindingProvider.class);
>>>>>>>
LOGGER.info("Running BootstrapBindingProviders");
ServiceLoader<BootstrapBindingProvider> bindingProviders = ServiceLoader.load(BootstrapBindingProvider.class);
<<<<<<<
private <T extends BootstrapBindingProvider> T initBindingProvider(final Class<T> providerClass) {
Throwable error;
try {
return providerClass.newInstance();
} catch (InstantiationException ie) {
LOGGER.error("Error while instantiating BootstrapBindingProvider [%s]", providerClass.getName(), ie);
error = ie;
} catch (IllegalAccessException iae) {
LOGGER.error("Unable to access default constructor for BootstrapBindingProvider [%s]", providerClass.getName(), iae);
error = iae;
}
throw new BootstrapException(error, "Unable to create BootstrapBindingProvider: %s", providerClass);
}
=======
>>>>>>>
<<<<<<<
=======
private static class SearchProviderProvider implements Provider<SearchProvider> {
/**
* The SearchProvider class to instantiate.
*/
private final Class<? extends SearchProvider> clazz;
/**
* The Lumify Configuration.
*/
private final Configuration config;
/**
* The Lumify User for the SearchProvider.
*/
private final User user;
/**
* The Lumify MetricsManager.
*/
private final MetricsManager metricsManager;
public SearchProviderProvider(Class<? extends SearchProvider> clazz, Configuration config, User user, MetricsManager metricsManager) {
this.clazz = clazz;
this.config = config;
this.user = user;
this.metricsManager = metricsManager;
}
@Override
public SearchProvider get() {
Throwable error;
try {
SearchProvider provider = clazz.newInstance();
provider.init(config, user, metricsManager);
return provider;
} catch (InstantiationException ie) {
error = ie;
} catch (IllegalAccessException iae) {
error = iae;
}
throw new BootstrapException(error, "Unable to instantiate SearchProvider: %s", clazz.getName());
}
}
>>>>>>> |
<<<<<<<
final Resource resource = findResource(identifier, getRootResource(), new IdentityHashMap<Resource,Boolean>());
=======
final Resource resource = findResource(identifier, this, new IdentityHashMap<>());
>>>>>>>
final Resource resource = findResource(identifier, this, new IdentityHashMap<Resource,Boolean>()); |
<<<<<<<
=======
// Branch-dependent imports
import org.opengis.feature.Attribute;
import org.opengis.feature.AttributeType;
>>>>>>>
<<<<<<<
public DefaultAttributeType<V> getType() {
=======
@Override
public AttributeType<V> getType() {
>>>>>>>
public DefaultAttributeType<V> getType() { |
<<<<<<<
=======
// Branch-dependent imports
import org.opengis.coverage.grid.GridEnvelope;
import org.opengis.coverage.CannotEvaluateException;
import org.opengis.coverage.PointOutsideCoverageException;
>>>>>>> |
<<<<<<<
* @since 0.3 (derived from geotk-2.5)
* @version 0.3
=======
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
* @version 0.5
>>>>>>>
* @since 0.3
* @version 0.3 |
<<<<<<<
@DependsOn(AbstractMathTransformTest.class)
public strictfp class ProjectiveTransformTest extends TransformTestCase {
/**
* The factory to use for creating linear transforms.
*/
private final MathTransformFactory mtFactory;
/**
* The matrix for the tested transform.
*/
private Matrix matrix;
=======
@DependsOn({AbstractMathTransformTest.class, ScaleTransformTest.class})
public strictfp class ProjectiveTransformTest extends AffineTransformTest {
>>>>>>>
@DependsOn({AbstractMathTransformTest.class, ScaleTransformTest.class})
public strictfp class ProjectiveTransformTest extends TransformTestCase {
/**
* The factory to use for creating linear transforms.
*/
private final MathTransformFactory mtFactory;
/**
* The matrix for the tested transform.
*/
private Matrix matrix; |
<<<<<<<
=======
// Branch-dependent imports
import org.opengis.feature.PropertyType;
import org.opengis.feature.AttributeType;
import org.opengis.feature.FeatureType;
import org.opengis.feature.FeatureAssociationRole;
>>>>>>>
<<<<<<<
final String getTitleProperty() {
String p = titleProperty; // No synchronization - not a big deal if computed twice.
if (p == null) {
p = "";
for (final AbstractIdentifiedType type : valueType.getPropertyTypes(true)) {
if (type instanceof DefaultAttributeType<?>) {
final DefaultAttributeType<?> pt = (DefaultAttributeType<?>) type;
if (pt.getMaximumOccurs() != 0 && CharSequence.class.isAssignableFrom(pt.getValueClass())) {
p = pt.getName().toString();
break;
}
=======
private static String searchTitleProperty(final FeatureAssociationRole role) {
for (final PropertyType type : role.getValueType().getProperties(true)) {
if (type instanceof AttributeType<?>) {
final AttributeType<?> pt = (AttributeType<?>) type;
if (pt.getMaximumOccurs() != 0 && CharSequence.class.isAssignableFrom(pt.getValueClass())) {
return pt.getName().toString();
>>>>>>>
private static String searchTitleProperty(final DefaultAssociationRole role) {
for (final AbstractIdentifiedType type : role.getValueType().getProperties(true)) {
if (type instanceof DefaultAttributeType<?>) {
final DefaultAttributeType<?> pt = (DefaultAttributeType<?>) type;
if (pt.getMaximumOccurs() != 0 && CharSequence.class.isAssignableFrom(pt.getValueClass())) {
return pt.getName().toString(); |
<<<<<<<
for (final ReferenceIdentifier identifier : identifiers) {
if (appendUnicodeIdentifier(id, '-', identifier.getCodeSpace(), ":", true) | // Really |, not ||
appendUnicodeIdentifier(id, '-', NameMeaning.toObjectType(object.getClass()), ":", false) |
appendUnicodeIdentifier(id, '-', identifier.getCode(), ":", true))
=======
for (final Identifier identifier : identifiers) {
if (appendUnicodeIdentifier(id, '-', identifier.getCodeSpace(), "", true) | // Really |, not ||
appendUnicodeIdentifier(id, '-', NameMeaning.toObjectType(object.getClass()), "", false) |
appendUnicodeIdentifier(id, '-', identifier.getCode(), "", true))
>>>>>>>
for (final ReferenceIdentifier identifier : identifiers) {
if (appendUnicodeIdentifier(id, '-', identifier.getCodeSpace(), "", true) | // Really |, not ||
appendUnicodeIdentifier(id, '-', NameMeaning.toObjectType(object.getClass()), "", false) |
appendUnicodeIdentifier(id, '-', identifier.getCode(), "", true)) |
<<<<<<<
import com.altamiracorp.lumify.core.model.termMention.TermMention;
import com.altamiracorp.securegraph.Vertex;
import com.altamiracorp.securegraph.type.GeoPoint;
=======
import com.altamiracorp.lumify.core.model.termMention.TermMentionModel;
>>>>>>>
import com.altamiracorp.lumify.core.model.termMention.TermMentionModel;
import com.altamiracorp.securegraph.Vertex;
import com.altamiracorp.securegraph.type.GeoPoint; |
<<<<<<<
return new SpecializedIdentifier<UUID>(IdentifierSpace.UUID, UUID.fromString(code));
=======
return new SpecializedIdentifier<>(IdentifierSpace.UUID, converter.toUUID(context, code));
>>>>>>>
return new SpecializedIdentifier<UUID>(IdentifierSpace.UUID, converter.toUUID(context, code));
<<<<<<<
case NonMarshalledAuthority.HREF: {
final URI href;
try {
href = new URI(code);
} catch (URISyntaxException e) {
parseFailure(source, e);
break;
}
return new SpecializedIdentifier<URI>(IdentifierSpace.HREF, href);
}
=======
case NonMarshalledAuthority.HREF:
>>>>>>>
case NonMarshalledAuthority.HREF: |
<<<<<<<
import org.opengis.util.CodeList;
=======
>>>>>>>
<<<<<<<
(CodeList.class.isAssignableFrom(type) ? "code" : "metadata") + '.' + identifier;
=======
(ControlledVocabulary.class.isAssignableFrom(type) ? "code" : "metadata") +
'.' + type.getAnnotation(UML.class).identifier();
>>>>>>>
(CodeList.class.isAssignableFrom(type) ? "code" : "metadata") +
'.' + type.getAnnotation(UML.class).identifier(); |
<<<<<<<
=======
// Branch-dependent imports
import org.opengis.feature.Feature;
import org.opengis.feature.FeatureType;
import org.opengis.feature.FeatureAssociationRole;
import org.opengis.feature.MultiValuedPropertyException;
>>>>>>> |
<<<<<<<
import org.opengis.metadata.citation.Role;
import org.opengis.metadata.citation.OnLineFunction;
import org.opengis.metadata.citation.OnlineResource;
import org.opengis.metadata.citation.ResponsibleParty;
import org.opengis.metadata.identification.CharacterSet;
=======
import org.opengis.metadata.citation.*;
>>>>>>>
import org.opengis.metadata.citation.*;
import org.opengis.metadata.identification.CharacterSet; |
<<<<<<<
import static org.apache.sis.internal.jaxb.gco.PropertyType.LEGACY_XML;
// Branch-specific imports
import org.opengis.annotation.UML;
import static org.opengis.annotation.Obligation.OPTIONAL;
import static org.opengis.annotation.Specification.ISO_19115;
=======
>>>>>>>
// Branch-specific imports
import org.opengis.annotation.UML;
import static org.opengis.annotation.Obligation.OPTIONAL;
import static org.opengis.annotation.Specification.ISO_19115;
<<<<<<<
@XmlElementRef
@XmlJavaTypeAdapter(GO_ScopedName.class)
@UML(identifier="scopedName", obligation=OPTIONAL, specification=ISO_19115)
=======
@Override
@XmlElement(name = "scopedName")
@XmlJavaTypeAdapter(GO_GenericName.Since2014.class)
>>>>>>>
@XmlElement(name = "scopedName")
@XmlJavaTypeAdapter(GO_GenericName.Since2014.class)
@UML(identifier="scopedName", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<<
/// @XmlElement(name = "resourceReference", namespace = Namespaces.SRV)
@UML(identifier="resourceReference", obligation=OPTIONAL, specification=ISO_19115)
=======
@Override
// @XmlElement at the end of this class.
>>>>>>>
// @XmlElement at the end of this class.
@UML(identifier="resourceReference", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<<
/// @XmlElement(name = "resource", namespace = Namespaces.SRV)
@UML(identifier="resource", obligation=OPTIONAL, specification=ISO_19115)
=======
@Override
// @XmlElement at the end of this class.
>>>>>>>
// @XmlElement at the end of this class.
@UML(identifier="resource", obligation=OPTIONAL, specification=ISO_19115)
<<<<<<<
/// @XmlElement(name = "operation", namespace = Namespaces.SRV)
@UML(identifier="operation", obligation=OPTIONAL, specification=ISO_19115)
public DefaultOperationMetadata getOperation() {
=======
@Override
@XmlElement(name = "operation")
@XmlJavaTypeAdapter(SV_OperationMetadata.Since2014.class)
public OperationMetadata getOperation() {
>>>>>>>
@XmlElement(name = "operation")
@XmlJavaTypeAdapter(SV_OperationMetadata.Since2014.class)
@UML(identifier="operation", obligation=OPTIONAL, specification=ISO_19115)
public DefaultOperationMetadata getOperation() {
<<<<<<<
if (LEGACY_XML) {
final DefaultOperationMetadata operation = getOperation();
=======
if (FilterByVersion.LEGACY_METADATA.accept()) {
final OperationMetadata operation = getOperation();
>>>>>>>
if (FilterByVersion.LEGACY_METADATA.accept()) {
final DefaultOperationMetadata operation = getOperation(); |
<<<<<<<
if (id instanceof ReferenceIdentifier) {
final String cs = nonEmpty(((ReferenceIdentifier) id).getCodeSpace());
if (cs != null) {
identifier = cs + DefaultNameSpace.DEFAULT_SEPARATOR + identifier;
}
=======
final String cs = nonEmpty(id.getCodeSpace());
if (cs != null) {
identifier = cs + Constants.DEFAULT_SEPARATOR + identifier;
>>>>>>>
if (id instanceof ReferenceIdentifier) {
final String cs = nonEmpty(((ReferenceIdentifier) id).getCodeSpace());
if (cs != null) {
identifier = cs + Constants.DEFAULT_SEPARATOR + identifier;
} |
<<<<<<<
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
try (Stream<AbstractFeature> features = reader.features()) {
final Iterator<AbstractFeature> it = features.iterator();
=======
try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
>>>>>>>
try (Stream<AbstractFeature> features = reader.features(false)) {
final Iterator<AbstractFeature> it = features.iterator();
<<<<<<<
final Stream<AbstractFeature> f1 = reader.features();
final Iterator<AbstractFeature> i1 = f1.iterator();
=======
final Stream<Feature> f1 = reader.features(false);
final Iterator<Feature> i1 = f1.iterator();
>>>>>>>
final Stream<AbstractFeature> f1 = reader.features(false);
final Iterator<AbstractFeature> i1 = f1.iterator();
<<<<<<<
final Stream<AbstractFeature> f2 = reader.features();
final Iterator<AbstractFeature> i2 = f2.iterator();
=======
final Stream<Feature> f2 = reader.features(false);
final Iterator<Feature> i2 = f2.iterator();
>>>>>>>
final Stream<AbstractFeature> f2 = reader.features(false);
final Iterator<AbstractFeature> i2 = f2.iterator();
<<<<<<<
final Stream<AbstractFeature> f3 = reader.features();
final Iterator<AbstractFeature> i3 = f3.iterator();
=======
final Stream<Feature> f3 = reader.features(false);
final Iterator<Feature> i3 = f3.iterator();
>>>>>>>
final Stream<AbstractFeature> f3 = reader.features(false);
final Iterator<AbstractFeature> i3 = f3.iterator(); |
<<<<<<<
* @param object The metadata to copy values from, or {@code null} if none.
=======
* @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Individual)
>>>>>>>
* @param object the metadata to copy values from, or {@code null} if none.
<<<<<<<
=======
* Returns a SIS metadata implementation with the values of the given arbitrary implementation.
* This method performs the first applicable action in the following choices:
*
* <ul>
* <li>If the given object is {@code null}, then this method returns {@code null}.</li>
* <li>Otherwise if the given object is already an instance of
* {@code DefaultIndividual}, then it is returned unchanged.</li>
* <li>Otherwise a new {@code DefaultIndividual} instance is created using the
* {@linkplain #DefaultIndividual(Individual) copy constructor}
* and returned. Note that this is a <cite>shallow</cite> copy operation, since the other
* metadata contained in the given object are not recursively copied.</li>
* </ul>
*
* @param object the object to get as a SIS implementation, or {@code null} if none.
* @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultIndividual castOrCopy(final Individual object) {
if (object == null || object instanceof DefaultIndividual) {
return (DefaultIndividual) object;
}
return new DefaultIndividual(object);
}
/**
>>>>>>> |
<<<<<<<
import com.github.zafarkhaja.semver.Version;
=======
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.stream.Collectors.joining;
import static org.apache.commons.lang3.Validate.validState;
import static org.joda.time.Duration.standardMinutes;
>>>>>>>
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.stream.Collectors.joining;
import static org.apache.commons.lang3.Validate.validState;
import static org.joda.time.Duration.standardMinutes;
import com.github.zafarkhaja.semver.Version; |
<<<<<<<
class CommandBuffer implements NavigatorHolder {
=======
/**
* Passes navigation command to an active {@link Navigator}
* or stores it in the pending commands queue to pass it later.
*/
public class CommandBuffer implements NavigatorHolder {
>>>>>>>
/**
* Passes navigation command to an active {@link Navigator}
* or stores it in the pending commands queue to pass it later.
*/
class CommandBuffer implements NavigatorHolder { |
<<<<<<<
import com.djrapitops.plan.database.Database;
=======
>>>>>>>
import com.djrapitops.plan.database.Database;
<<<<<<<
import com.djrapitops.plan.system.file.FileSystem;
import com.djrapitops.plan.system.processing.ProcessingQueue;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.webserver.WebServer;
import com.djrapitops.plan.system.webserver.WebServerSystem;
import com.djrapitops.plan.system.webserver.pagecache.ResponseCache;
=======
import com.djrapitops.plan.system.database.DBSystem;
import com.djrapitops.plan.system.database.databases.Database;
import com.djrapitops.plan.system.file.FileSystem;
import com.djrapitops.plan.system.processing.ProcessingQueue;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
>>>>>>>
import com.djrapitops.plan.system.database.DBSystem;
import com.djrapitops.plan.system.database.databases.Database;
import com.djrapitops.plan.system.file.FileSystem;
import com.djrapitops.plan.system.processing.ProcessingQueue;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.file.FileSystem;
import com.djrapitops.plan.system.processing.ProcessingQueue;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.webserver.WebServer;
import com.djrapitops.plan.system.webserver.WebServerSystem;
import com.djrapitops.plan.system.webserver.pagecache.ResponseCache;
<<<<<<<
import com.djrapitops.plan.systems.file.database.DBSystem;
=======
>>>>>>>
import com.djrapitops.plan.systems.file.database.DBSystem;
<<<<<<<
=======
import com.djrapitops.plan.systems.webserver.WebServer;
import com.djrapitops.plan.systems.webserver.WebServerSystem;
import com.djrapitops.plan.systems.webserver.pagecache.PageCache;
>>>>>>>
import com.djrapitops.plan.systems.webserver.WebServer;
import com.djrapitops.plan.systems.webserver.WebServerSystem;
import com.djrapitops.plan.systems.webserver.pagecache.PageCache; |
<<<<<<<
new NameProcessor(uuid, playerName, displayName)
=======
new NameProcessor(uuid, playerName, displayName), // TODO NameCache to DataCache
new DBCommitProcessor(plugin.getDB())
>>>>>>>
new NameProcessor(uuid, playerName, displayName) // TODO NameCache to DataCache |
<<<<<<<
import com.djrapitops.plan.system.settings.config.PlanConfig;
import com.djrapitops.plan.system.tasks.server.BootAnalysisTask;
import com.djrapitops.plan.system.tasks.server.NetworkPageRefreshTask;
import com.djrapitops.plan.system.tasks.server.PeriodicAnalysisTask;
=======
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.tasks.server.PingCountTimerSponge;
>>>>>>>
import com.djrapitops.plan.system.settings.config.PlanConfig;
import com.djrapitops.plan.system.tasks.server.BootAnalysisTask;
import com.djrapitops.plan.system.tasks.server.NetworkPageRefreshTask;
import com.djrapitops.plan.system.tasks.server.PeriodicAnalysisTask;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.tasks.server.PingCountTimerSponge;
<<<<<<<
import com.djrapitops.plugin.task.RunnableFactory;
=======
import com.djrapitops.plugin.api.TimeAmount;
import com.djrapitops.plugin.task.RunnableFactory;
>>>>>>>
import com.djrapitops.plugin.task.RunnableFactory;
import com.djrapitops.plugin.api.TimeAmount;
import com.djrapitops.plugin.task.RunnableFactory;
<<<<<<<
private final PlanSponge plugin;
@Inject
public SpongeTaskSystem(
PlanSponge plugin,
PlanConfig config,
RunnableFactory runnableFactory,
SpongeTPSCountTimer spongeTPSCountTimer,
NetworkPageRefreshTask networkPageRefreshTask,
BootAnalysisTask bootAnalysisTask,
PeriodicAnalysisTask periodicAnalysisTask,
LogsFolderCleanTask logsFolderCleanTask
) {
super(
runnableFactory,
spongeTPSCountTimer,
config,
bootAnalysisTask,
periodicAnalysisTask,
logsFolderCleanTask
);
this.plugin = plugin;
=======
private final PlanSponge planSponge;
public SpongeTaskSystem(PlanSponge plugin) {
super(plugin, new SpongeTPSCountTimer(plugin));
this.planSponge = plugin;
}
@Override
public void enable() {
super.enable();
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
planSponge.registerListener(pingCountTimer);
long startDelay = TimeAmount.SECOND.ticks() * (long) Settings.PING_SERVER_ENABLE_DELAY.getNumber();
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
.runTaskTimer(startDelay, PingCountTimerSponge.PING_INTERVAL);
>>>>>>>
private final PlanSponge plugin;
@Inject
public SpongeTaskSystem(
PlanSponge plugin,
PlanConfig config,
RunnableFactory runnableFactory,
SpongeTPSCountTimer spongeTPSCountTimer,
NetworkPageRefreshTask networkPageRefreshTask,
BootAnalysisTask bootAnalysisTask,
PeriodicAnalysisTask periodicAnalysisTask,
LogsFolderCleanTask logsFolderCleanTask
) {
super(
runnableFactory,
spongeTPSCountTimer,
config,
bootAnalysisTask,
periodicAnalysisTask,
logsFolderCleanTask
);
this.plugin = plugin;
}
@Override
public void enable() {
super.enable();
// TODO Move elsewhere
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
plugin.registerListener(pingCountTimer);
long startDelay = TimeAmount.SECOND.ticks() * (long) Settings.PING_SERVER_ENABLE_DELAY.getNumber();
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
.runTaskTimer(startDelay, PingCountTimerSponge.PING_INTERVAL); |
<<<<<<<
putSupplier(serverNames, () -> database.fetch().getServerNames());
putSupplier(sessionAccordion, () -> accordions.serverSessionAccordion(
=======
putCachingSupplier(serverNames, () -> Database.getActive().fetch().getServerNames());
putCachingSupplier(sessionAccordion, () -> SessionAccordion.forServer(
>>>>>>>
putCachingSupplier(serverNames, () -> database.fetch().getServerNames());
putCachingSupplier(sessionAccordion, () -> accordions.serverSessionAccordion(
<<<<<<<
putSupplier(worldPie, () -> graphs.pie().worldPie(
serverContainer.getValue(ServerKeys.WORLD_TIMES).orElse(new WorldTimes(new HashMap<>()))
));
=======
putCachingSupplier(worldPie, () -> new WorldPie(serverContainer.getValue(ServerKeys.WORLD_TIMES).orElse(new WorldTimes(new HashMap<>()))));
>>>>>>>
putCachingSupplier(worldPie, () -> graphs.pie().worldPie(
serverContainer.getValue(ServerKeys.WORLD_TIMES).orElse(new WorldTimes(new HashMap<>()))
));
<<<<<<<
Key<BarGraph> geolocationBarChart = new Key<>(BarGraph.class, "GEOLOCATION_BAR_GRAPH");
putSupplier(geolocationBarChart, () -> graphs.bar().geolocationBarGraph(getUnsafe(AnalysisKeys.PLAYERS_MUTATOR)));
=======
Key<GeolocationBarGraph> geolocationBarChart = new Key<>(GeolocationBarGraph.class, "GEOLOCATION_BAR_CHART");
putCachingSupplier(geolocationBarChart, () -> new GeolocationBarGraph(getUnsafe(AnalysisKeys.PLAYERS_MUTATOR)));
>>>>>>>
Key<BarGraph> geolocationBarChart = new Key<>(BarGraph.class, "GEOLOCATION_BAR_GRAPH");
putCachingSupplier(geolocationBarChart, () -> graphs.bar().geolocationBarGraph(getUnsafe(AnalysisKeys.PLAYERS_MUTATOR)));
<<<<<<<
putSupplier(pingGraph, () ->
graphs.line().pingGraph(PingMutator.forContainer(serverContainer).mutateToByMinutePings().all())
);
=======
putCachingSupplier(pingGraph, () -> new PingGraph(
PingMutator.forContainer(serverContainer).mutateToByMinutePings().all()
));
>>>>>>>
putCachingSupplier(pingGraph, () ->
graphs.line().pingGraph(PingMutator.forContainer(serverContainer).mutateToByMinutePings().all())
);
<<<<<<<
putSupplier(AnalysisKeys.ACTIVITY_DATA, () -> getUnsafe(AnalysisKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(AnalysisKeys.ANALYSIS_TIME), config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD), config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD)));
Key<StackGraph> activityStackGraph = new Key<>(StackGraph.class, "ACTIVITY_STACK_GRAPH");
putSupplier(activityStackGraph, () -> graphs.stack().activityStackGraph(getUnsafe(AnalysisKeys.ACTIVITY_DATA)));
=======
putCachingSupplier(AnalysisKeys.ACTIVITY_DATA, () -> getUnsafe(AnalysisKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(AnalysisKeys.ANALYSIS_TIME)));
Key<ActivityStackGraph> activityStackGraph = new Key<>(ActivityStackGraph.class, "ACTIVITY_STACK_GRAPH");
putCachingSupplier(activityStackGraph, () -> new ActivityStackGraph(getUnsafe(AnalysisKeys.ACTIVITY_DATA)));
>>>>>>>
putCachingSupplier(AnalysisKeys.ACTIVITY_DATA, () -> getUnsafe(AnalysisKeys.PLAYERS_MUTATOR).toActivityDataMap(getUnsafe(AnalysisKeys.ANALYSIS_TIME), config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD), config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD)));
Key<StackGraph> activityStackGraph = new Key<>(StackGraph.class, "ACTIVITY_STACK_GRAPH");
putCachingSupplier(activityStackGraph, () -> graphs.stack().activityStackGraph(getUnsafe(AnalysisKeys.ACTIVITY_DATA)));
<<<<<<<
putSupplier(healthInformation, () -> new HealthInformation(
this,
config.getNumber(Settings.THEME_GRAPH_TPS_THRESHOLD_MED),
config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD),
config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD),
formatters.timeAmount(), formatters.decimals(), formatters.percentage()
));
=======
putCachingSupplier(healthInformation, () -> new HealthInformation(this));
>>>>>>>
putCachingSupplier(healthInformation, () -> new HealthInformation(
this,
config.getNumber(Settings.THEME_GRAPH_TPS_THRESHOLD_MED),
config.getNumber(Settings.ACTIVE_PLAY_THRESHOLD),
config.getNumber(Settings.ACTIVE_LOGIN_THRESHOLD),
formatters.timeAmount(), formatters.decimals(), formatters.percentage()
));
<<<<<<<
putSupplier(navAndTabs, () -> pluginsTabContentCreator.createContent(this));
=======
putCachingSupplier(navAndTabs, () ->
AnalysisPluginsTabContentCreator.createContent(
getUnsafe(AnalysisKeys.PLAYERS_MUTATOR),
this
)
);
putCachingSupplier(AnalysisKeys.BAN_DATA, () -> new ServerBanDataReader().readBanDataForContainer(this));
>>>>>>>
putCachingSupplier(navAndTabs, () -> pluginsTabContentCreator.createContent(this)); |
<<<<<<<
import com.djrapitops.plan.database.Database;
=======
>>>>>>>
import com.djrapitops.plan.database.Database;
<<<<<<<
=======
import com.djrapitops.plan.system.database.DBSystem;
import com.djrapitops.plan.system.database.databases.Database;
>>>>>>>
import com.djrapitops.plan.system.database.DBSystem;
import com.djrapitops.plan.system.database.databases.Database;
<<<<<<<
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.webserver.WebServer;
import com.djrapitops.plan.system.webserver.WebServerSystem;
import com.djrapitops.plan.systems.Systems;
import com.djrapitops.plan.systems.file.database.DBSystem;
=======
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.systems.Systems;
>>>>>>>
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.webserver.WebServer;
import com.djrapitops.plan.system.webserver.WebServerSystem;
import com.djrapitops.plan.systems.Systems;
import com.djrapitops.plan.systems.file.database.DBSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.systems.Systems;
<<<<<<<
=======
import com.djrapitops.plan.systems.webserver.WebServer;
import com.djrapitops.plan.systems.webserver.WebServerSystem;
>>>>>>>
import com.djrapitops.plan.systems.webserver.WebServer;
import com.djrapitops.plan.systems.webserver.WebServerSystem; |
<<<<<<<
if (args.length >= 1 && connectionSystem.isServerAvailable()) {
Map<UUID, Server> bukkitServers = database.fetch().getBukkitServers();
=======
if (args.length >= 1) {
Map<UUID, Server> bukkitServers = Database.getActive().fetch().getBukkitServers();
>>>>>>>
if (args.length >= 1) {
Map<UUID, Server> bukkitServers = database.fetch().getBukkitServers(); |
<<<<<<<
import com.djrapitops.plan.system.settings.config.BungeeConfigSystem;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.webserver.WebServerSystem;
import com.djrapitops.plan.systems.file.database.DBSystem;
import com.djrapitops.plan.systems.file.database.PlanBungeeDBSystem;
import com.djrapitops.plan.systems.file.database.PlanDBSystem;
=======
import com.djrapitops.plan.system.settings.config.BungeeConfigSystem;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
>>>>>>>
import com.djrapitops.plan.system.settings.config.BungeeConfigSystem;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.system.webserver.WebServerSystem;
import com.djrapitops.plan.systems.file.database.DBSystem;
import com.djrapitops.plan.systems.file.database.PlanBungeeDBSystem;
import com.djrapitops.plan.systems.file.database.PlanDBSystem;
import com.djrapitops.plan.system.settings.config.ConfigSystem;
import com.djrapitops.plan.system.update.VersionCheckSystem;
<<<<<<<
=======
import com.djrapitops.plan.systems.webserver.WebServerSystem;
>>>>>>>
import com.djrapitops.plan.systems.webserver.WebServerSystem; |
<<<<<<<
JSONArray verticesJson = GraphUtil.toJson(graph.getVertices(path, authorizations));
=======
JSONArray verticesJson = GraphUtil.toJson(graph.getVerticesInOrder(path, user.getAuthorizations()));
>>>>>>>
JSONArray verticesJson = GraphUtil.toJson(graph.getVerticesInOrder(path, authorizations)); |
<<<<<<<
import com.djrapitops.plan.system.locale.lang.Lang;
=======
import com.djrapitops.plan.system.locale.lang.*;
import com.djrapitops.plan.system.settings.Settings;
>>>>>>>
import com.djrapitops.plan.system.locale.lang.*;
<<<<<<<
import java.util.Map;
=======
import java.util.function.Function;
>>>>>>>
import java.util.Map;
import java.util.function.Function; |
<<<<<<<
import com.djrapitops.plugin.logging.L;
import com.djrapitops.plugin.logging.console.PluginLogger;
import com.djrapitops.plugin.logging.error.ErrorHandler;
import dagger.Lazy;
=======
import com.djrapitops.plugin.StaticHolder;
import com.djrapitops.plugin.api.utility.log.Log;
import com.djrapitops.plugin.utilities.Verify;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
>>>>>>>
import com.djrapitops.plugin.logging.L;
import com.djrapitops.plugin.logging.console.PluginLogger;
import com.djrapitops.plugin.logging.error.ErrorHandler;
import dagger.Lazy;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
<<<<<<<
this.logger = logger;
this.errorHandler = errorHandler;
nonCriticalExecutor = Executors.newFixedThreadPool(6);
criticalExecutor = Executors.newFixedThreadPool(2);
=======
nonCriticalExecutor = Executors.newFixedThreadPool(6, new ThreadFactoryBuilder().setNameFormat("Plan Non critical-pool-%d").build());
criticalExecutor = Executors.newFixedThreadPool(2, new ThreadFactoryBuilder().setNameFormat("Plan Critical-pool-%d").build());
saveInstance(nonCriticalExecutor);
saveInstance(criticalExecutor);
saveInstance(this);
>>>>>>>
this.logger = logger;
this.errorHandler = errorHandler;
nonCriticalExecutor = Executors.newFixedThreadPool(6, new ThreadFactoryBuilder().setNameFormat("Plan Non critical-pool-%d").build());
criticalExecutor = Executors.newFixedThreadPool(2, new ThreadFactoryBuilder().setNameFormat("Plan Critical-pool-%d").build()); |
<<<<<<<
=======
import com.djrapitops.plan.system.info.server.ServerInfo;
>>>>>>>
import com.djrapitops.plan.system.info.server.ServerInfo;
<<<<<<<
NetworkContainer networkContainer = db.getNetworkContainerFactory().forBungeeContainer(getBungeeServerContainer());
networkContainer.putSupplier(NetworkKeys.BUKKIT_SERVERS, () -> getBukkitServers().values());
=======
NetworkContainer networkContainer = new NetworkContainer(getBungeeServerContainer());
networkContainer.putCachingSupplier(NetworkKeys.BUKKIT_SERVERS, () -> getBukkitServers().values());
>>>>>>>
NetworkContainer networkContainer = db.getNetworkContainerFactory().forBungeeContainer(getBungeeServerContainer());
networkContainer.putCachingSupplier(NetworkKeys.BUKKIT_SERVERS, () -> getBukkitServers().values());
<<<<<<<
container.putSupplier(ServerKeys.RECENT_PEAK_PLAYERS, () -> {
long twoDaysAgo = System.currentTimeMillis() - (TimeUnit.DAYS.toMillis(2L));
=======
container.putCachingSupplier(ServerKeys.RECENT_PEAK_PLAYERS, () -> {
long twoDaysAgo = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(2);
>>>>>>>
container.putCachingSupplier(ServerKeys.RECENT_PEAK_PLAYERS, () -> {
long twoDaysAgo = System.currentTimeMillis() - (TimeUnit.DAYS.toMillis(2L)); |
<<<<<<<
public UserInfoTable getUserInfoTable() {
return userInfoTable;
}
=======
public BasicDataSource getDataSource() {
return dataSource;
}
public abstract void commit(Connection connection) throws SQLException;
>>>>>>>
public UserInfoTable getUserInfoTable() {
return userInfoTable;
}
public BasicDataSource getDataSource() {
return dataSource;
}
public abstract void commit(Connection connection) throws SQLException; |
<<<<<<<
=======
@Override
public String getServerName() {
String name = getHeaderCaseInsensitive(HttpHeaders.HOST);
if (name == null || name.length() == 0) {
name = "lambda.amazonaws.com";
}
return name;
}
@Override
public int getServerPort() {
return getLocalPort();
}
>>>>>>>
@Override
public String getServerName() {
String name = getHeaderCaseInsensitive(HttpHeaders.HOST);
if (name == null || name.length() == 0) {
name = "lambda.amazonaws.com";
}
return name;
}
<<<<<<<
=======
@Override
public String getLocalName() {
return "lambda.amazonaws.com";
}
@Override
public String getLocalAddr() {
return null;
}
@Override
public int getLocalPort() {
int port = 0;
if ("https".equals(getScheme())) {
port = 443;
} else if ("http".equals(getScheme())) {
port = 80;
}
return port;
}
@Override
public ServletContext getServletContext() {
return AwsProxyServletContext.getInstance(request, lamdaContext);
}
>>>>>>> |
<<<<<<<
private String statusDescription;
private Map<String, String> headers;
private MultiValuedTreeMap<String, String> multiValueHeaders;
=======
private Headers multiValueHeaders;
>>>>>>>
private String statusDescription;
private Map<String, String> headers;
private Headers multiValueHeaders;
<<<<<<<
public Map<String, String> getHeaders() {
return headers;
}
public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public MultiValuedTreeMap<String, String> getMultiValueHeaders() {
=======
public Headers getMultiValueHeaders() {
>>>>>>>
public Map<String, String> getHeaders() {
return headers;
}
public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public Headers getMultiValueHeaders() { |
<<<<<<<
private static final String UNICODE_SPACES = "[" +
"\\u0009-\\u000d" + // # White_Space # Cc [5] <control-0009>..<control-000D>
"\\u0020" + // White_Space # Zs SPACE
"\\u0085" + // White_Space # Cc <control-0085>
"\\u00a0" + // White_Space # Zs NO-BREAK SPACE
"\\u1680" + // White_Space # Zs OGHAM SPACE MARK
"\\u180E" + // White_Space # Zs MONGOLIAN VOWEL SEPARATOR
"\\u2000-\\u200a" + // # White_Space # Zs [11] EN QUAD..HAIR SPACE
"\\u2028" + // White_Space # Zl LINE SEPARATOR
"\\u2029" + // White_Space # Zp PARAGRAPH SEPARATOR
"\\u202F" + // White_Space # Zs NARROW NO-BREAK SPACE
"\\u205F" + // White_Space # Zs MEDIUM MATHEMATICAL SPACE
"\\u3000" + // White_Space # Zs IDEOGRAPHIC SPACE
"]";
private static final String LATIN_ACCENTS_CHARS = "\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff\\u015f";
=======
private static String LATIN_ACCENTS_CHARS = "\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff" + // Latin-1
"\\u0100-\\u024f" + // Latin Extended A and B
"\\u0253\\u0254\\u0256\\u0257\\u0259\\u025b\\u0263\\u0268\\u026f\\u0272\\u0289\\u028b" + // IPA Extensions
"\\u02bb" + // Hawaiian
"\\u1e00-\\u1eff"; // Latin Extended Additional (mostly for Vietnamese)
>>>>>>>
private static final String UNICODE_SPACES = "[" +
"\\u0009-\\u000d" + // # White_Space # Cc [5] <control-0009>..<control-000D>
"\\u0020" + // White_Space # Zs SPACE
"\\u0085" + // White_Space # Cc <control-0085>
"\\u00a0" + // White_Space # Zs NO-BREAK SPACE
"\\u1680" + // White_Space # Zs OGHAM SPACE MARK
"\\u180E" + // White_Space # Zs MONGOLIAN VOWEL SEPARATOR
"\\u2000-\\u200a" + // # White_Space # Zs [11] EN QUAD..HAIR SPACE
"\\u2028" + // White_Space # Zl LINE SEPARATOR
"\\u2029" + // White_Space # Zp PARAGRAPH SEPARATOR
"\\u202F" + // White_Space # Zs NARROW NO-BREAK SPACE
"\\u205F" + // White_Space # Zs MEDIUM MATHEMATICAL SPACE
"\\u3000" + // White_Space # Zs IDEOGRAPHIC SPACE
"]";
private static String LATIN_ACCENTS_CHARS = "\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff" + // Latin-1
"\\u0100-\\u024f" + // Latin Extended A and B
"\\u0253\\u0254\\u0256\\u0257\\u0259\\u025b\\u0263\\u0268\\u026f\\u0272\\u0289\\u028b" + // IPA Extensions
"\\u02bb" + // Hawaiian
"\\u1e00-\\u1eff"; // Latin Extended Additional (mostly for Vietnamese) |
<<<<<<<
return new HttpClientDoOn(this, doOnRequest, null, null, null);
=======
return new HttpClientDoOn(this, doOnRequest, null, null, null, null, null);
>>>>>>>
return new HttpClientDoOn(this, doOnRequest, null, null, null, null);
<<<<<<<
return new HttpClientDoOn(this, null, doAfterRequest, null, null);
=======
return new HttpClientDoOn(this, null, doAfterRequest, null, null, null, null);
>>>>>>>
return new HttpClientDoOn(this, null, doAfterRequest, null, null, null);
<<<<<<<
return new HttpClientDoOn(this, null, null, doOnResponse, null);
=======
return new HttpClientDoOn(this, null, null, doOnResponse, null, null, null);
}
/**
* Setup a callback called after {@link HttpClientResponse} headers have been
* received and the request is about to be redirected.
*
* <p>Note: This callback applies only if auto-redirect is enabled, e.g. via
* {@link HttpClient#followRedirect(boolean)}.
*
* @param doOnRedirect a callback called after {@link HttpClientResponse} headers have been received
* and the request is about to be redirected
*
* @return a new {@link HttpClient}
* @since 0.9.6
*/
public final HttpClient doOnRedirect(BiConsumer<? super HttpClientResponse, ? super Connection> doOnRedirect) {
Objects.requireNonNull(doOnRedirect, "doOnRedirect");
return new HttpClientDoOn(this, null, null, null, null, null, doOnRedirect);
>>>>>>>
return new HttpClientDoOn(this, null, null, doOnResponse, null, null);
}
/**
* Setup a callback called after {@link HttpClientResponse} headers have been
* received and the request is about to be redirected.
*
* <p>Note: This callback applies only if auto-redirect is enabled, e.g. via
* {@link HttpClient#followRedirect(boolean)}.
*
* @param doOnRedirect a callback called after {@link HttpClientResponse} headers have been received
* and the request is about to be redirected
*
* @return a new {@link HttpClient}
* @since 0.9.6
*/
public final HttpClient doOnRedirect(BiConsumer<? super HttpClientResponse, ? super Connection> doOnRedirect) {
Objects.requireNonNull(doOnRedirect, "doOnRedirect");
return new HttpClientDoOn(this, null, null, null, null, doOnRedirect);
<<<<<<<
=======
* Setup a callback called after
* {@link HttpClientState#RESPONSE_RECEIVED} has been emitted and the connection is
* returned to the pool or closed. The callback is invoked in both cases when the
* response is successful/there are errors.
*
* @param doAfterResponse a callback called after
* {@link HttpClientState#RESPONSE_RECEIVED} has been emitted and the connection is
* returned to the pool or closed. The callback is invoked in both cases when the
* response is successful/there are errors.
*
* @return a new {@link HttpClient}
* @deprecated as of 0.9.5. Consider using {@link #doAfterResponseSuccess(BiConsumer)} or
* {@link #doOnResponseError(BiConsumer)}
*/
@Deprecated
public final HttpClient doAfterResponse(BiConsumer<? super HttpClientResponse, ? super Connection> doAfterResponse) {
Objects.requireNonNull(doAfterResponse, "doAfterResponse");
return new HttpClientDoOn(this, null, null, null, doAfterResponse, null, null);
}
/**
>>>>>>>
<<<<<<<
return new HttpClientDoOn(this, null, null, null, doAfterResponseSuccess);
=======
return new HttpClientDoOn(this, null, null, null, null, doAfterResponseSuccess, null);
>>>>>>>
return new HttpClientDoOn(this, null, null, null, doAfterResponseSuccess, null); |
<<<<<<<
=======
* Create a {@link ConnectionProvider} to cache and grow on demand {@link Connection}.
* <p>An elastic {@link ConnectionProvider} will never wait before opening a new
* connection. The reuse window is limited but it cannot starve an undetermined volume
* of clients using it.
*
* @param name the channel pool map name
*
* @return a new {@link ConnectionProvider} to cache and grow on demand {@link Connection}
* @deprecated as of 0.9.5. Use {@link #builder(String)}
*/
@Deprecated
static ConnectionProvider elastic(String name) {
return elastic(name, null, null);
}
/**
* Create a {@link ConnectionProvider} to cache and grow on demand {@link Connection}.
* <p>An elastic {@link ConnectionProvider} will never wait before opening a new
* connection. The reuse window is limited but it cannot starve an undetermined volume
* of clients using it.
*
* @param name the channel pool map name
* @param maxIdleTime the {@link Duration} after which the channel will be closed when idle (resolution: ms),
* if {@code NULL} there is no max idle time
*
* @return a new {@link ConnectionProvider} to cache and grow on demand {@link Connection}
* @deprecated as of 0.9.5. Use {@link #builder(String)}
*/
@Deprecated
static ConnectionProvider elastic(String name, @Nullable Duration maxIdleTime) {
return elastic(name, maxIdleTime, null);
}
/**
* Create a {@link ConnectionProvider} to cache and grow on demand {@link Connection}.
* <p>An elastic {@link ConnectionProvider} will never wait before opening a new
* connection. The reuse window is limited but it cannot starve an undetermined volume
* of clients using it.
*
* @param name the channel pool map name
* @param maxIdleTime the {@link Duration} after which the channel will be closed when idle (resolution: ms),
* if {@code NULL} there is no max idle time
* @param maxLifeTime the {@link Duration} after which the channel will be closed (resolution: ms),
* if {@code NULL} there is no max life time
*
* @return a new {@link ConnectionProvider} to cache and grow on demand {@link Connection}
* @deprecated as of 0.9.5. Use {@link #builder(String)}
*/
@Deprecated
static ConnectionProvider elastic(String name, @Nullable Duration maxIdleTime, @Nullable Duration maxLifeTime) {
return builder(name).maxConnections(Integer.MAX_VALUE)
.pendingAcquireTimeout(Duration.ofMillis(0))
.pendingAcquireMaxCount(-1)
.maxIdleTime(maxIdleTime)
.maxLifeTime(maxLifeTime)
.build();
}
/**
* Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}.
* <p>A Fixed {@link ConnectionProvider} will open up to the given max number of
* processors observed by this jvm (minimum 4).
* Further connections will be pending acquisition until {@link #DEFAULT_POOL_ACQUIRE_TIMEOUT}
* and the default pending acquisition max count will be unbounded.
*
* @param name the connection pool name
*
* @return a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}
* @deprecated as of 0.9.5. Use {@link #create(String)}
*/
@Deprecated
static ConnectionProvider fixed(String name) {
return fixed(name, DEFAULT_POOL_MAX_CONNECTIONS);
}
/**
* Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}.
* <p>A Fixed {@link ConnectionProvider} will open up to the given max connection value.
* Further connections will be pending acquisition until {@link #DEFAULT_POOL_ACQUIRE_TIMEOUT}
* and the default pending acquisition max count will be unbounded.
*
* @param name the connection pool name
* @param maxConnections the maximum number of connections before starting pending
* acquisition on existing ones
*
* @return a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}
* @deprecated as of 0.9.5. Use {@link #create(String, int)}
*/
@Deprecated
static ConnectionProvider fixed(String name, int maxConnections) {
return fixed(name, maxConnections, DEFAULT_POOL_ACQUIRE_TIMEOUT);
}
/**
* Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}.
* <p>A Fixed {@link ConnectionProvider} will open up to the given max connection value.
* Further connections will be pending acquisition until acquireTimeout
* and the default pending acquisition max count will be unbounded.
*
* @param name the connection pool name
* @param maxConnections the maximum number of connections before starting pending
* @param acquireTimeout the maximum time in millis after which a pending acquire
* must complete or the {@link TimeoutException} will be thrown.
*
* @return a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}
* @deprecated as of 0.9.5. Use {@link #builder(String)}
*/
@Deprecated
static ConnectionProvider fixed(String name, int maxConnections, long acquireTimeout) {
return fixed(name, maxConnections, acquireTimeout, null, null);
}
/**
* Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}.
* <p>A Fixed {@link ConnectionProvider} will open up to the given max connection value.
* Further connections will be pending acquisition until acquireTimeout
* and the default pending acquisition max count will be unbounded.
*
* @param name the connection pool name
* @param maxConnections the maximum number of connections before starting pending
* @param acquireTimeout the maximum time in millis after which a pending acquire
* must complete or the {@link TimeoutException} will be thrown.
* @param maxIdleTime the {@link Duration} after which the channel will be closed when idle (resolution: ms),
* if {@code NULL} there is no max idle time
*
* @return a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}
* @deprecated as of 0.9.5. Use {@link #builder(String)}
*/
@Deprecated
static ConnectionProvider fixed(String name, int maxConnections, long acquireTimeout, @Nullable Duration maxIdleTime) {
return fixed(name, maxConnections, acquireTimeout, maxIdleTime, null);
}
/**
* Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}.
* <p>A Fixed {@link ConnectionProvider} will open up to the given max connection value.
* Further connections will be pending acquisition until acquireTimeout
* and the default pending acquisition max count will be unbounded.
*
* @param name the connection pool name
* @param maxConnections the maximum number of connections before starting pending
* @param acquireTimeout the maximum time in millis after which a pending acquire
* must complete or the {@link TimeoutException} will be thrown.
* @param maxIdleTime the {@link Duration} after which the channel will be closed when idle (resolution: ms),
* if {@code NULL} there is no max idle time
* @param maxLifeTime the {@link Duration} after which the channel will be closed (resolution: ms),
* if {@code NULL} there is no max life time
*
* @return a new {@link ConnectionProvider} to cache and reuse a fixed maximum
* number of {@link Connection}
* @deprecated as of 0.9.5. Use {@link #builder(String)}
*/
@Deprecated
static ConnectionProvider fixed(String name, int maxConnections, long acquireTimeout, @Nullable Duration maxIdleTime, @Nullable Duration maxLifeTime) {
if (maxConnections == -1) {
return elastic(name, maxIdleTime, maxLifeTime);
}
if (acquireTimeout < 0) {
throw new IllegalArgumentException("Acquire Timeout value must be positive");
}
return builder(name).maxConnections(maxConnections)
.pendingAcquireMaxCount(-1) // keep the backwards compatibility
.pendingAcquireTimeout(Duration.ofMillis(acquireTimeout))
.maxIdleTime(maxIdleTime)
.maxLifeTime(maxLifeTime)
.build();
}
/**
>>>>>>>
<<<<<<<
* @return the maximum number of connections before start pending
=======
* @return the maximum number of connections before starting pending
* @deprecated as of 0.9.5.
>>>>>>>
* @return the maximum number of connections before start pending
* @deprecated as of 0.9.5.
<<<<<<<
public final Builder maxIdleTime(Duration maxIdleTime) {
this.maxIdleTime = Objects.requireNonNull(maxIdleTime);
return this;
=======
public final SPEC maxIdleTime(Duration maxIdleTime) {
this.maxIdleTime = maxIdleTime;
return get();
>>>>>>>
public final SPEC maxIdleTime(Duration maxIdleTime) {
this.maxIdleTime = Objects.requireNonNull(maxIdleTime);
return get();
<<<<<<<
public final Builder maxLifeTime(Duration maxLifeTime) {
this.maxLifeTime = Objects.requireNonNull(maxLifeTime);
return this;
=======
public final SPEC maxLifeTime(Duration maxLifeTime) {
this.maxLifeTime = maxLifeTime;
return get();
>>>>>>>
public final SPEC maxLifeTime(Duration maxLifeTime) {
this.maxLifeTime = Objects.requireNonNull(maxLifeTime);
return get(); |
<<<<<<<
=======
checkNotNull(artifactExtractedInfo.getConceptType(), "concept type cannot be null");
Concept concept = ontologyRepository.getConceptByVertexId(artifactExtractedInfo.getConceptType());
checkNotNull(concept, "Could not find concept " + artifactExtractedInfo.getConceptType());
CONCEPT_TYPE.setProperty(artifact, concept.getId(), lumifyVisibility.getVisibility());
>>>>>>> |
<<<<<<<
String poolName = "test";
PooledConnectionProvider fixed = (PooledConnectionProvider) ConnectionProvider.create(poolName, 1);
AtomicReference<String[]> tags = new AtomicReference<>();
=======
String namePrefix = CONNECTION_PROVIDER_PREFIX + ".test";
PooledConnectionProvider fixed = (PooledConnectionProvider) provider;
AtomicReference<String[]> tags1 = new AtomicReference<>();
AtomicReference<String[]> tags2 = new AtomicReference<>();
>>>>>>>
PooledConnectionProvider fixed = (PooledConnectionProvider) provider;
AtomicReference<String[]> tags = new AtomicReference<>();
<<<<<<<
String[] tagsArr = new String[]{ID, key.hashCode() + "", REMOTE_ADDRESS, sa.getHostString() + ":" + sa.getPort(), POOL_NAME, poolName};
tags.set(tagsArr);
=======
String[] tagsArr = new String[]{ID, key.hashCode() + "", REMOTE_ADDRESS, sa.getHostString() + ":" + sa.getPort(), POOL_NAME, "test"};
tags1.set(tagsArr);
>>>>>>>
String[] tagsArr = new String[]{ID, key.hashCode() + "", REMOTE_ADDRESS, sa.getHostString() + ":" + sa.getPort(), POOL_NAME, "test"};
tags.set(tagsArr); |
<<<<<<<
public boolean isDisposed() {
return !running.get();
}
@Override
public EventLoopGroup onClient(boolean useNative) {
if (useNative && preferNative()) {
return cacheNativeClientLoops();
}
return cacheNioClientLoops();
}
@Override
public EventLoopGroup onServer(boolean useNative) {
if (useNative && preferNative()) {
return cacheNativeServerLoops();
}
return cacheNioServerLoops();
}
@Override
=======
@SuppressWarnings("deprecation")
>>>>>>>
public boolean isDisposed() {
return !running.get();
}
@Override
@SuppressWarnings("deprecation")
public EventLoopGroup onClient(boolean useNative) {
if (useNative && preferNative()) {
return cacheNativeClientLoops();
}
return cacheNioClientLoops();
}
@Override
@SuppressWarnings("deprecation")
public EventLoopGroup onServer(boolean useNative) {
if (useNative && preferNative()) {
return cacheNativeServerLoops();
}
return cacheNioServerLoops();
}
@Override
@SuppressWarnings("deprecation")
<<<<<<<
=======
@Override
@SuppressWarnings("deprecation")
public EventLoopGroup onServer(boolean useNative) {
if (useNative && preferNative()) {
return cacheNativeServerLoops();
}
return cacheNioServerLoops();
}
>>>>>>>
<<<<<<<
EventLoopGroup cacheNativeClientLoops() {
EventLoopGroup eventLoopGroup = cacheNativeClientLoops.get();
=======
@Override
@SuppressWarnings("deprecation")
public EventLoopGroup onClient(boolean useNative) {
if (useNative && preferNative()) {
return cacheNativeClientLoops();
}
return cacheNioClientLoops();
}
EventLoopGroup cacheNioClientLoops() {
EventLoopGroup eventLoopGroup = clientLoops.get();
>>>>>>>
EventLoopGroup cacheNativeClientLoops() {
EventLoopGroup eventLoopGroup = cacheNativeClientLoops.get(); |
<<<<<<<
import reactor.core.publisher.MonoProcessor;
import reactor.core.publisher.UnicastProcessor;
=======
import reactor.core.publisher.SignalType;
>>>>>>>
import reactor.core.publisher.MonoProcessor;
import reactor.core.publisher.UnicastProcessor;
import reactor.core.publisher.SignalType; |
<<<<<<<
=======
this.redirectRequestConsumer = from.redirectRequestConsumer;
this.chunkedTransfer = from.chunkedTransfer;
>>>>>>>
this.redirectRequestConsumer = from.redirectRequestConsumer; |
<<<<<<<
publishNewProperty(edgeExistingElementMutation, property, workspaceId, user);
=======
OntologyProperty ontologyProperty = ontologyRepository.getPropertyByIRI(property.getName());
checkNotNull(ontologyProperty, "Could not find ontology property " + property.getName());
if (!ontologyProperty.getUserVisible() && !property.getName().equals(LumifyProperties.ENTITY_IMAGE_VERTEX_ID.getPropertyName())) {
publishProperty(edgeExistingElementMutation, property, workspaceId, user);
}
>>>>>>>
OntologyProperty ontologyProperty = ontologyRepository.getPropertyByIRI(property.getName());
checkNotNull(ontologyProperty, "Could not find ontology property " + property.getName());
if (!ontologyProperty.getUserVisible() && !property.getName().equals(LumifyProperties.ENTITY_IMAGE_VERTEX_ID.getPropertyName())) {
publishNewProperty(edgeExistingElementMutation, property, workspaceId, user);
} |
<<<<<<<
import java.util.function.Predicate;
=======
import java.util.regex.Pattern;
>>>>>>>
import java.util.function.Predicate;
import java.util.regex.Pattern; |
<<<<<<<
createHttpClientForContextWithAddress()
.doOnRequest((r, c) -> log.debug("onReq: "+r))
.doAfterRequest((r, c) -> log.debug("afterReq: "+r))
.doOnResponse((r, c) -> log.debug("onResp: "+r))
.doAfterResponse((r, c) -> log.debug("afterResp: "+r))
=======
AtomicInteger onReq = new AtomicInteger();
AtomicInteger afterReq = new AtomicInteger();
AtomicInteger onResp = new AtomicInteger();
AtomicInteger afterResp = new AtomicInteger();
createHttpClientForContextWithAddress(context)
.doOnRequest((r, c) -> onReq.getAndIncrement())
.doAfterRequest((r, c) -> afterReq.getAndIncrement())
.doOnResponse((r, c) -> onResp.getAndIncrement())
.doAfterResponse((r, c) -> afterResp.getAndIncrement())
>>>>>>>
AtomicInteger onReq = new AtomicInteger();
AtomicInteger afterReq = new AtomicInteger();
AtomicInteger onResp = new AtomicInteger();
AtomicInteger afterResp = new AtomicInteger();
createHttpClientForContextWithAddress()
.doOnRequest((r, c) -> onReq.getAndIncrement())
.doAfterRequest((r, c) -> afterReq.getAndIncrement())
.doOnResponse((r, c) -> onResp.getAndIncrement())
.doAfterResponse((r, c) -> afterResp.getAndIncrement())
<<<<<<<
createHttpClientForContextWithAddress()
.doOnRequest((r, c) -> log.debug("onReq: "+r))
.doAfterRequest((r, c) -> log.debug("afterReq: "+r))
.doOnResponse((r, c) -> log.debug("onResp: "+r))
.doAfterResponse((r, c) -> log.debug("afterResp: "+r))
=======
createHttpClientForContextWithAddress(context)
.doOnRequest((r, c) -> onReq.getAndIncrement())
.doAfterRequest((r, c) -> afterReq.getAndIncrement())
.doOnResponse((r, c) -> onResp.getAndIncrement())
.doAfterResponse((r, c) -> afterResp.getAndIncrement())
>>>>>>>
createHttpClientForContextWithAddress()
.doOnRequest((r, c) -> onReq.getAndIncrement())
.doAfterRequest((r, c) -> afterReq.getAndIncrement())
.doOnResponse((r, c) -> onResp.getAndIncrement())
.doAfterResponse((r, c) -> afterResp.getAndIncrement())
<<<<<<<
createHttpClientForContextWithAddress()
.doOnRequest((r, c) -> log.debug("onReq: "+r))
.doAfterRequest((r, c) -> log.debug("afterReq: "+r))
.doOnResponse((r, c) -> log.debug("onResp: "+r))
.doAfterResponse((r, c) -> log.debug("afterResp: "+r))
=======
createHttpClientForContextWithAddress(context)
.doOnRequest((r, c) -> onReq.getAndIncrement())
.doAfterRequest((r, c) -> afterReq.getAndIncrement())
.doOnResponse((r, c) -> onResp.getAndIncrement())
.doAfterResponse((r, c) -> afterResp.getAndIncrement())
>>>>>>>
createHttpClientForContextWithAddress()
.doOnRequest((r, c) -> onReq.getAndIncrement())
.doAfterRequest((r, c) -> afterReq.getAndIncrement())
.doOnResponse((r, c) -> onResp.getAndIncrement())
.doAfterResponse((r, c) -> afterResp.getAndIncrement())
<<<<<<<
=======
assertThat(onReq.get()).isEqualTo(3);
assertThat(afterReq.get()).isEqualTo(3);
assertThat(onResp.get()).isEqualTo(3);
assertThat(afterResp.get()).isEqualTo(3);
context.disposeNow();
>>>>>>>
assertThat(onReq.get()).isEqualTo(3);
assertThat(afterReq.get()).isEqualTo(3);
assertThat(onResp.get()).isEqualTo(3);
assertThat(afterResp.get()).isEqualTo(3);
<<<<<<<
createHttpClientForContextWithAddress()
.observe((c, s) -> log.info(s + "" + c))
=======
createHttpClientForContextWithAddress(context)
>>>>>>>
createHttpClientForContextWithAddress()
.observe((c, s) -> log.info(s + "" + c))
<<<<<<<
.observe((c, s) -> log.debug(s + "" + c))
=======
>>>>>>>
.observe((c, s) -> log.debug(s + "" + c)) |
<<<<<<<
import static com.altamiracorp.lumify.core.model.properties.EntityLumifyProperties.GEO_LOCATION;
import com.altamiracorp.securegraph.Direction;
import com.altamiracorp.securegraph.Edge;
import com.altamiracorp.securegraph.Element;
import com.altamiracorp.securegraph.Property;
import com.altamiracorp.securegraph.Text;
import com.altamiracorp.securegraph.Vertex;
=======
import com.altamiracorp.lumify.core.model.ontology.PropertyName;
import com.altamiracorp.lumify.core.security.VisibilityTranslator;
import com.altamiracorp.securegraph.*;
import com.altamiracorp.securegraph.property.StreamingPropertyValue;
>>>>>>>
import static com.altamiracorp.lumify.core.model.properties.EntityLumifyProperties.*;
import com.altamiracorp.lumify.core.security.VisibilityTranslator;
import com.altamiracorp.securegraph.Direction;
import com.altamiracorp.securegraph.Edge;
import com.altamiracorp.securegraph.Element;
import com.altamiracorp.securegraph.ElementMutation;
import com.altamiracorp.securegraph.Property;
import com.altamiracorp.securegraph.Text;
import com.altamiracorp.securegraph.Vertex;
import com.altamiracorp.securegraph.Visibility;
import com.altamiracorp.securegraph.property.StreamingPropertyValue;
<<<<<<<
private static JSONObject toJsonProperties(Iterable<Property> properties) {
// TODO handle multi-valued properties
JSONObject propertiesJson = new JSONObject();
for (Property property : properties) {
Object propertyValue = property.getValue();
if (GEO_LOCATION.getKey().equals(property.getName())) {
Double[] latlong = parseLatLong(propertyValue);
propertiesJson.put("latitude", latlong[0]);
propertiesJson.put("longitude", latlong[1]);
} else {
if (propertyValue instanceof Text) {
propertyValue = ((Text) propertyValue).getText();
}
propertiesJson.put(property.getName(), propertyValue);
}
}
return propertiesJson;
}
=======
>>>>>>> |
<<<<<<<
private static final String NO_COLOR_OPT = "no-color";
private static final String INVERT_COLOR_OPT = "invert-color";
=======
private static final String DEBUG_OPT = "debug";
>>>>>>>
private static final String NO_COLOR_OPT = "no-color";
private static final String INVERT_COLOR_OPT = "invert-color";
private static final String DEBUG_OPT = "debug";
<<<<<<<
options.addOption(noColor);
options.addOption(invertColor);
=======
options.addOption(debug);
>>>>>>>
options.addOption(noColor);
options.addOption(invertColor);
options.addOption(debug);
<<<<<<<
public boolean shouldColorOutput() {
return cmd != null && !cmd.hasOption(NO_COLOR_OPT);
}
public boolean shouldInvertColorOutput() {
return cmd != null && cmd.hasOption(INVERT_COLOR_OPT);
}
=======
public boolean debugFlagSet() throws ArgumentParserException {
return cmd != null && cmd.hasOption(DEBUG_OPT);
}
>>>>>>>
public boolean shouldColorOutput() {
return cmd != null && !cmd.hasOption(NO_COLOR_OPT);
}
public boolean shouldInvertColorOutput() {
return cmd != null && cmd.hasOption(INVERT_COLOR_OPT);
}
public boolean debugFlagSet() throws ArgumentParserException {
return cmd != null && cmd.hasOption(DEBUG_OPT);
} |
<<<<<<<
final Option xcodeIntegration = addArgument(XCODE_INTEGRATION_OPT, Messages.XCODE_INTEGRATION_DESC);
=======
final Option debug = Option.builder().longOpt(DEBUG_OPT).desc(Messages.DEBUG_DESC).build();
final Option noColor = Option.builder().longOpt(NO_COLOR_OPT).desc(Messages.NO_COLOR_DESC).build();
final Option invertColor = Option.builder().longOpt(INVERT_COLOR_OPT).desc(Messages.INVERT_COLOR_DESC).build();
>>>>>>>
final Option xcodeIntegration = addArgument(XCODE_INTEGRATION_OPT, Messages.XCODE_INTEGRATION_DESC);
final Option debug = Option.builder().longOpt(DEBUG_OPT).desc(Messages.DEBUG_DESC).build();
final Option noColor = Option.builder().longOpt(NO_COLOR_OPT).desc(Messages.NO_COLOR_DESC).build();
final Option invertColor = Option.builder().longOpt(INVERT_COLOR_OPT).desc(Messages.INVERT_COLOR_DESC).build();
<<<<<<<
options.addOption(xcodeIntegration);
=======
options.addOption(debug);
options.addOption(noColor);
options.addOption(invertColor);
>>>>>>>
options.addOption(xcodeIntegration);
options.addOption(debug);
options.addOption(noColor);
options.addOption(invertColor); |
<<<<<<<
void verifyLowerCamelCase(String constructType, ParserRuleContext ctx) {
String constructName = ctx.getText();
if (!CharFormatUtil.isLowerCamelCase(constructName)) {
Location location = new Location(ctx.getStart().getLine(), ctx.getStart().getCharPositionInLine() + 1);
this.printer.error(constructType + Messages.LOWER_CAMEL_CASE, location);
}
}
void walkListener(ParseTreeWalker walker, ParserRuleContext tree, SwiftBaseListener listener) {
walker.walk(listener, tree);
=======
void verifyMultipleImports(ImportDeclarationContext ctx) {
int lineNum = ctx.getStart().getLine();
if (importLineNumbers.contains(lineNum)) {
Location location = new Location(lineNum);
this.printer.warn(Messages.IMPORTS + Messages.MULTIPLE_IMPORTS, location);
} else {
importLineNumbers.add(lineNum);
}
}
void walkConstantDecListener(ParseTreeWalker walker, ParserRuleContext tree) {
walker.walk(new ConstantDecListener(this.printer), tree);
>>>>>>>
void verifyLowerCamelCase(String constructType, ParserRuleContext ctx) {
String constructName = ctx.getText();
if (!CharFormatUtil.isLowerCamelCase(constructName)) {
Location location = new Location(ctx.getStart().getLine(), ctx.getStart().getCharPositionInLine() + 1);
this.printer.error(constructType + Messages.LOWER_CAMEL_CASE, location);
}
}
void verifyMultipleImports(ImportDeclarationContext ctx) {
int lineNum = ctx.getStart().getLine();
if (importLineNumbers.contains(lineNum)) {
Location location = new Location(lineNum);
this.printer.warn(Messages.IMPORTS + Messages.MULTIPLE_IMPORTS, location);
} else {
importLineNumbers.add(lineNum);
}
}
void walkListener(ParseTreeWalker walker, ParserRuleContext tree, SwiftBaseListener listener) {
walker.walk(listener, tree); |
<<<<<<<
Set<Rules> enabledRules = argumentParser.getEnabledRules();
=======
ColorSettings colorSettings =
new ColorSettings(argumentParser.shouldColorOutput(), argumentParser.shouldInvertColorOutput());
>>>>>>>
ColorSettings colorSettings =
new ColorSettings(argumentParser.shouldColorOutput(), argumentParser.shouldInvertColorOutput());
Set<Rules> enabledRules = argumentParser.getEnabledRules();
<<<<<<<
try (Printer printer = new Printer(inputFile, maxSeverity)) {
List<SwiftBaseListener> listeners = createListeners(enabledRules, printer, tokenStream);
listeners.add(new MaxLengthListener(printer, maxLengths));
listeners.add(new MainListener(printer, maxLengths, tokenStream));
=======
try (Printer printer = new Printer(inputFile, maxSeverity, colorSettings)) {
MainListener listener = new MainListener(printer, maxLengths, tokenStream);
>>>>>>>
try (Printer printer = new Printer(inputFile, maxSeverity, colorSettings)) {
List<SwiftBaseListener> listeners = createListeners(enabledRules, printer, tokenStream);
listeners.add(new MaxLengthListener(printer, maxLengths));
listeners.add(new MainListener(printer, maxLengths, tokenStream)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.