On Thursday November 15 2007 8:17:55 pm Pete wrote:
> On Thursday November 15 2007 7:49:52 pm Andi Vajda wrote:
> > Yes, that's the intent.
>
> Plain ints were accepted here by PyLucene-gcj.

This just bit me again.  This code, which worked in PyLucene-gcj, throws an 
exception in lucene-jcc:

DateTools.timeToString(int(value.strftime('%s')),
                                       DateTools.Resolution.SECOND)

timeToString is expecting a long (kindly ignore the off by 1000x bug).

This at least needs to be in the README.

> >    - it makes it ambiguous: if there were two java methods called
> >      longToString(), one taking a long and one taking an int, making the
> > long one accept int would cause the wrong method to be called if long is
> > checked before int.

What about when there's no such overloading? ie, when there's a single method 
taking a long, can JCC cast the ints to longs in that case?

Again, I'll deal if necessary, but I suspect this going to bite others as 
well.  Debugging would be easier if lucene.InvalidArgsError contained more 
info about which arg was invalid...

-- 
Peter Fein   ||   773-575-0694   ||   [EMAIL PROTECTED]
http://www.pobox.com/~pfein/   ||   PGP: 0xCCF6AE6B
irc: [EMAIL PROTECTED]   ||   jabber: [EMAIL PROTECTED]
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to