Message2131

Author otmarhumbel
Recipients
Date 2002-03-05.17:02:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=105844

OK, I admit this is a fragile patch. As Samuele said: it is 
an idea to be worked over.
After many tests the following code seems to be stable for 
me in Jython 21 (if I only use java imports of the form: 
from my.package import oneClass). Same place, same method:

  if ( names != null ) {
    if ( names.length == 1 && asnames == null ) {
      // this is a candidate for simple java class import
      String packageName = mod;
      String fullClassName = packageName + "." + names[0];
      try {
        Class.forName( fullClassName );
        PySystemState.add_package( packageName );
      } catch( Throwable t ) {}
    }
  }

Please apologize for the confusion!
Best wishes,
Oti.
History
Date User Action Args
2008-02-20 17:18:15adminlinkissue461151 messages
2008-02-20 17:18:15admincreate