On Tue, May 6, 2014 at 1:48 AM, Roman Mazur <[email protected]> wrote:

> Currently 'ValidFragment' check produces an error if default fragment
> constructor in implicit.
> To be honest, I'm not satisfied with such a behaviour because it makes me
> add an empty constructor explicitly to a bunch of classes...
>

That's a bug. I discovered it myself yesterday and fixed it:
https://android-review.googlesource.com/#/c/93424/

The reason this happened is that I've recently rewritten a bunch of lint
checks which *used* to analyze the bytecode to instead analyze the parse
tree of the source files itself. That has a number of advantages - more
accurate source positions, works inside Studio/IntelliJ without compiled
sources, etc.

But in this case it had an unexpected regression: When you have a class
which doesn't specify a constructor, the compiler will automatically insert
one, so it's always there -- and the lint check didn't have to worry about
that scenario. When I rewrote it to an AST check I didn't think about that,
and there was no unit test covering that scenario.

The above fix has already been cherrypicked for the next 0.10.x release of
the Android Gradle plugin.

-- Tor


>
>  --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to