Hi and thanks for the follow up post.
I currently don't have the time to analyze if there is something wrong with our code or not. Checking whether the renaming succeeded or not should be possible (but I think this is already implemented...).
I'm not using Sharepoint and I don't really understand what the problem is if Sharepoint is used. You are linking to file name "file.pdf" which is synchronized using Sharepoint - then you try to rename it to "otherFilename.pdf" using JabRef.
Does the renaming fail at this point? Or does it work, but Sharepoint resets the filename some time later?
Regarding your second suggestion:
This is hard! Each file system has different requirements regarding allowed characters, maximum length, etc. However, as you proposed a formatter truncating a lengthy file name after X characters should be possible.