Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12895

SSLFactory#createSSLSocketFactory exception message is wrong

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None

      Description

      If in SERVER model, the following code should throw exception indicating Factory is in SERVER mode, not in CLIENT mode. Otherwise, it could be confusing.

      SSLSocketFactory.java
      public SSLSocketFactory createSSLSocketFactory()
          throws GeneralSecurityException, IOException {
          if (mode != Mode.CLIENT) {
            throw new IllegalStateException("Factory is in CLIENT mode");
          }
          return context.getSocketFactory();
        }
      

        Attachments

        1. HADOOP-12895.001.patch
          0.8 kB
          Wei-Chiu Chuang
        2. HADOOP-12895.002.patch
          1 kB
          Wei-Chiu Chuang
        3. HADOOP-12895.003.patch
          2 kB
          Wei-Chiu Chuang

          Activity

            People

            • Assignee:
              jojochuang Wei-Chiu Chuang
              Reporter:
              jojochuang Wei-Chiu Chuang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: