Skip to content

Commit

Permalink
Resolved some dependency deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
essiembre committed Aug 14, 2023
1 parent 61f058e commit 682b2c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ private int realRead(byte[] b, int off, int len) throws IOException {
*/
public void enforceFullCaching() throws IOException {
if (firstRead) {
IOUtils.copy(this, NullOutputStream.NULL_OUTPUT_STREAM);
IOUtils.copy(this, NullOutputStream.INSTANCE);
length = count;
firstRead = false;
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/norconex/commons/lang/map/Properties.java
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,10 @@ private synchronized void storeToJavaUtilProperties(
// Store it
if (isXML) {
if (output instanceof Writer writer) {
p.storeToXML(new WriterOutputStream(writer,
StandardCharsets.UTF_8), null);
p.storeToXML(WriterOutputStream.builder()
.setCharset(UTF_8)
.setWriter(writer)
.get(), null);
} else {
p.storeToXML((OutputStream) output, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ void testVisitPropertiesObjectBiPredicateClass() {

//--- Test classes ---------------------------------------------------------

@SuppressWarnings("exports")
public static class Root implements Serializable {
private static final long serialVersionUID = 1L;
private Sub1Yes sub1yes = new Sub1Yes();
Expand Down Expand Up @@ -631,7 +630,6 @@ public void accept(Event t) {
public static class Sub2No implements Serializable {
private static final long serialVersionUID = 1L;
}
@SuppressWarnings("exports")
public static class Sub3Yes implements EventListener<Event>, Serializable {
private static final long serialVersionUID = 1L;
private Sub1Yes sub1Yes;
Expand Down

0 comments on commit 682b2c8

Please sign in to comment.