From: Jeff E. <JEm...@lg...> - 2003-03-25 13:49:14
|
Finn, Thanks for pointing out the pre-1.4 incompatibility. I'll work up a dynamic version later today. Jeff -----Original Message----- From: Finn Bock To: Jeff Emanuel Cc: 'Mike GARCIA'; 'jyt...@li...' Sent: 3/25/03 3:43 AM Subject: Re: [Jython-dev] Question about Strings and java.util.regex [Jeff Emanuel] > PyString.java has this line (line 658 in the Jython 2.1 source) > in the method __tojava__: > > if (c == String.class || c == Object.class || c == Serializable.class) > > If you change it to this, it should work for you: > > if (c == String.class || c == CharSequence.class || > c == Object.class || c == Serializable.class) > > I would suggest submitting a patch to the jython sourceforge site > www.sf.net/projects/jython. This is also the change that I would expect to work (I haven't tested it) but your change would tie jython to jdk1.4. That is clearly not acceptable. So a patch would have to be more dynamic in nature, perhaps by loading the CharSequence class within a try .. catch clause and only attempt to load the class when the jdk version number is above 1.4. A patch that gets all this right so that it also works with jdk1.1 applets will indeed be welcome. regards, finn |