/** * Issue a warning that the specified property is not valid. */ private void warnInvalidProperty(String propName) { if (propName != null && (propName.startsWith("java.") || propName.startsWith("javax.persistence")|| propName.startsWith("sun."))) return; if (!isInvalidProperty(propName)) return; Log log = getConfigurationLog(); if (log == null || !log.isWarnEnabled()) return; // try to find the closest string to the invalid property // so that we can provide a hint in case of a misspelling String closest = StringDistance.getClosestLevenshteinDistance (propName, newPropertyList(), 15); if (closest == null) log.warn(_loc.get("invalid-property", propName)); else log.warn(_loc.get("invalid-property-hint", propName, closest)); }
/** * Issue a warning that the specified property is not valid. */ private void warnInvalidProperty(String propName) { if (propName != null && (propName.startsWith("java.") || propName.startsWith("javax.persistence")|| propName.startsWith("sun."))) return; if (!isInvalidProperty(propName)) return; Log log = getConfigurationLog(); if (log == null || !log.isWarnEnabled()) return; // try to find the closest string to the invalid property // so that we can provide a hint in case of a misspelling String closest = StringDistance.getClosestLevenshteinDistance (propName, newPropertyList(), 15); if (closest == null) log.warn(_loc.get("invalid-property", propName)); else log.warn(_loc.get("invalid-property-hint", propName, closest)); }
/** * Issue a warning that the specified property is not valid. */ private void warnInvalidProperty(String propName) { if (propName != null && (propName.startsWith("java.") || propName.startsWith("javax.persistence")|| propName.startsWith("sun."))) return; if (!isInvalidProperty(propName)) return; Log log = getConfigurationLog(); if (log == null || !log.isWarnEnabled()) return; // try to find the closest string to the invalid property // so that we can provide a hint in case of a misspelling String closest = StringDistance.getClosestLevenshteinDistance (propName, newPropertyList(), 15); if (closest == null) log.warn(_loc.get("invalid-property", propName)); else log.warn(_loc.get("invalid-property-hint", propName, closest)); }
/** * Issue a warning that the specified property is not valid. */ private void warnInvalidProperty(String propName) { if (!isInvalidProperty(propName)) return; Log log = getConfigurationLog(); if (log == null || !log.isWarnEnabled()) return; // try to find the closest string to the invalid property // so that we can provide a hint in case of a misspelling String closest = StringDistance.getClosestLevenshteinDistance (propName, newPropertyList(), 15); if (closest == null) log.warn(_loc.get("invalid-property", propName)); else log.warn(_loc.get("invalid-property-hint", propName, closest)); }