Skip to content

Commit

Permalink
Issue #6 : fix serializer/deserializer instantiation with constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
nmorel committed Dec 10, 2013
1 parent 7290e35 commit 5b91c0f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ private MapperInstance getInstance( JType mappedType, JClassType classType, bool
}

StringBuilder builder = new StringBuilder();
builder.append( "new " ).append( classType.getQualifiedSourceName() ).append( '.' ).append( constructor.getName() )
.append( '(' );
builder.append( "new " ).append( classType.getQualifiedSourceName() ).append( '(' );
for ( int i = 0; i < nbParam; i++ ) {
if ( i > 0 ) {
builder.append( ", %s" );
Expand Down Expand Up @@ -356,8 +355,7 @@ private String getKeyInstance( JClassType classType ) {
for ( JConstructor constructor : classType.getConstructors() ) {
if ( constructor.isPublic() && constructor.getParameters().length == 0 ) {
StringBuilder builder = new StringBuilder();
builder.append( "new " ).append( classType.getQualifiedSourceName() ).append( '.' ).append( constructor.getName() )
.append( "()" );
builder.append( "new " ).append( classType.getQualifiedSourceName() ).append( "()" );
return builder.toString();
}
}
Expand Down

0 comments on commit 5b91c0f

Please sign in to comment.