compile errors in Jigsaw2.0.4 src code

Hi,

I imported the whole Jigsaw2.0.4 src tree into Visual Age for Java2.

It popped up 274 Problems. 245 are warnings about deprecated classes or
methods. 29 are serious errors. All these 29 errors are in
org.w3c.jigadmin.*

These 29 errors belong to 2 types:

1, Field Initialization. The construct invoked to create inner class X
with arguments () is not defined.
2, Field Initialization. Cannot refer inside an inner class to a
non-final variable Y defined in a different method.

example:
-----------------------------------------------------------
public class AddResourcePanel extends JPanel {

 protected boolean ok;

 protected EditableStringChoice classSC;

 protected JTextField identifierTF;

 protected ResourceTreeBrowser browser = null;

 /**
  * Our internal ActionListener
  */
 ActionListener al = new ActionListener() {
 public void actionPerformed(ActionEvent ae) {
     if( ae.getActionCommand().equals("Ok") ||
  ae.getSource().equals(identifierTF)) {
      if(! classSC.getText().equals("")) {
   if (! identifierTF.getText().equals("")) {
       browser.setResourceToAdd(classSC.getText(),
           identifierTF.getText());
       browser.disposeAddResourcePopup();
       done();
   } else {
       identifierTF.requestFocus();
   }
      } else {
   classSC.requestFocus();
      }
  } else if ( ae.getActionCommand().equals("Cancel")) {
      browser.setResourceToAdd(null, null);
      browser.disposeAddResourcePopup();
      done();
  } else if(ae.getSource().equals(classSC)) {
      identifierTF.requestFocus();
  }
 }
 };

}
------------------------------------------------------------

In this example, X is ActionListener. Y is browser.

ActionListener is just an interface, not a class. I guess we can only
use an adapter as an internal class.

Also, I doubt if we need add 'final' in browser declaration.

Has anybody tried to compile the code successfully without these errors
by using any other compilers?

Thanks.

Yu

Received on Friday, 9 June 2000 02:19:37 UTC