Ignore:
Timestamp:
12/05/19 17:23:45 (4 years ago)
Author:
bnemhaus
Message:

Refactored variable name for clarity.

Comments explaining why an exception is being suppressed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/io/ExpReader.java

    r1496 r1498  
    2020
    2121import java.io.BufferedReader;
     22import java.io.FileNotFoundException;
    2223import java.io.FileReader;
    2324import java.io.IOException;
     
    409410
    410411        public static int getVersion(String fullpath) {
     412                if (fullpath == null) return -1;
    411413                try {
    412414                        BufferedReader reader = new BufferedReader(new FileReader(fullpath));
     
    425427                        reader.close();
    426428                } catch (Exception e) {
    427                         e.printStackTrace();
     429                        //e.printStackTrace();
     430                        // When this exception goes off, it is because it is trying to check if a frame that has yet to be saved
     431                        // to the filesystem has a version number greater than in memory one.  This only happens for new frames,
     432                        // so is not a problem.
    428433                }
    429434                return -1;
     
    431436       
    432437        public static String redirectTo(String fullPath) {
     438                if (fullPath == null) return null;
    433439                try {
    434440                        BufferedReader reader = new BufferedReader(new FileReader(fullPath));
     
    442448                        }
    443449                        reader.close();
    444                 } catch (Exception e) {
    445                         e.printStackTrace();
     450                } catch (IOException e) {
     451                        //e.printStackTrace();
     452                        // When this exception goes off, it is because it is trying to check if a frame that has yet to be saved
     453                        // to the filesystem has a redirect.  This comes out in teh wash later on when a redirect is next checked.
    446454                }
    447455                return null;
Note: See TracChangeset for help on using the changeset viewer.