You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by duncangrant <gi...@git.apache.org> on 2014/12/01 12:28:20 UTC

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

GitHub user duncangrant opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/367

    Replaced deprecated constructor

    So as not to break usage of deprecated class

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/duncangrant/incubator-brooklyn fix/port-forward-manager-authority

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/367.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #367
    
----
commit 11c990f7dbbdd678e6cf3ab665888f51b76890ca
Author: Duncan Grant <du...@cloudsoftcorp.com>
Date:   2014-12-01T11:25:31Z

    Replaced deprecated constructor
    
    So as not to break usage of deprecated class

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/367#issuecomment-65056339
  
    Looks good; merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/367#discussion_r21083394
  
    --- Diff: core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java ---
    @@ -19,9 +19,23 @@
     package brooklyn.location.access;
     
     
    +import brooklyn.entity.Entity;
    +import brooklyn.entity.basic.EntityInternal;
    +
     /**
      * @deprecated since 0.7.0; use {@link PortForwardManagerImpl}
      */
     @Deprecated
     public class PortForwardManagerAuthority extends PortForwardManagerImpl {
    +    private final Entity owningEntity;
    +
    +    public PortForwardManagerAuthority(Entity owningEntity) {
    +        this.owningEntity = owningEntity;
    --- End diff --
    
    Please call `super(owningEntity)` instead, so that if super changes then the deprecated class will continue to work.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/367#discussion_r21083487
  
    --- Diff: core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java ---
    @@ -19,9 +19,23 @@
     package brooklyn.location.access;
     
     
    +import brooklyn.entity.Entity;
    +import brooklyn.entity.basic.EntityInternal;
    +
     /**
      * @deprecated since 0.7.0; use {@link PortForwardManagerImpl}
      */
     @Deprecated
     public class PortForwardManagerAuthority extends PortForwardManagerImpl {
    +    private final Entity owningEntity;
    +
    +    public PortForwardManagerAuthority(Entity owningEntity) {
    +        this.owningEntity = owningEntity;
    --- End diff --
    
    Oh, I take it back. That constructor doesn't exist in super. This is fine.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/367#discussion_r21083336
  
    --- Diff: core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java ---
    @@ -19,9 +19,23 @@
     package brooklyn.location.access;
     
     
    +import brooklyn.entity.Entity;
    +import brooklyn.entity.basic.EntityInternal;
    +
     /**
      * @deprecated since 0.7.0; use {@link PortForwardManagerImpl}
      */
     @Deprecated
     public class PortForwardManagerAuthority extends PortForwardManagerImpl {
    +    private final Entity owningEntity;
    +
    +    public PortForwardManagerAuthority(Entity owningEntity) {
    --- End diff --
    
    Looking at history, it also had a default constructor. Can you include that as well please?
    
    ```
    -    public PortForwardManagerAuthority() {
    -    }
    -    
    -    public PortForwardManagerAuthority(Entity owningEntity) {
    -        this.owningEntity = owningEntity;
    -    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/367


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Replaced deprecated constructor

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/367#discussion_r21083555
  
    --- Diff: core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java ---
    @@ -19,9 +19,23 @@
     package brooklyn.location.access;
     
     
    +import brooklyn.entity.Entity;
    +import brooklyn.entity.basic.EntityInternal;
    +
     /**
      * @deprecated since 0.7.0; use {@link PortForwardManagerImpl}
      */
     @Deprecated
     public class PortForwardManagerAuthority extends PortForwardManagerImpl {
    +    private final Entity owningEntity;
    +
    +    public PortForwardManagerAuthority(Entity owningEntity) {
    +        this.owningEntity = owningEntity;
    +    }
    +
    +    protected void onChanged() {
    +        if (owningEntity != null) {
    --- End diff --
    
    Can you add `} else { super.onChanged(); }`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---