Project

General

Profile

Actions

bug #8839

closed

Role misses toString method

Added by Andreas Kohlbecker almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Priority14
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

Error messages regarding missing roles are quite cryptical these days:

org.eclipse.e4.core.di.InjectionException: 
org.springframework.orm.hibernate5.HibernateSystemException: Permission 
denied for 'g.domina' none of the roles 
'[Leu.etaxonomy.cdm.persistence.hibernate.permission.Role;@112309b5' 
found in authentication.; nested exception is 
eu.etaxonomy.cdm.database.PermissionDeniedException: Permission denied 
for 'g.domina' none of the roles 
'[Leu.etaxonomy.cdm.persistence.hibernate.permission.Role;@112309b5' 
found in authentication.
Actions #1

Updated by Andreas Kohlbecker almost 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #2

Updated by Andreas Müller almost 3 years ago

Is there a reason for using getRole() instead of directly referencing the role field? For toString() methods it is best praxis to only reference internal fields to be on the save side the data that is used in toString() never needs to load other objects or needs to do lazy loading.
With the current implemetation of getRole() there is not difference. But if the implementation changes in future you may not realize that you need to adapt toString()

Actions #3

Updated by Andreas Müller almost 3 years ago

  • Status changed from Resolved to Feedback
Actions #4

Updated by Andreas Kohlbecker almost 3 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 50 to 100

changed to direct field access.

Actions

Also available in: Atom PDF