From 3e758faf25866656ffe70054c9ebaf88d00483ef Mon Sep 17 00:00:00 2001 From: "A. Abram White" Date: Wed, 9 Aug 2006 23:39:58 +0000 Subject: [PATCH] Fix invalid property warning logic. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@430188 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/lib/conf/ConfigurationImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java index 068f72aeb..4099f5ae6 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java @@ -721,15 +721,15 @@ public class ConfigurationImpl // handle warnings for openjpa.SomeString, but not for // openjpa.some.subpackage.SomeString, since it might be valid for some // specific implementation of OpenJPA - boolean invalid = false; String prefix; for (int i = 0; i < _prefixes.size(); i++) { - prefix = (String) _prefixes.get(i); + prefix = (String) _prefixes.get(i) + "."; if (propName.toLowerCase().startsWith(prefix) - && propName.indexOf('.', prefix.length()) != -1) - invalid = true; + && propName.length() > prefix.length() + && propName.indexOf('.', prefix.length()) == -1) + return true; } - return invalid; + return false; } /**