Fixed. Rui Hu wrote: > Thanks Richard. > I've looked at luni module and raised HARMONY-1618 about some bugs of those > kind. > > > > On 9/28/06, Richard Liang <[EMAIL PROTECTED]> wrote: >> >> Great job, Robert. ;-) >> >> I will have a look at sql. >> >> On 9/28/06, Rui Hu <[EMAIL PROTECTED]> wrote: >> > Great Mark! >> > I've merged your code into my script. The script can be downloaded at >> [1]. >> > >> > Usage: >> > perl failFinder.pl root_of_module >> > >> > e.g. Search out all related lines in luni module and redirect it to >> > result.txt >> > >> > perl failFinder.pl trunk/modules/luni > result.txt >> > >> > e.g. Search out all related lines in all modules and redirect it to >> > result.txt >> > >> > perl failFinder.pl trunk/modules/ > result.txt >> > >> > Anyone can find out the related lines of any modules. >> > >> > [1]: >> > >> http://wiki.apache.org/harmony-data/attachments/failstatementsomitted/attachments/failFinder.pl >> >> > >> > >> > >> > On 9/27/06, Mark Hindess <[EMAIL PROTECTED]> wrote: >> > > >> > > >> > > This perl script does a marginally better job by being slightly >> stricter >> > > on matching context around 'catch'/'fail', by handling comments >> slightly >> > > better and by handling 'catch (...) { }' appearing on a single line. >> > > >> > > It also finds a few more hits such as: >> > > >> > > sql/src/test/java/org/apache/harmony/sql/tests/java/sql/TimeTest.java >> +208 >> > > >> > > which is a false positive but which uses "assertTrue(false);" which >> > > should be fixed anyway. >> > > >> > > -Mark. >> > > >> > > #!/usr/bin/perl -w >> > > use strict; >> > > >> > > my $previous_line = ""; >> > > my $possible_line_number; >> > > while (<>) { >> > > next if (/^\s*$/); # skip blank lines >> > > if ($possible_line_number) { >> > > if (m!^\s*(//|/\*|})!) { >> > > print $ARGV, ' +', $possible_line_number, "\n"; >> > > } >> > > undef $possible_line_number; >> > > } >> > > if (!m!^\s*(/?\*|//)! && /\bcatch\s*\(/ && $previous_line !~ >> > > /\bfail\s*\(/) { >> > > $possible_line_number = $.; >> > > if (/catch\s*\([^\)]+\)\s*{\s*}/) { >> > > print $ARGV, ' +', $possible_line_number, "\n"; >> > > undef $possible_line_number; >> > > } >> > > } >> > > $previous_line = $_; >> > > } >> > > > > > >
-- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK. --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
