lamber-ken commented on a change in pull request #3391: [CARBONDATA-3521] optimize read property file code
URL:
https://github.com/apache/carbondata/pull/3391#discussion_r326908963
##########
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?
propertyPath will never be 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