1 Reply Latest reply on Nov 2, 2004 12:11 PM by Shigeru Chiba

    How do i turn off optimization options for the compiler ?

    Sankar Rajamani Newbie

      The following method needs to be created ... this is just a code snippet of the body ..

      [Method]
      public boolean parseForHeader(String s);[/Method]

      
      {
       java.lang.String msg = $1;
       com.emirates.ngcs.poc.messages.FFMMessage msgobj = new
       com.emirates.ngcs.poc.messages.FFMMessage();
      
       int ptr = 0;
      
       com.emirates.ngcs.poc.core.DataFormat[] format = null;
      
       try
       {
       format = new com.emirates.ngcs.poc.core.DataFormat[1];
       format[0] = new com.emirates.ngcs.poc.core.DataFormat("aaa",1,3,3,true,false,false);
       format = new com.emirates.ngcs.poc.core.DataFormat[1];
       format[0] = new com.emirates.ngcs.poc.core.DataFormat("n[...3]",2,0,3,false,false,false);
      
       }
       catch(com.emirates.ngcs.poc.core.FormatException fe)
       {
       return false;
       }
      
       return true;
      }
      
      


      But when I see the decompiled version of the class generated by javassist, the following is observed. I want to turn off the optimization options in the compiler. Is it possible ?

       public boolean parseForHeader(String s)
       throws ParseException
       {
       String s1 = s;
       FFMMessage ffmmessage = new FFMMessage();
       boolean flag = false;
       Object obj = null;
       try
       {
       DataFormat adataformat[] = new DataFormat[1];
       adataformat[0] = new DataFormat("aaa", 1, 3, 3, true, false, false);
       adataformat = new DataFormat[1];
       adataformat[0] = new DataFormat("n[...3]", 2, 0, 3, false, false, false);
       }
       catch(FormatException formatexception)
       {
       return false;
       }
       return true;
       }
      
       public FFMMessageProcessor009()
       {
       }