Skip to content

Commit

Permalink
More precise internal name
Browse files Browse the repository at this point in the history
Avoids confusion with a file base name
  • Loading branch information
garydgregory committed Apr 30, 2024
1 parent c28eff3 commit ab8eacf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/apache/commons/io/build/AbstractOrigin.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public CharSequence getCharSequence(final Charset charset) throws IOException {
*/
public File getFile() {
throw new UnsupportedOperationException(
String.format("%s#getFile() for %s origin %s", getSimpleName(), origin.getClass().getSimpleName(), origin));
String.format("%s#getFile() for %s origin %s", getSimpleClassName(), origin.getClass().getSimpleName(), origin));
}

/**
Expand Down Expand Up @@ -560,7 +560,7 @@ public OutputStream getOutputStream(final OpenOption... options) throws IOExcept
*/
public Path getPath() {
throw new UnsupportedOperationException(
String.format("%s#getPath() for %s origin %s", getSimpleName(), origin.getClass().getSimpleName(), origin));
String.format("%s#getPath() for %s origin %s", getSimpleClassName(), origin.getClass().getSimpleName(), origin));
}

/**
Expand All @@ -574,7 +574,7 @@ public Reader getReader(final Charset charset) throws IOException {
return Files.newBufferedReader(getPath(), charset);
}

private String getSimpleName() {
private String getSimpleClassName() {
return getClass().getSimpleName();
}

Expand Down Expand Up @@ -604,6 +604,6 @@ public long size() throws IOException {

@Override
public String toString() {
return getSimpleName() + "[" + origin.toString() + "]";
return getSimpleClassName() + "[" + origin.toString() + "]";
}
}

0 comments on commit ab8eacf

Please sign in to comment.