@ Nullable public String getStringValueForType ( SchemaService . RecordType type ) { switch ( type ) { case NAMESPACE : return getNamespace ( ) ; case SCOPE : return getScope ( ) ; case METRIC : return getMetric ( ) ; case TAGK : return getTagKey ( ) ; case TAGV : return getTagValue ( ) ; case RETENTION_DISCOVERY : return getRetentionDiscovery ( ) == null ? null : getRetentionDiscovery ( ) . toString ( ) ; default : return null ; } }
consolidate this method to where it belongs without fixing its legacy expectation that all members are of string type .