Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selenium upgraded to 3.8.1, guava upgraded to 23.6-jre #209

Merged
merged 12 commits into from
Jan 30, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;

/**
* @author lukasz.wieczorek
Expand Down Expand Up @@ -49,7 +49,7 @@ public void setMessage(String message) {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("message", message)
.add("success", success)
.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import java.io.Serializable;

/**
Expand Down Expand Up @@ -71,7 +71,7 @@ public enum Phase {

@Override
public String toString() {
return Objects.toStringHelper(this).add("phase", phase).add("description", description)
return MoreObjects.toStringHelper(this).add("phase", phase).add("description", description)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.cognifide.aet.communication.api.JobStatus;
import com.cognifide.aet.communication.api.ProcessingError;
import com.cognifide.aet.communication.api.metadata.Url;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import java.io.Serializable;

/**
Expand Down Expand Up @@ -111,7 +111,7 @@ public String getTestName() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("testName", testName)
.add("urlAfterCollect", urlAfterCollect)
.add("status", status)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.cognifide.aet.communication.api.JobStatus;
import com.cognifide.aet.communication.api.ProcessingError;
import com.cognifide.aet.communication.api.metadata.Comparator;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import java.io.Serializable;

/**
Expand Down Expand Up @@ -97,7 +97,7 @@ public Integer getStepIndex() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("urlName", urlName)
.add("testName", testName)
.add("stepIndex", stepIndex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api.messages;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;

public class FatalErrorMessage implements BasicMessage {

Expand Down Expand Up @@ -45,7 +45,7 @@ public MessageType getMessageType() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("message", message)
.add("correlationId", correlationId)
.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api.messages;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -65,7 +65,7 @@ public MessageType getMessageType() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("correlationId", correlationId)
.add("status", status)
.add("errors", errors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package com.cognifide.aet.communication.api.messages;

import com.cognifide.aet.communication.api.ProcessingError;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;

public class ProcessingErrorMessage implements BasicMessage {

Expand Down Expand Up @@ -46,7 +46,7 @@ public MessageType getMessageType() {

@Override
public String toString() {
return Objects.toStringHelper(this).add("correlationId", correlationId)
return MoreObjects.toStringHelper(this).add("correlationId", correlationId)
.add("processingError", processingError).toString();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.cognifide.aet.communication.api.metadata;

import com.google.common.base.Joiner;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
Expand Down Expand Up @@ -88,7 +89,7 @@ public String getName() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("type", type)
.add("filters", filters)
.add("parameters", parameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api.metadata;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap;
import java.io.Serializable;
import java.util.Collections;
Expand Down Expand Up @@ -56,7 +56,7 @@ public Map<String, String> getParameters() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("type", type)
.add("parameters", parameters)
.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.cognifide.aet.communication.api.metadata;

import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -122,7 +123,7 @@ public void setStatistics(Statistics statistics) {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("index", index)
.add("type", type)
.add("name", name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api.metadata;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import java.io.Serializable;
Expand Down Expand Up @@ -68,7 +68,7 @@ public List<String> getErrors() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("status", getStatusName())
.add("artifactId", getArtifactId())
.add("errors", getErrors())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.cognifide.aet.communication.api.metadata.gson.MapSerializer;
import com.cognifide.aet.communication.api.metadata.gson.TimestampSerializer;
import com.cognifide.aet.communication.api.util.ValidatorProvider;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.base.Predicate;
import com.google.common.collect.FluentIterable;
import com.google.gson.Gson;
Expand Down Expand Up @@ -182,7 +182,7 @@ public int hashCode() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("correlationId", correlationId)
.add("company", company)
.add("project", project)
Expand All @@ -205,6 +205,10 @@ public boolean apply(ConstraintViolation<Suite> error) {
return ignoreFields == null || !ignoreFields
.contains(error.getPropertyPath().toString());
}
@Override
public boolean test(ConstraintViolation<Suite> error) {
return apply(error);
}
}).toSet();

if (!errors.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api.metadata;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -99,7 +99,7 @@ public int hashCode() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("name", name)
.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.cognifide.aet.communication.api.metadata;

import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -100,7 +100,7 @@ public void setCollectionStats(Statistics collectionStats) {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("name", name)
.add("url", url)
.add("domain", domain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


import com.cognifide.aet.vs.DBKey;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;

/**
* POJO used to pass properties to Collectors/Comparators on worker.
Expand Down Expand Up @@ -54,7 +54,7 @@ public String getPatternId() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("company", company)
.add("project", project)
.add("patternId", patternId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package com.cognifide.aet.job.api.comparator;

import com.cognifide.aet.job.api.StepProperties;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;

public class ComparatorProperties extends StepProperties {

Expand All @@ -37,7 +37,7 @@ public String getCollectedId() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("collectedId", collectedId)
.add("company", getCompany())
.add("project", getProject())
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>15.0</version>
<version>23.6-jre</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's upgrade guava also in aet-features.xml file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/osgi-dependencies/aet-features.xml is recently added to gitignore. Is this expected? That's why my change is not in this PR.

</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.cognifide.aet.cleaner.validation.CleanerSchedulerValidator;
import com.cognifide.aet.validation.ValidationResultBuilder;
import com.cognifide.aet.validation.ValidationResultBuilderFactory;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import java.util.UUID;
Expand Down Expand Up @@ -179,7 +179,7 @@ private String registerCleaningJob() throws SchedulerException {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("schedule", schedule)
.add("keepNVersions", keepNVersions)
.add("removeOlderThan", removeOlderThan)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public boolean apply(Comparator comparator) {
return comparator.getStepResult() != null && StringUtils
.isNotBlank(comparator.getStepResult().getArtifactId());
}
@Override
public boolean test(Comparator comparator) {
return apply(comparator);
}
};

private static final Function<Comparator, String> COMPARATOR_TO_ARTIFACT_ID = new Function<Comparator, String>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package com.cognifide.aet.cleaner.processors.exchange;

import com.cognifide.aet.vs.DBKey;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import java.io.Serializable;

public class MessageBody<T extends Serializable> implements Serializable {
Expand All @@ -42,7 +42,7 @@ public DBKey getDbKey() {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("data", data)
.add("dbKey", dbKey)
.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package com.cognifide.aet.cleaner.processors.filters;

import com.cognifide.aet.vs.DBKey;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.base.Predicate;
import org.apache.commons.lang3.StringUtils;

Expand All @@ -35,6 +35,11 @@ public boolean apply(DBKey dbKey) {
return companyMatches(dbKey) && projectMatches(dbKey);
}

@Override
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WE could use default implementation from the Predicate interface providing we change the JAVA level to 1.8 in root pom XML file: dbecf17

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, fixed

public boolean test(DBKey dbKey) {
return apply(dbKey);
}

private boolean projectMatches(DBKey dbKey) {
return StringUtils.isBlank(projectFilter) || dbKey.getProject().equals(projectFilter);
}
Expand All @@ -46,7 +51,7 @@ private boolean companyMatches(DBKey dbKey) {

@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("companyFilter", companyFilter)
.add("projectFilter", projectFilter)
.toString();
Expand Down
Loading