@Test void testGetMessage() { DataAlreadyExistsException ex = new DuplicatePermissionException(objectIdentity, new GrantedAuthoritySid("ROLE_role1")); assertEquals( "typeId:type, identifier:id, sid:GrantedAuthoritySid[ROLE_role1]", ex.getMessage()); }
@Override public String getMessage() { return String.format( "typeId:%s, identifier:%s, sid:%s", objectIdentity.getType(), objectIdentity.getIdentifier(), sid); }
DuplicatePermissionException extends DataAlreadyExistsException { @Override public String getMessage() { return String.format( "typeId:%s, identifier:%s, sid:%s", objectIdentity.getType(), objectIdentity.getIdentifier(), sid); } }
DuplicatePermissionException extends DataAlreadyExistsException { @Override public String getMessage() { return String.format( "typeId:%s, identifier:%s, sid:%s", objectIdentity.getType(), objectIdentity.getIdentifier(), sid); } DuplicatePermissionException(ObjectIdentity objectIdentity, Sid sid); }
DuplicatePermissionException extends DataAlreadyExistsException { @Override public String getMessage() { return String.format( "typeId:%s, identifier:%s, sid:%s", objectIdentity.getType(), objectIdentity.getIdentifier(), sid); } DuplicatePermissionException(ObjectIdentity objectIdentity, Sid sid); @Override String getMessage(); }
DuplicatePermissionException extends DataAlreadyExistsException { @Override public String getMessage() { return String.format( "typeId:%s, identifier:%s, sid:%s", objectIdentity.getType(), objectIdentity.getIdentifier(), sid); } DuplicatePermissionException(ObjectIdentity objectIdentity, Sid sid); @Override String getMessage();  }