Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
1.7.0, 2.0.0
-
None
-
None
Description
SentryStore.java has a piece of code that takes JDO or datanucleus properties from config file:
public static final String SENTRY_DB_PROPERTY_PREFIX = "sentry."; public static final String SENTRY_JAVAX_JDO_PROPERTY_PREFIX = SENTRY_DB_PROPERTY_PREFIX + "javax.jdo"; public static final String SENTRY_DATANUCLEUS_PROPERTY_PREFIX = SENTRY_DB_PROPERTY_PREFIX + "datanucleus";
for (Map.Entry<String, String> entry : conf) { String key = entry.getKey(); if (key.startsWith(ServerConfig.SENTRY_JAVAX_JDO_PROPERTY_PREFIX) || key.startsWith(ServerConfig.SENTRY_DATANUCLEUS_PROPERTY_PREFIX)) { key = StringUtils.removeStart(key, ServerConfig.SENTRY_DB_PROPERTY_PREFIX); prop.setProperty(key, entry.getValue()); } }
The intention apparently was to read properties starting from "sentry." but the code picks up properties which don't start with ".sentry".
So the code doesn't make much sense, but an important question is whether anyone depends on the existing behavior.
Attachments
Issue Links
- relates to
-
SENTRY-872 Uber jira for HMS HA + Sentry HA redesign
- Resolved