[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Enum#valueOf implementation
From: |
Robert Schuster |
Subject: |
Re: [cp-patches] Enum#valueOf implementation |
Date: |
Sat, 23 Jul 2005 02:49:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.8) Gecko/20050514 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Ewout,
welcome onboard!
(Looks like Mark should add Savannah user epr to the project.)
Your 'patch' does not really look like a unified diff. What you send to
classpath-patches should be:
- - a unified diff of all the changes source code files, scripts etc (not
the ChangeLog) as an attachment
- - a ChangeLog entry describing all the details (describe what was done
not why)
We have a detailed Patch Submission Guide[0] in our mediation wiki. Have
a look at it.
cu
Robert
[0] -
http://developer.classpath.org/mediation/ClasspathFirstSteps#head-a8b2520531202f1acefb9cb1c8b540999e4eaf21
Ewout Prangsma wrote:
> I've implemented java.lang.Enum#valueOf in the generics branch.
>
> Can someone with CVS access verify and commit this.
>
> PS. My FSF paperwork is all done.
>
> Thanks
> Ewout
>
>
> @SuppressWarnings("unchecked")
> public static <S extends Enum<S>> Enum valueOf(Class<S> etype, String s) {
> if (etype == null || s == null)
> throw new NullPointerException();
> try {
> return (S) etype.getDeclaredField(s).get(null);
> } catch (NoSuchFieldException exception) {
> throw new IllegalArgumentException(s);
> } catch (IllegalAccessException exception) {
> throw new Error("Unable to access Enum class");
> }
> }
>
>
>
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFC4ZQwG9cfwmwwEtoRArszAJ0WQprbEl9CLqtPoOVPfMl1Y7ImVACfaAcQ
ZhbgazmSB41BNcRmz3MgQ+0=
=rSv+
-----END PGP SIGNATURE-----