Skip to content

Commit 0f53903

Browse files
committed
Some cleanup
1 parent 1ade760 commit 0f53903

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/CopyRestTestsTask.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,16 @@ public CopyRestTestsTask(
8585
}
8686

8787
@Inject
88-
protected ProjectLayout getProjectLayout() {
89-
throw new UnsupportedOperationException();
90-
}
88+
protected abstract ProjectLayout getProjectLayout();
9189

9290
@Inject
93-
protected FileSystemOperations getFileSystemOperations() {
94-
throw new UnsupportedOperationException();
95-
}
91+
protected abstract FileSystemOperations getFileSystemOperations();
9692

9793
@Inject
98-
protected ObjectFactory getObjectFactory() {
99-
throw new UnsupportedOperationException();
100-
}
94+
protected abstract ObjectFactory getObjectFactory();
10195

10296
@Inject
103-
protected PatternSetFactory getPatternSetFactory() {
104-
throw new UnsupportedOperationException();
105-
}
97+
protected abstract PatternSetFactory getPatternSetFactory();
10698

10799
@Input
108100
public ListProperty<String> getIncludeCore() {

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/RestCompatTestTransformTask.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ public abstract class RestCompatTestTransformTask extends DefaultTask {
9898
// PatternFilterable -> list of full test names and reasons. Needed for 1 pattern may include many tests and reasons
9999
private final Map<PatternFilterable, List<Pair<String, String>>> skippedTestByTestNameTransformations = new HashMap<>();
100100

101-
@Inject
102-
protected PatternSetFactory getPatternSetFactory() {
103-
throw new UnsupportedOperationException();
104-
}
105-
106101
@Inject
107102
public RestCompatTestTransformTask(FileSystemOperations fileSystemOperations, ObjectFactory objectFactory) {
108103
this.fileSystemOperations = fileSystemOperations;
@@ -117,6 +112,9 @@ public RestCompatTestTransformTask(FileSystemOperations fileSystemOperations, Ob
117112
getTransformations().add(new InjectHeaders(headers, Sets.newHashSet(RestCompatTestTransformTask::doesNotHaveCatOperation)));
118113
}
119114

115+
@Inject
116+
protected abstract PatternSetFactory getPatternSetFactory();
117+
120118
private static boolean doesNotHaveCatOperation(ObjectNode doNodeValue) {
121119
final Iterator<String> fieldNamesIterator = doNodeValue.fieldNames();
122120
while (fieldNamesIterator.hasNext()) {

0 commit comments

Comments
 (0)