Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6557881

Incorrect code fixed incorrectly in compiler bug fix 6379327

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: deploy
    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      When compiler bug 6379327 was fixed, the method openInputStream in
      deploy/src/common/share/classes/com/sun/deploy/security/CredentialManager.java
      broke.

      The compiler team made the program compile again, but I belive the intend of
      the original code was different. These lines where removed:

                   } catch (EOFException e) {
                       // This implies we just created the file and it is empty

      A more correct fix would be to catch the PrivilegedActionException from
      doPrivileged:

          } catch (PrivilegedActionException e) {
              if (e.getCause() instanceof EOFException) {
                  // This implies we just created the file and it is empty
              } else {
                  // log the error
                  Trace.securityPrintException(e);
              }
          }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgu Dennis Gu (Inactive)
                Reporter:
                ahe Peter Ahe
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: