google-code-export / twig-persist

Automatically exported from code.google.com/p/twig-persist
1 stars 1 forks source link

Unassigned Primitive Type char - IllegalStateException #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For primitive type boolean and numbers default value are assigned, but char 
is not handled and hence an exception is thrown:

IllegalStateException("Unkonwn primitive default" + char).

char by convention takes a Character.MIN_VALUE as default. I added 2 lines 
to the PrimitiveConverter to fix it:

line 56:
else if (Character.class == wrapper)
{
 source = Character.MIN_VALUE;
}

If you accept this fix, can you please add it to the main twig branch 
please? Also look at my another fix in Issue 25.

Original issue reported on code.google.com by harsh.je...@gmail.com on 1 Jun 2010 at 5:59

GoogleCodeExporter commented 9 years ago

Original comment by jdpatterson on 6 Jun 2010 at 8:06