Eduard Ostertag created MANIMALSNIFFER-25:
---------------------------------------------

             Summary: Detecting Access Modifier and scopes 
                 Key: MANIMALSNIFFER-25
                 URL: https://jira.codehaus.org/browse/MANIMALSNIFFER-25
             Project: Mojo Animal Sniffer
          Issue Type: Bug
          Components: ANT Tasks, Maven Plugin
    Affects Versions: 1.8
            Reporter: Eduard Ostertag
            Assignee: Stephen Connolly


Animal Sniffer creates a signature File with all methods and fields of a class, 
but without Access modifiers and scopes, like private, protected public, 
package, static .... 

My question, why is this so?



It is  better to have the modifiers and scopes in a Signatur file, with this 
modifiers we can detect API changes.

example:
If i create a Signature of a TestClass and check this signature against 
MainClass with animalSniffer

public class TestClass{
 public static String test = "test";
}

public class MainClass
{
public static void main(String s[])
    {
    String testCheck = TestClass.test; //Is ok 
}
}
and then i change public to private and create a new signature of the TestClass
and check this new TestClass with animalSniffer against MainClass without to 
compile MainClass only TestClass was compiled 

public class TestClass{
 private String test = "test"
}

public class MainClass
{
public static void main(String s[])
    {
    String testCheck = TestClass.test; //is not OK, because now it´s private.
}
}

Animal sniffer can't detect this changes.
This problem  you can have, if you create an assembly build, without to compile 
all modules.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to