From b2adaba8baf119154d2dd3f682124423d1344df1 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 18 Jan 2021 19:43:48 +0100 Subject: [PATCH] Fixed deprecated code and copyright years. --- src/fr/devinsy/strings/StringList.java | 2 +- src/fr/devinsy/strings/demo/StringsDemo.java | 22 ++++++++++---------- test/fr/devinsy/strings/StringListTest.java | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/fr/devinsy/strings/StringList.java b/src/fr/devinsy/strings/StringList.java index 6548d31..c2066c1 100644 --- a/src/fr/devinsy/strings/StringList.java +++ b/src/fr/devinsy/strings/StringList.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020 Christian Pierre MOMON + * Copyright (C) 2008-2021 Christian Pierre MOMON * * This file is part of Devinsy-strings. * diff --git a/src/fr/devinsy/strings/demo/StringsDemo.java b/src/fr/devinsy/strings/demo/StringsDemo.java index d48fa45..9cd0482 100644 --- a/src/fr/devinsy/strings/demo/StringsDemo.java +++ b/src/fr/devinsy/strings/demo/StringsDemo.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2018 Christian Pierre MOMON + * Copyright (C) 2017-2021 Christian Pierre MOMON * * This file is part of Devinsy-strings. * @@ -58,14 +58,14 @@ public class StringsDemo strings.appendln("========== DEMO #2;"); strings.appendln(); strings.appendln("Easy to concatenate different types."); - strings.append("Boolean: ").append(true).append(" ").appendln(new Boolean(false)); - strings.append("Char: ").append('e').append(" ").appendln(new Character('e')); - strings.append("Byte : ").append((byte) 5).append(" ").appendln(new Byte((byte) 5)); - strings.append("Short: ").append((short) 55).append(" ").appendln(new Short((short) 55)); - strings.append("Integer: ").append(555).append(" ").appendln(new Integer(555)); - strings.append("Long: ").append(5555L).append(" ").appendln(new Long(5555)); - strings.append("Float: ").append((float) 5555.5).append(" ").appendln(new Float(5555.5)); - strings.append("Double: ").append(5555.55).append(" ").appendln(new Double(5555.55)); + strings.append("Boolean: ").append(true).append(" ").appendln(Boolean.valueOf(false)); + strings.append("Char: ").append('e').append(" ").appendln(Character.valueOf('e')); + strings.append("Byte : ").append((byte) 5).append(" ").appendln(Byte.valueOf((byte) 5)); + strings.append("Short: ").append((short) 55).append(" ").appendln(Short.valueOf((short) 55)); + strings.append("Integer: ").append(555).append(" ").appendln(Integer.valueOf(555)); + strings.append("Long: ").append(5555L).append(" ").appendln(Long.valueOf(5555)); + strings.append("Float: ").append((float) 5555.5).append(" ").appendln(Float.valueOf((float) 5555.5)); + strings.append("Double: ").append(5555.55).append(" ").appendln(Double.valueOf(5555.55)); strings.append("String: ").append("abcde").append(" ").appendln(new String("abcde")); strings.append("Object: ").appendln(new Date()); strings.append("Array of booleans: ").appendln(StringsUtils.toStringList(new boolean[] { true, false, true })); @@ -109,7 +109,7 @@ public class StringsDemo strings.appendln("========== DEMO #4;"); strings.appendln(); strings.appendln("Advanced features."); - strings.append("Boolean: ").append(true).append(" ").appendln(new Boolean(false)); + strings.append("Boolean: ").append(true).append(" ").appendln(Boolean.valueOf(false)); System.out.println(strings.toString()); } @@ -121,7 +121,7 @@ public class StringsDemo strings.appendln("========== DEMO #5;"); strings.appendln(); strings.appendln("Funny features."); - strings.append("Boolean: ").append(true).append(" ").appendln(new Boolean(false)); + strings.append("Boolean: ").append(true).append(" ").appendln(Boolean.valueOf(false)); System.out.println(strings.toString()); } diff --git a/test/fr/devinsy/strings/StringListTest.java b/test/fr/devinsy/strings/StringListTest.java index 183e11e..b785e3f 100644 --- a/test/fr/devinsy/strings/StringListTest.java +++ b/test/fr/devinsy/strings/StringListTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2020 Christian Pierre MOMON + * Copyright (C) 2013-2021 Christian Pierre MOMON * * This file is part of Devinsy-strings. *