I noticed that I was having a problem with a particular CR when I call the .getAddressedIn() method on it.
On closer inspection, it turned out to be due to the label that it was addressed in now being deleted.
I did a bit more digging, and noticed that the CR offers a member .getAddressedInView(), and I notice that this it a time-based view-configuration, so I've assumed it's from the time-period when that label hadn't been deleted.
I noticed that I was able to get a successful call to .getAddressedIn() if I refreshed the labels of this time-based view, eg:
View v = CR.getAddressedInView();
So that seems to work, but one gotchya is that it generates some network traffic each time .refreshLabels() is called:
Start: (rev 100) PROJ_CMD_LABEL_GET_INFO_EX Time: 726 millis; Sent: 70 bytes; Got: 6534 bytes
Start: (rev 100) PROJ_CMD_CATALOG_LOADSET Time: 87 millis; Sent: 314 bytes; Got: 4986 bytes
Is there any way to avoid this extra network traffic and still get the correct result returned in .getAddressedIn()?
I had a look at the netmonitor output of the CPC and noticed there was absolutely no network traffic when I click on the CRs tab, so it seems like the CPC had all the details cached beforehand (and it displays the deleted label in the 'Addressed In' field correctly).