Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCR-3219 remove check if directory exists for property MCR.basedir #2315

Open
wants to merge 2 commits into
base: 2024.06.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ public static MCRConfigurationInputStream getMyCoRePropertiesInstance() throws I
LogManager.getLogger().info("Current configuration directory: {}",
configurationDirectory.getAbsolutePath());
// set MCR.basedir, is normally overwritten later
if (configurationDirectory.isDirectory()) {
initStream = getBaseDirInputStream(configurationDirectory);
if (!configurationDirectory.isDirectory()) {
LogManager.getLogger().warn("Current configuration directory does not exist: {}",
configurationDirectory.getAbsolutePath());
}
initStream = getBaseDirInputStream(configurationDirectory);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe log a warning about the missing base directory? Could help in cases other then the first startup where there actually is a problem because of a missing or inaccessible directory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the log statement above is sufficient. If an exception occurs later, that should contains all the details, e.g. a specific subdirectory that is not accessible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except that is is just an info and doesn't point to a problem.

}
return new MCRConfigurationInputStream(MYCORE_PROPERTIES, initStream);
}
Expand Down
Loading