Book a Demo

Author Topic: Reverse Engineering Java Sources Problem  (Read 3177 times)

andrey

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Reverse Engineering Java Sources Problem
« on: October 05, 2004, 08:02:46 am »
Hello,
I have been using this tool for sometime now with C# and recently starting using it with Java.  I am getting errors when trying to import certain Java source files.  The interesting thing is, it works once, and they does not work anymore.  The error is not very helpful.  Is there an error log that can tell me what happened and why import failed?  I am attaching a file that fails import

Thanks

Andrey


public class TXLifeType
{
   private static final int REQUEST_ID = 1;
   private static final int RESPONSE_ID = 2;

   public static final TXLifeType REQUEST =
        new TXLifeType( REQUEST_ID );
   public static final TXLifeType RESPONSE =
        new TXLifeType( RESPONSE_ID );
   
   private int _type;
   
   private TXLifeType(int type)
   {
       this._type = type;
   }
   
   public boolean equals( Object o )
   {
       if ( o == null )
           return false;
       if ( ! ( o instanceof TXLifeType ) )
           return false;
       
       TXLifeType otherType = ( TXLifeType )o;
       return otherType._type == this._type;
   }
   
   
   public String toString()
   {
       return ( this._type == 1 ? "TXLifeRequest" : "TXLifeResponse" );
   }
   
}
« Last Edit: October 05, 2004, 08:03:58 am by andrey »

andrey

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering Java Sources Problem
« Reply #1 on: October 05, 2004, 08:46:12 am »
After I commented out toString() method, the import worked ok.  Then, I uncommented toString() and it synched ok again.  ALSO, it imported other classes I could not import before too without any problems.  Sounds like a bug in EA

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering Java Sources Problem
« Reply #2 on: October 05, 2004, 08:39:49 pm »


Andry,

What version of EA are you using?

Using EA 4.1 build 738 and code copied from your post, I was unable to duplicate your problem.

I then made changes to the source, added an attribute and associated setter/getter methods and
performed a synchronize with no problems.

Jim