harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko" <alexey.a.petre...@gmail.com>
Subject Re: [classlib] Getting more real JAPI results
Date Thu, 23 Nov 2006 09:08:30 GMT
Let's do that!

SY, Alexey

2006/11/23, Stefano Mazzocchi <stefano@apache.org>:
> There is a simple way to make japi happy and show those nice 100% green
> bars: write a stub method and throw a runtime exception when invoked.
> Unfortunately, it's not going to fool the TCK or, worse, it's not going
> to please our users when they get RuntimeException telling them that
> their app won't run because the method is not implemented.
> I've written a script that uses brute force across the entire classlib
> to figure out if a method was not implemented, the result can be found at:
> as of today, there are 615 methods (mostly in swing, awt, imageio and
> sound) that are not implemented, in 64 different classes.
> There is a wide range of ways that we use to throw the fact that the
> method is not implemented, namely:
> throw new Error("ComponentUI.createUI not implemented");
> throw new Error("getHelpMenu() hasn't been implemented yet");
> throw new Error("not yet implemented");
> throw new Error("Not yet implemented");
> throw new Error("setHelpMenu() hasn't been implemented yet");
> throw new IllegalArgumentException("method is not implemented");
> throw new LoginException();//FIXME not yet implemented
> throw new RuntimeException();//FIXME not implemented yet
> throw new RuntimeException("Is not implemented yet"); //FIXME
> throw new RuntimeException("KerberosErrorMessage encoder is not
> implemented");
> throw new RuntimeException("Method is not implemented");
> throw new RuntimeException("Not implemented");
> throw new SocketException("Unbound server socket: not implemented");
> throw new SocketException("Unbound socket: not implemented");
> throw new UnsupportedOperationException("not implemented");
> throw new UnsupportedOperationException("Not implemented");
> throw new UnsupportedOperationException("Not implemented tag: " + tag);
> throw new UnsupportedOperationException("not implemented yet");
> throw new UnsupportedOperationException("Not implemented yet");
> throw new UnsupportedOperationException("Not yet implemented");
> JAPI is designed to support looking into methods that throw an exception
> that ends with .NotImplementedException. Such an exception actually
> exists in our classlib
> modules/luni/src/main/java/org/apache/harmony/luni/util/NotImplementedException.java
> but the only class that uses it, it's a test that tests the exception
> itself. Not that useful.
> It doesn't help us if we cheat on JAPI results, sooner or later we'll
> have to work on those methods anyway, so it's better to keep them
> visible in our API coverage reports so that it's easier for volunteers
> to know where to donate their work.
> I propose that we change all those exception into
> o.a.h.luni.util.NotImplementeException so that JAPI can pick them up and
> show us real results and we do it sooner rather than later.
> Thoughts?
> --
> Stefano.

View raw message