Project

General

Profile

npe-fix.patch

Galya B, 06/09/2023 09:44 AM

Download (1.28 KB)

View differences:

src/com/goldencode/p2j/util/LegacyLogManagerImpl.java 2023-06-09 13:40:43 +0000
469 469
   @Override
470 470
   public character getLogFileName()
471 471
   {
472
      return new character(logFile.getPath());
472
      return new character(logFile == null ? null : logFile.getPath());
473 473
   }
474 474
   
475 475
   /**
......
616 616
         recordOrShowWarning(14331, "CLEAR-LOG() invalid for WebSpeed or AppServer", false);
617 617
         return new logical(false);
618 618
      }
619
      if (client == null && logWriter == null)
619
      if (logFile == null || (client == null && logWriter == null))
620 620
      {
621
         recordOrThrowError( 14333, "Cannot clear log because there is no log file open", false);
621
         recordOrShowWarning( 14333, "Cannot clear log because there is no log file open", false);
622 622
         return new logical(false);
623 623
      }
624 624

  
......
628 628
         String noSequenceName = new SequencedFileNameMatcher(logFile).getNoSequenceName();
629 629
         originalLogFileName = new File(logFile.getParent(), noSequenceName).getPath();
630 630
      }
631
      else {
631
      else
632
      {
632 633
         originalLogFileName = logFile.getPath();
633 634
      }
634 635