When an ICopyFileArea could be null?
![]() Hi, I've a plain java extension which set some jazz user properties and then perform a check-in. Everything it is ok if I work with elements that belong to an eclipse project, but when I set properties on a project I've some problem. During the ICheckInOperation I get a NullPointerException because ICopyFileArea cfa = CopyFileAreaManager.instance.getCopyFileAreaForPath(sbox.getRoot()); seems to be null. I don't know how this object is used, but does anybody know what can cause this behaviour? Thanks, Michele.
|
2 answers
![]()
I found out that the problem is in version 4 SDK and is related to the implementation of IRepositoryResolver that seems buggy or not so right.
As I already have an ITeamRepository (obtained using the login functions) I ovverride the resolver method:
private IRepositoryResolver resolver = new IRepositoryResolver() {
So, if I use this resolver in the getCheckinOperation method it runs correctly.
Michele.
|
Comments
I still have this problem. The thing is that I don't use directly CFA, but when I try to use ICheckInOperation it gives me a NPE because the CFA is null. I've find out that I could resolve this problem deleting and reloading the workspace using scmtools before to run another check-in. So it seems that after running an ICheckInOperation the workspace becomes instable. Is there any way to refresh some metadata in order to use it again without reload it?
Have you tried the approach mentioned in the first question? (ie use ISharingManager.getSandbox() to ensure the sandbox has been registered)