You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/04/30 21:56:32 UTC
(commons-io) branch master updated: More precise internal name
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new ab8eacf64 More precise internal name
ab8eacf64 is described below
commit ab8eacf644fd13799a11249cc640a844db64104f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Apr 30 17:56:27 2024 -0400
More precise internal name
Avoids confusion with a file base name
---
src/main/java/org/apache/commons/io/build/AbstractOrigin.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/build/AbstractOrigin.java b/src/main/java/org/apache/commons/io/build/AbstractOrigin.java
index 281edca50..3797c9cc5 100644
--- a/src/main/java/org/apache/commons/io/build/AbstractOrigin.java
+++ b/src/main/java/org/apache/commons/io/build/AbstractOrigin.java
@@ -525,7 +525,7 @@ public abstract class AbstractOrigin<T, B extends AbstractOrigin<T, B>> extends
*/
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));
}
/**
@@ -560,7 +560,7 @@ public abstract class AbstractOrigin<T, B extends AbstractOrigin<T, B>> extends
*/
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));
}
/**
@@ -574,7 +574,7 @@ public abstract class AbstractOrigin<T, B extends AbstractOrigin<T, B>> extends
return Files.newBufferedReader(getPath(), charset);
}
- private String getSimpleName() {
+ private String getSimpleClassName() {
return getClass().getSimpleName();
}
@@ -604,6 +604,6 @@ public abstract class AbstractOrigin<T, B extends AbstractOrigin<T, B>> extends
@Override
public String toString() {
- return getSimpleName() + "[" + origin.toString() + "]";
+ return getSimpleClassName() + "[" + origin.toString() + "]";
}
}