Skip to content

Doesn't handle enums. #1

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Call Builder.build() on a class graph with an enum in it.
2.
3.

What is the expected output? What do you see instead?

enum should get a value of some sort but instead I see

Caused by: java.lang.NullPointerException
    at com.googlecode.behaim.explorer.Explorer.explore(Explorer.java:49)


What version of the product are you using? On what operating system?

Downloaded today from SVN (12 feb 2013)

Please provide any additional information below.

Add these two lines of code below line 80 of ProducerVisitor.java to make it 
start generating a valid enum value.

} else if (isEnum(field)) {
    fieldValue = field.getType().getEnumConstants()[0];

But I suspect a random choice from the array would be better than just picking 
the first one.

Original issue reported on code.google.com by [email protected] on 12 Feb 2013 at 11:29

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions