Declare two public methods of a final class static

These methods access only static members.  They are methods of a final
class, which means no subclass can ever override these methods and use
dynamic dispatch to choose the implementation at run time.  So
declaring these methods static is (statically) safe.
This commit is contained in:
Ben Liblit 2017-05-11 18:11:50 +02:00 committed by Manu Sridharan
parent aa39fc63d5
commit 237b49a425
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ public final /* singleton */ class AndroidEntryPointManager implements Serializa
/**
* Determines if any EntryPoint extends the specified component.
*/
public boolean EPContainAny(AndroidComponent compo) {
public static boolean EPContainAny(AndroidComponent compo) {
for (AndroidEntryPoint ep: ENTRIES) {
if (ep.belongsTo(compo)) {
return true;
@ -110,7 +110,7 @@ public final /* singleton */ class AndroidEntryPointManager implements Serializa
MANAGER = new AndroidEntryPointManager();
}
public Set<TypeReference> getComponents() {
public static Set<TypeReference> getComponents() {
if (ENTRIES.isEmpty()) {
throw new IllegalStateException("No entrypoints loaded yet.");
}