Skip to content

Commit

Permalink
fix: remove NAME constants
Browse files Browse the repository at this point in the history
  • Loading branch information
metacosm committed Sep 8, 2022
1 parent 3e0b247 commit 8b5f98b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
@Target({ TYPE })
@Retention(RUNTIME)
public @interface Group {
String NAME = Group.class.getSimpleName();

String value();
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
@Target({ TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface Version {
String NAME = Version.class.getSimpleName();

/**
* The name of this version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static String getApiVersion(Class<?> clazz) {
}
if (group != null || version != null) {
throw new IllegalArgumentException(
"You need to specify both @" + Group.NAME + " and @" + Version.NAME
"You need to specify both @" + Group.class.getSimpleName() + " and @" + Version.class.getSimpleName()
+ " annotations if you specify either");
}
return null;
Expand Down Expand Up @@ -164,7 +164,7 @@ static String getFullResourceName(Class<?> clazz) {
if (group == null) {
throw new IllegalArgumentException(
"Should provide non-null group. Is " + clazz.getName() + " properly annotated with @"
+ Group.NAME + " and/or @" + Version.NAME + "?");
+ Group.class.getSimpleName() + " and/or @" + Version.class.getSimpleName() + "?");
}
return getFullResourceName(plural, group);
}
Expand Down

0 comments on commit 8b5f98b

Please sign in to comment.