roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adityasha...@apache.org
Subject [roller] 02/02: Fixed: sonarqube issue - Boolean​(String s) constructor is deprecated Used parseBoolean(String) to convert a string to a boolean primitive https://docs.oracle.com/javase/9/docs/api/java/lang/Boolean.html#Boolean-java.lang.String-
Date Tue, 05 Jan 2021 06:17:23 GMT
This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git

commit b8ea6346fc800364095f3b720a0a8f270e1f17b9
Author: Aditya Sharma <adityasharma@apache.org>
AuthorDate: Tue Jan 5 11:44:02 2021 +0530

    Fixed: sonarqube issue - Boolean​(String s) constructor is deprecated
     Used parseBoolean(String) to convert a string to a boolean primitive
    https://docs.oracle.com/javase/9/docs/api/java/lang/Boolean.html#Boolean-java.lang.String-
---
 .../main/java/org/apache/roller/planet/config/PlanetRuntimeConfig.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/src/main/java/org/apache/roller/planet/config/PlanetRuntimeConfig.java b/app/src/main/java/org/apache/roller/planet/config/PlanetRuntimeConfig.java
index 706097d..daa4445 100644
--- a/app/src/main/java/org/apache/roller/planet/config/PlanetRuntimeConfig.java
+++ b/app/src/main/java/org/apache/roller/planet/config/PlanetRuntimeConfig.java
@@ -76,7 +76,7 @@ public class PlanetRuntimeConfig {
         if(value == null)
             return false;
 
-        return (new Boolean(value)).booleanValue();
+        return Boolean.parseBoolean(value);
     }
 
 


Mime
View raw message