[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628818#comment-16628818
 ] 

ASF GitHub Bot commented on SCB-926:
------------------------------------

yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 
3rd party service
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r220576778
 
 

 ##########
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/MicroserviceVersionMeta.java
 ##########
 @@ -20,10 +20,15 @@
 import org.apache.servicecomb.core.CseContext;
 import 
org.apache.servicecomb.core.definition.classloader.MicroserviceClassLoaderFactory;
 import org.apache.servicecomb.serviceregistry.api.Const;
+import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
 import org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersion;
 
 public class MicroserviceVersionMeta extends MicroserviceVersion {
-  private MicroserviceMeta microserviceMeta;
+  MicroserviceMeta microserviceMeta;
+
+  MicroserviceVersionMeta(Microservice microservice) {
 
 Review comment:
   `microserviceMeta` in `MicroserviceVersionMeta` is initialized in 
constructors and has package access modifier which ensures that the classes out 
of its package can only get access to it by getter method. So I think NPE can 
be avoid since users can only get `microserviceMeta` after it is initialized.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Invoke 3rd party service
> ------------------------
>
>                 Key: SCB-926
>                 URL: https://issues.apache.org/jira/browse/SCB-926
>             Project: Apache ServiceComb
>          Issue Type: New Feature
>    Affects Versions: java-chassis-1.1.0
>            Reporter: YaoHaishi
>            Assignee: YaoHaishi
>            Priority: Major
>
> Provide a interface to let users specify 3rd party services' endpoints and 
> let users can invoke 3rd party service like invoking the ServiceComb 
> microservice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to