Organize imports and clean up exceptions: remove unused imports across multiple modules, replace exception variable usage with wildcard, and improve code readability.

This commit is contained in:
2026-04-13 22:03:41 +02:00
parent fb1c1ee4ce
commit 8d0d8898cb
3 changed files with 3 additions and 7 deletions
@@ -14,7 +14,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.sun.tools.javac.code.Type
import java.time.LocalDate
private val PrimaryBlue = Color(0xFF1E3A8A)
@@ -109,7 +108,7 @@ fun StammdatenTabContent(
znsField.isAccessible = true
znsDataLoaded = znsField.get(turnier) as Boolean
}
} catch (e: Exception) {
} catch (_: Exception) {
// Reflection fehlgeschlagen oder Store nicht erreichbar -> Fallback auf leere Felder
}
}
@@ -428,7 +427,7 @@ fun StammdatenTabContent(
val tB = if (bis.isBlank()) tV else LocalDate.parse(bis)
!tV.isBefore(evV) && !tB.isAfter(evB) && !tB.isBefore(tV)
}
} catch (e: Exception) { false }
} catch (_: Exception) { false }
}
AssistChip(onClick = {}, label = { Text("Datum gültig") }, leadingIcon = {
Icon(if (dateOk) Icons.Default.Check else Icons.Default.Close, null, tint = if (dateOk) Color(0xFF2E7D32) else MaterialTheme.colorScheme.error)
@@ -447,7 +446,7 @@ fun StammdatenTabContent(
val tB = if (bis.isBlank()) tV else LocalDate.parse(bis)
!tV.isBefore(evV) && !tB.isAfter(evB) && !tB.isBefore(tV)
}
} catch (e: Exception) { false }
} catch (_: Exception) { false }
base && dateValid
},
colors = ButtonDefaults.buttonColors(containerColor = PrimaryBlue),