Skip to content

Commit 3a5588b

Browse files
committed
Deprecate constructor Charsets.Charsets() to be private in 4.0
1 parent 26f03d3 commit 3a5588b

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ The <action> type attribute can be add,update,fix,remove.
4949
<release version="2.19.0" date="YYYY-MM-DD" description="Version 2.18.1: Java 8 is required.">
5050
<!-- FIX -->
5151
<action dev="ggregory" type="fix" due-to="Gary Gregory">Deprecate constructor Counters.Counters() to be private in 4.0.</action>
52+
<action dev="ggregory" type="fix" due-to="Gary Gregory">Deprecate constructor Charsets.Charsets() to be private in 4.0.</action>
5253
<!-- ADD -->
5354
<action dev="ggregory" type="add" issue="IO-860" due-to="Nico Strecker, Gary Gregory">Add ThrottledInputStream.Builder.setMaxBytes(long, ChronoUnit).</action>
5455
<action dev="ggregory" type="add" due-to="Gary Gregory">Add IOIterable.</action>

src/main/java/org/apache/commons/io/Charsets.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,14 @@ public static Charset toCharset(final String charsetName) throws UnsupportedChar
218218
public static Charset toCharset(final String charsetName, final Charset defaultCharset) throws UnsupportedCharsetException {
219219
return charsetName == null ? defaultCharset : Charset.forName(charsetName);
220220
}
221+
222+
/**
223+
* Construct a new instance.
224+
*
225+
* @deprecated Will be private in 4.0
226+
*/
227+
@Deprecated
228+
public Charsets() {
229+
// empty
230+
}
221231
}

0 commit comments

Comments
 (0)