Mercurial > hg > graal-jvmci-8
changeset 16271:e589c26c2eb8
enforce use of boxed types for OptionDescriptor
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 27 Jun 2014 22:10:23 +0200 |
parents | d56a09df1a1f |
children | 56cd93afdc15 |
files | graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionDescriptor.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionDescriptor.java Fri Jun 27 19:55:54 2014 +0200 +++ b/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionDescriptor.java Fri Jun 27 22:10:23 2014 +0200 @@ -42,11 +42,13 @@ this.option = option; this.declaringClass = declaringClass; this.fieldName = fieldName; + assert !type.isPrimitive() : "must used boxed type instead of " + type; option.setDescriptor(this); } /** - * Gets the type of values stored in the option. + * Gets the type of values stored in the option. This will be the boxed type for a primitive + * option. */ public Class<?> getType() { return type;