Project

General

Profile

bug #8839

Role misses toString method

Added by Andreas Kohlbecker 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Priority14
Category:
cdmlib
Target version:
Start date:
01/30/2020
Due date:
% Done:

100%

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.

Associated revisions

Revision a2c52f59 (diff)
Added by Andreas Kohlbecker 10 months ago

fix #8839 toString() for Role

Revision 31cda96c (diff)
Added by Andreas Kohlbecker 9 months ago

ref #8839 directly referencing the role field

History

#1 Updated by Andreas Kohlbecker 10 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#2 Updated by Andreas Müller 10 months 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()

#3 Updated by Andreas Müller 9 months ago

  • Status changed from Resolved to Feedback

#4 Updated by Andreas Kohlbecker 9 months ago

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

changed to direct field access.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)