Messaging: Language cleanup

No unnecessary boxing, enhanced for loops, redundant checks and throws,
imports (removal, reordering), possible void returns

Change-Id: I7a8e1b2007e3b0906e01b41785c518d02c2f3fab
This commit is contained in:
Michael W
2024-12-26 15:54:37 +01:00
parent e335f6bec8
commit e128bff457
77 changed files with 202 additions and 334 deletions
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,20 +33,15 @@ class SystemProperties {
sSystemPropertiesGetMethod =
systemPropertiesClass.getMethod("get", String.class);
}
} catch (final ClassNotFoundException e) {
// Nothing to do
} catch (final NoSuchMethodException e) {
} catch (final ClassNotFoundException | NoSuchMethodException e) {
// Nothing to do
}
}
if (sSystemPropertiesGetMethod != null) {
try {
return (String) sSystemPropertiesGetMethod.invoke(null, name);
} catch (final IllegalArgumentException e) {
// Nothing to do
} catch (final IllegalAccessException e) {
// Nothing to do
} catch (final InvocationTargetException e) {
} catch (final IllegalArgumentException | InvocationTargetException |
IllegalAccessException e) {
// Nothing to do
}
}