-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.2
-
Fix Version/s: 1.6.0
-
Component/s: DSpace API
-
Labels:None
-
Attachments:
-
Comments:0
In Context.java, when the methods turnOffAuthorisationSystem() or restoreAuthSystemState() are called, the calling class name is recorded. However the calling class is hardcoded to be the 4th item in stack. The calling class will not always be in the 4th position in the stack.
For example when using this method in a CLI application, it could be the 2nd item in the stack, the first being java.Thread.
Patch attached which replaces the hardcoded:
String caller = stackTrace[3].getClassName();
with
String caller = stackTrace[stackTrace.length - 1].getClassName();
- is related to
-
DS-2505 Harvesting from cli throws exception when log level set to debug
-
- Volunteer Needed
-