Re: [Clirr-devel] Handling private/package-scope changes
Status: Alpha
Brought to you by:
lkuehne
From: <lak...@t-...> - 2004-07-05 18:05:50
|
Simon Kitching wrote: >Hi Lars, > >In the original clirr design, all package and private classes, members & >fields were ignored, because they were irrelevant to the goal of >detecting "binary incompatibilities". > >I added the *option* to include private and package things in clirr's >processing in order to be able to generate complete change reports. >However this currently has the effect of reporting binary >compatibilities for things like changing the type of a private field or >package-scope method return type when reporting on private items is >enabled. > >I would like to keep the ability to generate complete change reports, >but restore the original behaviour of reporting ERROR and WARNING stuff >only for public/protected things, ie stuff that is intended to be >visible to "users" of the package. > >What I have done is added the following methods to AbstractDiffReporter: > public Severity getSeverity(JavaClass clazz, Severity s); > public Severity getSeverity(JavaClass clazz, Method m, Severity s); > public Severity getSeverity(JavaClass clazz, Field f, Severity s); > >These methods are called from just about anywhere an ApiDifference is >reported from, and they "reduce" the severity from ERROR/WARN to info if >the specified class, method, or field is package or private scope. > >Is this change ok by you? > > > yes >Regards, > >Simon > > > |