@Test public void testCreateRolesAllowedNegative() throws Exception { assertThat(new String[] {}, equalTo(SecurityAnnotations.rolesAllowed((String) null).value())); assertThat(new String[] {"manager"}, equalTo(SecurityAnnotations.rolesAllowed("manager", null).value())); }
public static RolesAllowed rolesAllowed(final String... roles) { final List<String> list = new ArrayList<>(roles.length); for (final String role : roles) { if (role != null) { list.add(role); } } return new RolesAllowedImpl(list.toArray(new String[list.size()])); }
SecurityAnnotations { public static RolesAllowed rolesAllowed(final String... roles) { final List<String> list = new ArrayList<>(roles.length); for (final String role : roles) { if (role != null) { list.add(role); } } return new RolesAllowedImpl(list.toArray(new String[list.size()])); } }
SecurityAnnotations { public static RolesAllowed rolesAllowed(final String... roles) { final List<String> list = new ArrayList<>(roles.length); for (final String role : roles) { if (role != null) { list.add(role); } } return new RolesAllowedImpl(list.toArray(new String[list.size()])); } private  SecurityAnnotations(); }
SecurityAnnotations { public static RolesAllowed rolesAllowed(final String... roles) { final List<String> list = new ArrayList<>(roles.length); for (final String role : roles) { if (role != null) { list.add(role); } } return new RolesAllowedImpl(list.toArray(new String[list.size()])); } private  SecurityAnnotations(); static RolesAllowed rolesAllowed(final String... roles); static PermitAll permitAll(); static DenyAll denyAll(); }
SecurityAnnotations { public static RolesAllowed rolesAllowed(final String... roles) { final List<String> list = new ArrayList<>(roles.length); for (final String role : roles) { if (role != null) { list.add(role); } } return new RolesAllowedImpl(list.toArray(new String[list.size()])); } private  SecurityAnnotations(); static RolesAllowed rolesAllowed(final String... roles); static PermitAll permitAll(); static DenyAll denyAll();  }