openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Lee <allee8...@gmail.com>
Subject Re: svn commit: r1063867 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java
Date Thu, 27 Jan 2011 15:27:50 GMT
Should this go back to 2.1.x since the exception is wrapped with
ParseException and a new messages are added?

Thanks,
Albert Lee.

On Wed, Jan 26, 2011 at 2:50 PM, <ppoddar@apache.org> wrote:

> Author: ppoddar
> Date: Wed Jan 26 20:50:23 2011
> New Revision: 1063867
>
> URL: http://svn.apache.org/viewvc?rev=1063867&view=rev
> Log:
> Add exception message for configuration error
>
> Modified:
>
>  openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java
>
> Modified:
> openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java
> URL:
> http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java?rev=1063867&r1=1063866&r2=1063867&view=diff
>
> ==============================================================================
> ---
> openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java
> (original)
> +++
> openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java
> Wed Jan 26 20:50:23 2011
> @@ -33,7 +33,6 @@ import java.util.Properties;
>  import java.util.TreeSet;
>
>  import org.apache.commons.lang.StringUtils;
> -import org.apache.openjpa.util.UserException;
>
>  import serp.util.Strings;
>
> @@ -440,7 +439,7 @@ public class Options extends TypedProper
>                 str = "true";
>             return cons.newInstance(new Object[]{ str });
>         } catch (Exception e) {
> -            err = new UserException(_loc.get("conf-no-constructor", str,
> type), e);
> +            err = new ParseException(_loc.get("conf-no-constructor", str,
> type), e);
>         }
>
>         // special case: the argument value is a subtype name and a new
> instance
> @@ -450,13 +449,12 @@ public class Options extends TypedProper
>             subType = Class.forName(str);
>         } catch (Exception e) {
>             err = e;
> -            throw new UserException(_loc.get("conf-no-type", str, type),
> e);
> +            throw new ParseException(_loc.get("conf-no-type", str, type),
> e);
>         }
>         if (!type.isAssignableFrom(subType))
>             throw err;
>         try {
> -            return AccessController.doPrivileged(
> -                J2DoPrivHelper.newInstanceAction(subType));
> +            return
> AccessController.doPrivileged(J2DoPrivHelper.newInstanceAction(subType));
>         } catch (PrivilegedActionException pae) {
>             throw pae.getException();
>         }
>
>
>


-- 
Albert Lee.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message