Changeset 1491 for trunk


Ignore:
Timestamp:
12/04/19 17:11:03 (4 years ago)
Author:
bnemhaus
Message:

Clean up of code at David's request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameIO.java

    r1487 r1491  
    11451145                        // if its a new frame or an existing Exp frame...
    11461146                        if (fullPath == null || fullPath.endsWith(ExpReader.EXTENTION)) {       
    1147                                
    1148                                 // *** Don't you need to take the *name* of the frame in to account????
    1149                                 // *** to rule out the credentials frame?
    1150                                 String framesetName = toSave.getFramesetName();
    1151                                 String enryptionLabel = toSave.getEncryptionLabel();
    1152                                
    1153                                 if (toSave.getNumber() != AuthenticatorBrowser.CREDENTIALS_FRAME &&
    1154                                                 toSave.getEncryptionLabel() != null) {
    1155                                         // *** wasted repeat of getEncryptionLabel()
    1156                                         // does the order of the above if statement matter?
    1157                                         writer = new EncryptedExpWriter(toSave.getEncryptionLabel());
    1158                                         // **** If this doesn't take an encryption label, then why bother
    1159                                         // making it explicitly the EcryptedExpReader, given that
    1160                                         // 'redirectTo()' below doesn't
    1161                                         savedVersion = EncryptedExpReader.getVersion(fullPath);
     1147                                                               
     1148                                if (toSave.isEncryptableFrame()) {
     1149                                        String encryptionLabel = toSave.getEncryptionLabel();
     1150                                        writer = new EncryptedExpWriter(encryptionLabel);
    11621151                                } else {
    11631152                                        writer = new ExpWriter();
    1164                                         savedVersion = ExpReader.getVersion(fullPath);
    11651153                                }
     1154                                savedVersion = ExpReader.getVersion(fullPath);
    11661155                               
    11671156                                // Is the file this would be saved to a redirect?
Note: See TracChangeset for help on using the changeset viewer.