Skip to content

Commit

Permalink
Revert "refactor: Use of @EqualsAndHashCode on Recipe"
Browse files Browse the repository at this point in the history
This reverts commit eaa8871.
  • Loading branch information
jkschneider committed Feb 2, 2024
1 parent eaa8871 commit 516c70b
Show file tree
Hide file tree
Showing 212 changed files with 409 additions and 409 deletions.
2 changes: 1 addition & 1 deletion rewrite-core/src/main/java/org/openrewrite/Cursor.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import static java.util.stream.StreamSupport.stream;

@EqualsAndHashCode(exclude = false)
@EqualsAndHashCode(exclude = "messages")
public class Cursor {
public static final String ROOT_VALUE = "root";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.nio.file.PathMatcher;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class DeleteSourceFiles extends Recipe {

@Option(displayName = "File pattern",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.Set;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindCollidingSourceFiles extends ScanningRecipe<FindCollidingSourceFiles.Accumulator> {

transient CollidingSourceFiles collidingSourceFiles = new CollidingSourceFiles(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import static java.time.ZoneOffset.UTC;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindLstProvenance extends ScanningRecipe<FindLstProvenance.Accumulator> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Objects;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindParseFailures extends Recipe {

@Option(displayName = "Max snippet length",
Expand Down
2 changes: 1 addition & 1 deletion rewrite-core/src/main/java/org/openrewrite/FindQuarks.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import static java.util.Objects.requireNonNull;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindQuarks extends Recipe {
@Override
public String getDisplayName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindSourceFiles extends Recipe {
transient SourcesFiles results = new SourcesFiles(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Set;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class IsInRepository extends Recipe {
@Override
public String getDisplayName() {
Expand Down
2 changes: 1 addition & 1 deletion rewrite-core/src/main/java/org/openrewrite/RenameFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.nio.file.PathMatcher;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class RenameFile extends Recipe {
@Option(displayName = "File matcher",
description = "Matching files will be renamed. This is a glob expression.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.nio.file.PathMatcher;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class SetFilePermissions extends Recipe {
@Option(displayName = "File matcher",
description = "Permissions will be applied to matching files. This is a glob expression.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.openrewrite.internal.lang.Nullable;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class ColumnDescriptor {

@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.List;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class DataTableDescriptor {

@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void initialize(List<Recipe> uninitialized, List<Recipe> initialized, Co
}

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
@RequiredArgsConstructor
static class PreconditionBellwether extends Recipe {

Expand Down Expand Up @@ -162,7 +162,7 @@ public boolean isAcceptable(SourceFile sourceFile, ExecutionContext ctx) {
}
}

@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
@Value
static class BellwetherDecoratedRecipe extends Recipe {

Expand Down Expand Up @@ -196,7 +196,7 @@ public List<Recipe> getRecipeList() {
}

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
static class BellwetherDecoratedScanningRecipe<T> extends ScanningRecipe<T> {

DeclarativeRecipe.PreconditionBellwether bellwether;
Expand Down Expand Up @@ -318,7 +318,7 @@ public Validated<Object> validate() {
}

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
private static class LazyLoadedRecipe extends Recipe {
String recipeFqn;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.List;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class OptionDescriptor {

@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.Set;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class RecipeDescriptor {
@EqualsAndHashCode.Include
String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.UUID;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
public class BuildMetadata implements Marker {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.UUID;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
public class BuildTool implements Marker {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
@Deprecated
@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
public class BuildToolFailure implements Marker {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.UUID;

@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = false)
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
@With
@Getter
@ToString
Expand Down
8 changes: 4 additions & 4 deletions rewrite-core/src/main/java/org/openrewrite/marker/Markup.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static <T extends Tree> T markup(T t, Markup markup) {
}

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
class Error implements Markup {
UUID id;
Expand All @@ -112,7 +112,7 @@ public Error(UUID id, String message, String detail) {
}

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
class Warn implements Markup {
UUID id;
Expand All @@ -139,7 +139,7 @@ public Warn(UUID id, String message, String detail) {
}

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
class Info implements Markup {
UUID id;
Expand All @@ -164,7 +164,7 @@ public String getDetail() {
}

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
class Debug implements Markup {
UUID id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public String getPathVar() {
}

@AllArgsConstructor
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = false)
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
static class Windows extends OperatingSystemProvenance {
String nativePrefix;

Expand Down Expand Up @@ -378,7 +378,7 @@ public UUID getId() {
}

@AllArgsConstructor
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = false)
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
static class Unix extends OperatingSystemProvenance {
String nativePrefix;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.UUID;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
public class OutdatedSerializer implements Marker {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.*;

@Value
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@With
public class RecipesThatMadeChanges implements Marker {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

@RequiredArgsConstructor
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@Getter
@With
public final class SearchResult implements Marker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* Post-processing of Recipe results by a build plugin or other caller of OpenRewrite is responsible for this.
*/
@Value
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = false)
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
@With
public class RemoteArchive implements Remote {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.util.UUID;

@Value
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = false)
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
@With
public class RemoteFile implements Remote {
@EqualsAndHashCode.Include
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.TreeMap;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindCommitters extends ScanningRecipe<Map<String, GitProvenance.Committer>> {
private transient final DistinctCommitters committers = new DistinctCommitters(this);
private transient final CommitsByDay commitsByDay = new CommitsByDay(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* A collection of styles by name, e.g., IntelliJ IDEA or Google Java Format.
*/
@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = false)
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@AllArgsConstructor
@With
public class NamedStyles implements Marker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import static java.util.Objects.requireNonNull;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class AppendToTextFile extends ScanningRecipe<AtomicBoolean> {
@Option(displayName = "Relative File Name",
description = "File name, using a relative path. If a non-plaintext file already exists at this location, then this recipe will do nothing.",
Expand Down
2 changes: 1 addition & 1 deletion rewrite-core/src/main/java/org/openrewrite/text/Find.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static java.util.Objects.requireNonNull;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class Find extends Recipe {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static org.openrewrite.Tree.randomId;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindAndReplace extends Recipe {

@Option(displayName = "Find",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

@Incubating(since = "8.2.0")
@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class FindMultiselect extends Recipe {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void generateFile() {
}

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
static class DeleteFirst extends Recipe {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void dollarSignsTolerated() {
}

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
static class MultiFindAndReplace extends Recipe {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import static java.util.Objects.requireNonNull;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class AddDependency extends ScanningRecipe<AddDependency.Scanned> {

@EqualsAndHashCode.Exclude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import static java.util.Objects.requireNonNull;

@Value
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class ChangeDependency extends Recipe {
@Option(displayName = "Old groupId",
description = "The old groupId to replace. The groupId is the first part of a dependency coordinate 'com.google.guava:guava:VERSION'. Supports glob expressions.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

import static java.util.Objects.requireNonNull;

@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
@Value
public class ChangeDependencyArtifactId extends Recipe {
@Option(displayName = "Group",
Expand Down
Loading

0 comments on commit 516c70b

Please sign in to comment.