I think (not sure) that the IContext.getCurrentIdentifier() method is now just legacy. Bit of history:
Before Mendix had microflows, every action had to be a Java action. But because there were no microflows, there also wasn't a "call Java action" activity where you could pass parameters to the action. This meant that Java actions did no have any parameters, but had to "find" this information in the context.
I think there were 4 ways to call a Java action:
Then there was also the IContext.getContextObjects() method, which would return all objects in the context (including the current object). In those older Mendix versions the context mechanism was basically always enabled with no way to turn it off (now it's the apply context setting on forms which is off by default). The contents of this context (which could contain anything, depending on the way the user navigated the application up until that point) was returned by this method, which you then had search for yourself (usually you'd search for a certain object type).
As Michel mentioned and the Mendix documentation recommends, there are now far better ways to achieve this (like parametrised microflow calls, including the options to pass any object), so I wouldn't use these old methods.