[
http://jira.dspace.org/jira/browse/DS-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stuart Lewis resolved DS-209.
-----------------------------
Resolution: Fixed
Assignee: Stuart Lewis
> Context.java turnOffAuthorisationSystem() can throw a NPE
> ---------------------------------------------------------
>
> Key: DS-209
> URL: http://jira.dspace.org/jira/browse/DS-209
> Project: DSpace 1.x
> Issue Type: Bug
> Components: DSpace API
> Affects Versions: 1.5.2
> Reporter: Stuart Lewis
> Assignee: Stuart Lewis
> Fix For: 1.6.0
>
> Attachments: stacktrace-patch.patch
>
>
> 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();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel