You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by andresteingress <gi...@git.apache.org> on 2016/05/05 09:35:43 UTC

[GitHub] groovy pull request: GROOVY-7793: Compiler compiles class with pri...

GitHub user andresteingress opened a pull request:

    https://github.com/apache/groovy/pull/328

    GROOVY-7793: Compiler compiles class with private abstract method

    This PR adds some logic to the class completion verifier that adds an error to the error collector when private abstract methods are detected in abstract classes or enums (for interfaces such a check is already available).

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

    $ git pull https://github.com/andresteingress/groovy GROOVY-7793

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

    https://github.com/apache/groovy/pull/328.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 #328
    
----
commit 81945cb177a588bb6d7ff0a5868691ed92d89260
Author: Andre Steingress <me...@andresteingress.com>
Date:   2016-05-04T21:17:03Z

    GROOVY-7793: Compiler compiles class with private abstract method

----


---
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] groovy pull request: GROOVY-7793: Compiler compiles class with pri...

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

    https://github.com/apache/groovy/pull/328


---
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] groovy pull request: GROOVY-7793: Compiler compiles class with pri...

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

    https://github.com/apache/groovy/pull/328#discussion_r62416234
  
    --- Diff: src/test/org/codehaus/groovy/classgen/ClassCompletionVerifierTest.java ---
    @@ -73,13 +73,22 @@
                 "Method 'prom' is protected but should be public in interface 'zzz'.";
         private static final String EXPECTED_PRIVATE_METHOD_ERROR_MESSAGE =
                 "Method 'prim' is private but should be public in interface 'zzz'.";
    +    private static final String EXPECTED_ABSTRACT_PRIVATE_METHOD_ERROR_MESSAGE =
    +            "Method 'y' from class 'X' must not be private as it is declared as abstract method.";
    --- End diff --
    
    Should this be "... as an abstract method"?


---
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] groovy pull request: GROOVY-7793: Compiler compiles class with pri...

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

    https://github.com/apache/groovy/pull/328#discussion_r62419225
  
    --- Diff: src/test/org/codehaus/groovy/classgen/ClassCompletionVerifierTest.java ---
    @@ -73,13 +73,22 @@
                 "Method 'prom' is protected but should be public in interface 'zzz'.";
         private static final String EXPECTED_PRIVATE_METHOD_ERROR_MESSAGE =
                 "Method 'prim' is private but should be public in interface 'zzz'.";
    +    private static final String EXPECTED_ABSTRACT_PRIVATE_METHOD_ERROR_MESSAGE =
    +            "Method 'y' from class 'X' must not be private as it is declared as abstract method.";
    --- End diff --
    
    Yes, "as an" sounds more correct, I will fix it.


---
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.
---