Re: [Sablevm-developer] primitive types and isAssignableFrom
Brought to you by:
egagnon
From: Etienne G. <gag...@UQ...> - 2004-05-21 16:13:19
|
Hi Laurent, Laurent Martelli wrote: > I think the following implementation of > java.lang.isAssignableFrom(Class) should be OK for primitive types too: > > public boolean isAssignableFrom(Class c) > { > if (c == null) { > throw new NullPointerException(); > } else if (this.isPrimitive() || c.isPrimitive()) { > return this == c; > } else { > return VMClass.isAssignableFrom (this, c); > } > } Applied in staging. Thanks! Little request for future patches... Usually, the preferred form of patches is what is called "unified diffs". You get such a thing by running diff with the -u option, e.g.: diff -u original_file modified_file Thanks, Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |