"Dalibor" == Dalibor Topic <address@hidden> writes:
Dalibor> the attached patch cleans up the inner classes a bit, turning them
Dalibor> into real, private, static final inner classes where possible. That
Dalibor> causes less weird classes to hang around in our 'exported' APIs, and
Dalibor> makes creating profiles for Classpath's libraries simpler.
Sorry I didn't speak up on this sooner. I agree this is generally a
good thing to do. There is just one nit to watch out for...
Dalibor> -class IntPair implements Serializable {
Dalibor> - public int first, second;
Dalibor> -}
[ ... ]
Dalibor> + private static final class IntPair implements Serializable {
Dalibor> + public int first, second;
Dalibor> + }
The default constructor for a class will have the same permissions as
the class itself, in this case 'private IntPair()'. But this means
that any attempt to instantiate -- 'new IntPair()' -- will then cause
an accessor constructor with default access to be created.
So, it is slightly better to either make the class package-private, or
to add an explicit no-argument package-private constructor.