Skip to content

Commit

Permalink
Don't recurse into any private classes. Avoid undef on unprocessed cl…
Browse files Browse the repository at this point in the history
…asses.
  • Loading branch information
timbunce committed Jul 24, 2010
1 parent 66ac20a commit 850223e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/java2perl6api
Expand Up @@ -105,7 +105,7 @@ for my $class (sort keys %java_class_info) {

for my $info (
# compile deepest first as a slight optimization
sort { $b->{depth} <=> $a->{depth} } values %java_class_info
sort { ($b->{depth}||0) <=> ($a->{depth}||0) } values %java_class_info
) {
next unless $opt_compile;
my $class = $info->{java_class_name};
Expand Down Expand Up @@ -173,6 +173,11 @@ sub load_java_class_info {

if ($recurse) {
for my $ref_class (sort @$referenced_classes) {
if ($ref_class =~ m/\$/) {
warn "$ref_class: skipped private class\n"
if $opt_trace >= 2;
next;
}
load_java_class_info( $ref_class, $recurse+1 );
}
}
Expand Down

0 comments on commit 850223e

Please sign in to comment.