[GitHub] [carbondata] jackylk commented on a change in pull request #3391: [CARBONDATA-3521] optimize read property file code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #3391: [CARBONDATA-3521] optimize read property file code

GitBox
jackylk commented on a change in pull request #3391: [CARBONDATA-3521] optimize read property file code
URL: https://github.com/apache/carbondata/pull/3391#discussion_r326907564
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
 ##########
 @@ -757,38 +757,30 @@ private void validateCarbonDataFileVersion() {
    * memory
    */
   private void loadProperties() {
-    String property = System.getProperty(CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH);
-    if (null == property) {
-      property = CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH_DEFAULT;
-    }
-    File file = new File(property);
-    LOGGER.info("Property file path: " + file.getAbsolutePath());
+    String propertyPath = System.getProperty(CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH,
+            CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH_DEFAULT);
+
+    File propertyFile = new File(propertyPath);
 
 Review comment:
   what if the propertyPath is null?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services