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

sun/security/jca/ProviderConfig.java improperly formatted

    XMLWordPrintable

Details

    • master
    • generic
    • generic

    Description

      http://hg.openjdk.java.net/jdk/jdk/file/1ae823617395/src/java.base/share/classes/sun/security/jca/ProviderConfig.java contains


      185 p = AccessController.doPrivileged(new PrivilegedAction<Provider>() {
      186 public Provider run() {
      187 try {
      188 Class<?> c = Class.forName("apple.security.AppleProvider");
      189 if (Provider.class.isAssignableFrom(c)) {
      190 @SuppressWarnings("deprecation")
      191 Object tmp = c.newInstance();
      192 return (Provider) tmp;
      193 } else {
      194 return null;
      195 }
      196 } catch (Exception ex) {
      197 if (debug != null) {
      198 debug.println("Error loading provider Apple");
      199 ex.printStackTrace();
      200 }
      201 return null;
      202 }
      203 }
      204 });

      in which the `catch` block is confusing because it is improperly formatted. The body of the `if`, and especially the closing `}` should be indented. and the `return null;` is part of the catch block, though it does not look like it.

      Not a problem for the Java compiler, but a problem for we humans.

      Attachments

        Activity

          People

            kdriver Kevin Driver
            pbk Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: