pinal-shah commented on code in PR #476:
URL: https://github.com/apache/atlas/pull/476#discussion_r2579632210
##########
intg/src/main/java/org/apache/atlas/ApplicationProperties.java:
##########
@@ -124,36 +124,63 @@ public static Configuration set(Configuration
configuration) throws AtlasExcepti
return instance;
}
- public static Configuration get(String fileName) throws AtlasException {
- String confLocation =
System.getProperty(ATLAS_CONFIGURATION_DIRECTORY_PROPERTY);
+ public static Configuration getConf(String absoluteFilePath) throws
AtlasException {
+ if (instance == null) {
+ synchronized (ApplicationProperties.class) {
+ if (instance == null) {
+ set(get(absoluteFilePath));
+ }
+ }
+ }
+ return instance;
+ }
+
+ public static Configuration getConf(PropertiesConfiguration clientConf)
throws AtlasException {
+ if (instance == null) {
+ synchronized (ApplicationProperties.class) {
+ if (instance == null) {
+ set(clientConf);
+ }
+ }
+ }
+ return instance;
+ }
+ public static Configuration get(String fileName) throws AtlasException {
try {
- URL url;
+ URL url = null;
Review Comment:
null assignment is not required
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]