Skip to content

Commit 224c031

Browse files
committed
Remove deprecated PathFileObject#getFullPath
1 parent 43ba668 commit 224c031

File tree

4 files changed

+0
-72
lines changed

4 files changed

+0
-72
lines changed

java-compiler-testing/src/main/java/io/github/ascopes/jct/assertions/PathFileObjectAssert.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,6 @@ public AbstractPathAssert<?> relativePath() {
5454
return assertThat(actual.getRelativePath());
5555
}
5656

57-
/**
58-
* Perform an assertion on the file object's absolute path.
59-
*
60-
* @return the assertions for the path.
61-
* @throws AssertionError if the file object is null.
62-
* @deprecated use {@link #absolutePath()} instead.
63-
*/
64-
@Deprecated(forRemoval = true, since = "0.7.3")
65-
@SuppressWarnings("removal")
66-
public AbstractPathAssert<?> fullPath() {
67-
isNotNull();
68-
69-
return assertThat(actual.getFullPath());
70-
}
71-
7257
/**
7358
* Perform an assertion on the file object's absolute path.
7459
*

java-compiler-testing/src/main/java/io/github/ascopes/jct/filemanagers/PathFileObject.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,6 @@ public String getCharContent(boolean ignoreEncodingErrors) throws IOException {
187187
}
188188
}
189189

190-
/**
191-
* Get the full path of this file object.
192-
*
193-
* @return the full path.
194-
* @deprecated use {@link #getAbsolutePath()} instead.
195-
*/
196-
@Deprecated(since = "0.7.3", forRemoval = true)
197-
@SuppressWarnings("DeprecatedIsStillUsed")
198-
public Path getFullPath() {
199-
return absolutePath;
200-
}
201-
202190
/**
203191
* Get the kind of the file.
204192
*

java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/assertions/PathFileObjectAssertTest.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -66,37 +66,6 @@ void relativePathReturnsAssertionsOnTheRelativePath() {
6666
}
6767
}
6868

69-
@DisplayName("PathFileObjectAssert#fullPath tests")
70-
@Nested
71-
@SuppressWarnings("removal")
72-
class FullPathTest {
73-
74-
@DisplayName(".fullPath() fails if the path file object is null")
75-
@Test
76-
void fullPathFailsIfThePathFileObjectIsNull() {
77-
// Given
78-
var assertions = new PathFileObjectAssert(null);
79-
80-
// Then
81-
assertThatExceptionOfType(AssertionError.class)
82-
.isThrownBy(assertions::fullPath);
83-
}
84-
85-
@DisplayName(".fullPath() returns assertions on the absolute path")
86-
@Test
87-
void fullPathReturnsAssertionsOnTheFullPath() {
88-
// Given
89-
var path = someAbsolutePath();
90-
var pathFileObject = mock(PathFileObject.class);
91-
when(pathFileObject.getFullPath()).thenReturn(path);
92-
var assertions = new PathFileObjectAssert(pathFileObject);
93-
94-
// Then
95-
assertThatNoException()
96-
.isThrownBy(() -> assertions.fullPath().isSameAs(path));
97-
}
98-
}
99-
10069
@DisplayName("PathFileObjectAssert#absolutePath tests")
10170
@Nested
10271
class AbsolutePathTest {

java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/filemanagers/PathFileObjectTest.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -322,20 +322,6 @@ void getCharContentPropagatesEncodingErrors() throws IOException {
322322
}
323323
}
324324

325-
@DisplayName(".getFullPath() returns the full path")
326-
@Test
327-
@SuppressWarnings("removal")
328-
void getFullPathReturnsTheFullPath() {
329-
// Given
330-
var rootPath = someAbsolutePath();
331-
var relativePath = someRelativePath();
332-
var fileObject = new PathFileObject(someLocation(), rootPath, relativePath);
333-
334-
// Then
335-
assertThat(fileObject.getFullPath())
336-
.isEqualTo(rootPath.resolve(relativePath));
337-
}
338-
339325
@DisplayName(".getLastModified() returns the last modified timestamp")
340326
@Test
341327
void getLastModifiedReturnsTheLastModifiedTimestamp() throws Exception {

0 commit comments

Comments
 (0)