i report this issue happened to me while handling with custom setting. CSV__c is a custom setting, where are stored the configurations of some CSV files that the system has to process. The custom setting is of the type List.
string s = null; CSV__c c = CSV__c.getValues(s); system.debug('@@@@@@@@'+ c);
I supposed that this will return null, while the custom setting method getValues return a record. Do you have any reference on this behaviour? Is not a big issue, i can make a change and check the parameter s, but i didn't found any reference to this behaviour. So I'm reporting this as knowledge and share this strange behaviour.
Furthermore, if i test
CSV__c c = CSV__c.getValues(**null**); system.debug('@@@@@@@@'+ c);
the salesforce compiler is actually throwing an error.