Unfortunately, incompatibilities between Java and J# sometimes causes a
problem. So I decided to use GNU Classpath.
For instance, Microsoft's implementation of java.util.ArrayList#add(object
o) is like the following.

public boolean add(object o)
{
        return this.add(this.size(), o);
}

In most case, it's OK. But, if ArrayList are extended by some class and the
class overrides add(object) and add(int, object) method,
ArrayList#add(object) calls add(int, object) method of extended class (see
below). In iText, Phrase class is so. 

class ExtendedArrayList extends ArrayList
{
        public boolean add(object o)
        {
                return super.add(o); // this statements indirectly calls
this.add(int, object) via ArrayList#add(object) in J#
        }

        public void add(int i, object o)
        {
                // do something
        }
}

Although I have to say this incompatibility is NOT a bug because Microsoft
implementation satisfies Java 2 API Specification. In some aspects, this
problem is due to iText depends on Sun's implementation. 

I found the other bugs and incompatibilities, but it could be avoided using
this approach.

Ujihara, Kazuya (iText.NET porter)
mailto:[EMAIL PROTECTED]
http://www.ujihara.jp/

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Thielen
Sent: Saturday, September 17, 2005 5:08 AM
To: 'Paulo Soares'; 'itext'
Subject: RE: [iText-questions] iText.net - why not java.util.Iterator?

Ahh...

I'm in VS 2005/.net 2.0 and it has all of the collection classes. I forgot
they weren't in .net 1.1.

If I remove the classes that are now in .net 2.0, do you guys have an
interest in then keeping/maintaining a distinct .net 2.0 version? It would
only affect the Gnu.Classpath.*.dll files, not iText itself.

??? - thanks - dave



-----Original Message-----
From: Paulo Soares [mailto:[EMAIL PROTECTED]
Sent: Friday, September 16, 2005 10:38 AM
To: David Thielen; itext
Subject: RE: [iText-questions] iText.net - why not java.util.Iterator?

J# stopped at 1.1.4 and Iterator appeared in jdk 2. There's no native
Iterator in J#. 

> -----Original Message-----
> From: David Thielen [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 16, 2005 5:30 PM
> To: Paulo Soares; 'itext'
> Subject: RE: [iText-questions] iText.net - why not java.util.Iterator?
> 
> I understand that. Why not just delete Iterator from the gnu lib so it 
> uses the native java one?
> 
> ??? - thanks - dave
> 
> 
> -----Original Message-----
> From: Paulo Soares [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 16, 2005 4:13 AM
> To: David Thielen; itext
> Subject: RE: [iText-questions] iText.net - why not java.util.Iterator?
> 
> Packages that start with "java" throw a "Prohibited package name"
> exception. 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > David Thielen
> > Sent: Friday, September 16, 2005 2:18 AM
> > To: itext
> > Subject: [iText-questions] iText.net - why not java.util.Iterator?
> > 
> > Hi;
> > 
> >  
> > 
> > First off the iText.net code is a thing of beauty. Anyone who is 
> > going to port java code to J# should look at it - just for the Junit 
> > port if nothing else.
> > 
> >  
> > 
> > I have one question though. It defines jp.ujihara.java.util.Iterator 
> > and uses that instead of java.util.Iterator. Any idea why?
> > 
> >  
> > 
> > This is a problem for having single source code because the returned 
> > object, while it has the same methods, has to be declared as a 
> > different class.
> > 
> >  
> > 
> > ??? - thanks - dave
> > 
> >  
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server. 
> > Download it for free - -and be entered to win a 42" plasma tv or 
> > your very own Sony(tm)PSP.  Click here to play:
> > http://sourceforge.net/geronimo.php
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> 
> 
> 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to