Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-46

Compiler error (I have the compiler set to "sensitive") because of missing enum case in switch statement in PropertySetter.computeAggregationType()

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • None

    Description

      In PropertySetter.computeAggregationType(), the switch statement should be completed:

      if (addMethod != null) {
      AggregationType type = computeRawAggregationType(addMethod);
      switch (type)

      { case NOT_FOUND: return AggregationType.NOT_FOUND; case AS_BASIC_PROPERTY: return AggregationType.AS_BASIC_PROPERTY_COLLECTION; case AS_COMPLEX_PROPERTY: return AggregationType.AS_COMPLEX_PROPERTY_COLLECTION; }

      }

      to something like this (unsure whether logic correct, which is why switch statements should be completed, right?):

      if (addMethod != null) {
      AggregationType type = computeRawAggregationType(addMethod);
      switch (type)

      { case NOT_FOUND: return AggregationType.NOT_FOUND; case AS_BASIC_PROPERTY: return AggregationType.AS_BASIC_PROPERTY_COLLECTION; case AS_COMPLEX_PROPERTY: return AggregationType.AS_COMPLEX_PROPERTY_COLLECTION; case AS_BASIC_PROPERTY_COLLECTION: // FALL-THROUGH case AS_COMPLEX_PROPERTY_COLLECTION: throw new IllegalStateException(""Can't happen: " + type); break; }

      }

      Attachments

        Activity

          People

            logback-dev Logback dev list
            dtonhofer David Tonhofer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: