You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ad...@apache.org on 2021/01/05 06:17:21 UTC

[roller] branch master updated (8b6e2b2 -> b8ea634)

This is an automated email from the ASF dual-hosted git repository.

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


    from 8b6e2b2  Fixed: sonarqube issue - removed unused private fields
     new c2133b6  Fixed: sonarqube issue - Static non-final field names should comply with a naming convention
     new b8ea634  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-

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/roller/planet/config/PlanetRuntimeConfig.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


[roller] 01/02: Fixed: sonarqube issue - Static non-final field names should comply with a naming convention

Posted by ad...@apache.org.
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 c2133b65943652c6c7668ef0dc74ae41c2067434
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Tue Jan 5 11:31:10 2021 +0530

    Fixed: sonarqube issue - Static non-final field names should comply with a naming convention
    
    Renamed the field runtime_config to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
---
 .../java/org/apache/roller/planet/config/PlanetRuntimeConfig.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 1c91d69..706097d 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
@@ -37,7 +37,7 @@ public class PlanetRuntimeConfig {
 
     private static Log log = LogFactory.getLog(PlanetRuntimeConfig.class);
 
-    private static String runtime_config = "/org/apache/roller/planet/config/planetRuntimeConfigDefs.xml";
+    private static String runtimeConfig = "/org/apache/roller/planet/config/planetRuntimeConfigDefs.xml";
     private static RuntimeConfigDefs configDefs = null;
 
     // prevent instantiations
@@ -109,7 +109,7 @@ public class PlanetRuntimeConfig {
             // unmarshall the config defs file
             try {
                 InputStream is =
-                        PlanetRuntimeConfig.class.getResourceAsStream(runtime_config);
+                        PlanetRuntimeConfig.class.getResourceAsStream(runtimeConfig);
 
                 RuntimeConfigDefsParser parser = new RuntimeConfigDefsParser();
                 configDefs = parser.unmarshall(is);
@@ -139,7 +139,7 @@ public class PlanetRuntimeConfig {
 
         try {
             InputStreamReader reader =
-                    new InputStreamReader(PlanetConfig.class.getResourceAsStream(runtime_config));
+                    new InputStreamReader(PlanetConfig.class.getResourceAsStream(runtimeConfig));
             StringWriter configString = new StringWriter();
 
             char[] buf = new char[8196];


[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-

Posted by ad...@apache.org.
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 <ad...@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);
     }