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/01/17 15:21:24 UTC
(commons-io) 02/02: Inline single-use local variable
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
commit a0615c64eafc83d4eb14e4d148da70fe622010ca
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jan 17 10:21:17 2024 -0500
Inline single-use local variable
---
src/main/java/org/apache/commons/io/input/CharSequenceReader.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/input/CharSequenceReader.java b/src/main/java/org/apache/commons/io/input/CharSequenceReader.java
index 1d2062b2..132ec5e7 100644
--- a/src/main/java/org/apache/commons/io/input/CharSequenceReader.java
+++ b/src/main/java/org/apache/commons/io/input/CharSequenceReader.java
@@ -298,14 +298,13 @@ public class CharSequenceReader extends Reader implements Serializable {
}
/**
- * Return a String representation of the underlying
+ * Gets a String representation of the underlying
* character sequence.
*
* @return The contents of the character sequence
*/
@Override
public String toString() {
- final CharSequence subSequence = charSequence.subSequence(start(), end());
- return subSequence.toString();
+ return charSequence.subSequence(start(), end()).toString();
}
}