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 4652d42440009f4b335393e61781daaa3a847401 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 8 13:55:06 2024 -0500 Update AbstractStreamBuilder getters from protected to public --- src/changes/changes.xml | 1 + .../commons/io/build/AbstractStreamBuilder.java | 24 +++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 152380ac2..181c94dea 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -68,6 +68,7 @@ The <action> type attribute can be add,update,fix,remove. <!-- UPDATE --> <action dev="ggregory" type="update" due-to="Gary Gregory">Bump org.apache.commons:commons-parent from 74 to 78 #670, #676, #679, #688.</action> <action dev="ggregory" type="update" due-to="Gary Gregory">Bump commons.bytebuddy.version from 1.15.1 to 1.15.10 #672, #673, #685, #686, #694, #696, #698.</action> + <action dev="ggregory" type="update" due-to="Gary Gregory">Update AbstractStreamBuilder getters from protected to public.</action> </release> <release version="2.17.0" date="2024-09-15" description="Version 2.17.0: Java 8 is required."> <!-- ADD --> diff --git a/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java b/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java index c14b9d55c..a8e5bcdb6 100644 --- a/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java +++ b/src/main/java/org/apache/commons/io/build/AbstractStreamBuilder.java @@ -98,7 +98,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * * @return the buffer size, defaults to {@link IOUtils#DEFAULT_BUFFER_SIZE} ({@value IOUtils#DEFAULT_BUFFER_SIZE}). */ - protected int getBufferSize() { + public int getBufferSize() { return bufferSize; } @@ -107,7 +107,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * * @return the buffer size default, defaults to {@link IOUtils#DEFAULT_BUFFER_SIZE} ({@value IOUtils#DEFAULT_BUFFER_SIZE}). */ - protected int getBufferSizeDefault() { + public int getBufferSizeDefault() { return bufferSizeDefault; } @@ -121,7 +121,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see AbstractOrigin#getCharSequence(Charset) * @since 2.13.0 */ - protected CharSequence getCharSequence() throws IOException { + public CharSequence getCharSequence() throws IOException { return checkOrigin().getCharSequence(getCharset()); } @@ -139,7 +139,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * * @return the Charset default, defaults to {@link Charset#defaultCharset()}. */ - protected Charset getCharsetDefault() { + public Charset getCharsetDefault() { return charsetDefault; } @@ -152,7 +152,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see AbstractOrigin#getPath() * @since 2.18.0 */ - protected File getFile() { + public File getFile() { return checkOrigin().getFile(); } @@ -167,7 +167,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see #getOpenOptions() * @since 2.13.0 */ - protected InputStream getInputStream() throws IOException { + public InputStream getInputStream() throws IOException { return checkOrigin().getInputStream(getOpenOptions()); } @@ -176,7 +176,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * * @return the OpenOption array. */ - protected OpenOption[] getOpenOptions() { + public OpenOption[] getOpenOptions() { return openOptions; } @@ -191,7 +191,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see #getOpenOptions() * @since 2.13.0 */ - protected OutputStream getOutputStream() throws IOException { + public OutputStream getOutputStream() throws IOException { return checkOrigin().getOutputStream(getOpenOptions()); } @@ -204,7 +204,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see AbstractOrigin#getPath() * @since 2.13.0 */ - protected Path getPath() { + public Path getPath() { return checkOrigin().getPath(); } @@ -217,7 +217,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @throws IOException if an I/O error occurs. * @since 2.18.0 */ - protected RandomAccessFile getRandomAccessFile() throws IOException { + public RandomAccessFile getRandomAccessFile() throws IOException { return checkOrigin().getRandomAccessFile(getOpenOptions()); } @@ -232,7 +232,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see #getCharset() * @since 2.16.0 */ - protected Reader getReader() throws IOException { + public Reader getReader() throws IOException { return checkOrigin().getReader(getCharset()); } @@ -247,7 +247,7 @@ public abstract class AbstractStreamBuilder<T, B extends AbstractStreamBuilder<T * @see #getOpenOptions() * @since 2.13.0 */ - protected Writer getWriter() throws IOException { + public Writer getWriter() throws IOException { return checkOrigin().getWriter(getCharset(), getOpenOptions()); }