Hi,

Recently there have been a couple of bug reports when running under jdk1.3 and lower when iText was compiled with jdk1.4. The exception looks like this:

java.lang.NoSuchMethodError
 at com.lowagie.text.pdf.PdfDate.<init>(Unknown Source)


I would hope that the problem could be solved at the source level by avoiding calls to the method:


StringBuffer.append(StringBuffer)

It would make life a little easier for those of us who compile iText our selfs.

It is a minor problem, but it is a bit annoying that I can't compile with jdk1.4 and run on jdk1.3.

regards,
finn
--- PdfDate.java        Thu Jul 11 13:50:18 2002
+++ PdfDate.java.new    Tue Mar 25 12:33:51 2003
@@ -121,13 +121,13 @@
  * @return             the resulting <CODE>String</CODE>
  */
     
-    private StringBuffer setLength(int i, int length) {
+    private String setLength(int i, int length) {
         StringBuffer tmp = new StringBuffer();
         tmp.append(i);
         while (tmp.length() < length) {
             tmp.insert(0, "0");
         }
         tmp.setLength(length);
-        return tmp;
+        return tmp.toString();
     }
-}
\ No newline at end of file
+}
--- PdfWriter.java      Mon Mar 24 12:58:14 2003
+++ PdfWriter.java.new  Tue Mar 25 12:33:57 2003
@@ -150,7 +150,7 @@
                 String s = "0000000000" + offset;
                 StringBuffer off = new StringBuffer(s.substring(s.length() - 10));
                 s = "00000" + generation;
-                StringBuffer gen = new StringBuffer(s.substring(s.length() - 5));
+                String gen = s.substring(s.length() - 5);
                 if (generation == 65535) {
                     os.write(getISOBytes(off.append(' ').append(gen).append(" f 
\n").toString()));
                 }
@@ -1666,4 +1666,4 @@
         this.extraCatalog = extraCatalog;
     }
     
-}
\ No newline at end of file
+}

Reply via email to