Skip to content

Commit

Permalink
adding static constant
Browse files Browse the repository at this point in the history
  • Loading branch information
arash.shokoufandeh committed Nov 30, 2016
1 parent 7392962 commit ffa7c40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/java/com/nfl/glitr/annotation/GlitrArgument.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
String name();
Class type();
boolean nullable() default true;
String defaultValue() default "No Default Value";
String description() default "No Description";

String NO_DEFAULT_VALUE = "No Default Value";
String defaultValue() default NO_DEFAULT_VALUE;
}
2 changes: 1 addition & 1 deletion src/main/java/com/nfl/glitr/registry/TypeRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private GraphQLArgument createRelayInputArgument(Class methodDeclaringClass, Met

// Default values need to match type so we replace our default String with null
Object defaultValue = null;
if (!arg.defaultValue().equalsIgnoreCase("No Default Value")) {
if (!arg.defaultValue().equalsIgnoreCase(GlitrArgument.NO_DEFAULT_VALUE)) {
defaultValue = arg.defaultValue();
}

Expand Down

0 comments on commit ffa7c40

Please sign in to comment.