[logback-dev] [JIRA] Created: (LBCORE-229) Compiler error (I have the compiler set to "sensitive") because of missing enum case in switch statement in PropertySetter.computeAggregationType()
David Tonhofer (JIRA)
noreply-jira at qos.ch
Wed Oct 26 11:37:12 CEST 2011
Compiler error (I have the compiler set to "sensitive") because of missing enum case in switch statement in PropertySetter.computeAggregationType()
---------------------------------------------------------------------------------------------------------------------------------------------------
Key: LBCORE-229
URL: http://jira.qos.ch/browse/LBCORE-229
Project: logback-core
Issue Type: Bug
Affects Versions: 0.9.30
Reporter: David Tonhofer
Assignee: Logback dev list
Priority: Minor
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;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the logback-dev
mailing list