sdedic commented on code in PR #7870:
URL: https://github.com/apache/netbeans/pull/7870#discussion_r1798969976


##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/CreateContainerRepositoryCommand.java:
##########
@@ -34,19 +35,19 @@ public class CreateContainerRepositoryCommand extends 
CreateResourceCommand<Cont
     
     @Override
     ContainerRepositoryItem callCreate(OCIItemCreationDetails itemCreator) {
-        ArtifactsClient client = 
this.getProfile().newClient(ArtifactsClient.class);
+        ArtifactsClient client = 
OCIManager.getDefault().getActiveProfile(itemCreator.getCompartment()).newClient(ArtifactsClient.class);
         
         CreateContainerRepositoryRequest request = 
(CreateContainerRepositoryRequest) itemCreator.getRequest();
         CreateContainerRepositoryResponse response = 
client.createContainerRepository(request);
         ContainerRepository res = response.getContainerRepository();
 
-        String tenancyId = this.getProfile().getTenancy().isPresent() ? 
this.getProfile().getTenancy().get().getKey().getValue() : null;
+        String tenancyId = itemCreator.getCompartment().getRegionCode();

Review Comment:
   Seems as a miscompleted change ? If the `regionCode` is the correct value, 
pls. rename the local variable, so it is obvious that it is not an OCID.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to