-
Notifications
You must be signed in to change notification settings - Fork 6k
Don't call static method from instance variable #7841
Conversation
|
The purpose of that invocation was to keep access to all native methods consistent rather than have arbitrary distinctions. Unless there is a technical (non-stylistic) reason for this change, I would prefer that it be changed back. |
|
It was caught by a linter when rolling into Google. The general logic is that it's an error-prone pattern. Consider the following code: public class Main {
static class TheClass {
public static int theMethod() {
return 1;
}
}
static class TheSubclass extends TheClass {
public static int theMethod() {
return 2;
}
}
public static void main(String[] args) {
TheClass instanceOfTheClass = new TheSubclass();
System.out.println(instanceOfTheClass.theMethod());
}
}
The code, however, prints the number In fact, the instance that Qualifying a static reference in this way creates an unnecessarily confusing situation. You could argue that |
|
I'm not sure that comparison actually maps to the code in question, but I'll come chat in person. |
flutter/engine@033f207...163a2fd git log 033f207..163a2fd --no-merges --oneline 163a2fd Revert "Android embedding refactor pr3 add remaining systemchannels (#7738)" (flutter/engine#7849) 0d6ff16 Shut down and restart the Dart VM as needed. (flutter/engine#7832) 256db4b Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7738) 02d7ca3 Don't call static method from instance variable (flutter/engine#7841) 10cee61 Delete GL textures when they are released from the texture registry. (flutter/engine#7836) 69e4606 Fix NullPointerException in SurfaceTextureRegistryEntry (flutter/engine#7837) 9a965bc Fix NullPointerException in ResourceCleaner (flutter/engine#7838) 2acd794 Add fml::FileExists implementation for Windows (flutter/engine#7845) fa38a98 Update buildroot to 7f64ff4 to unblock Mac builds. (flutter/engine#7846) 1ba3295 Add support for calling into other plugins from a background context on iOS (flutter/engine#7843) df2fc97 Roll src/third_party/skia 154acd7a1374..be9aff25bddc (13 commits) (flutter/engine#7842) 0ca1d1f Remove the Dart JIT snapshot data from AOT builds of the embedder library (flutter/engine#7806) c51ea41 Roll src/third_party/skia 7a74c7cb6da0..154acd7a1374 (1 commits) (flutter/engine#7840) ecbaea1 Ensure to pass dill file after VM options for gen_snapshot (flutter/engine#7839) 5d3f714 Roll src/third_party/skia b00f7b34751b..7a74c7cb6da0 (1 commits) (flutter/engine#7835) 7337399 Roll src/third_party/skia 9a88bee122f1..b00f7b34751b (24 commits) (flutter/engine#7831) 6f318ef Move up ndk version that is being downloaded(old one no longer available) (flutter/engine#7830) a8aa1ee Track flow id (flutter/engine#7826) b1ce6b7 Roll src/third_party/skia a0dcd29f536b..9a88bee122f1 (4 commits) (flutter/engine#7825) dbc1663 Roll src/third_party/skia 6152470dc69e..a0dcd29f536b (2 commits) (flutter/engine#7824) 9426776 Roll src/third_party/skia 4037f7f5d8b4..6152470dc69e (1 commits) (flutter/engine#7823) e2394ad Add flow events connecting pointer events to frames (flutter/engine#7807) 0a5a7c5 Roll src/third_party/skia 09c01e9df260..4037f7f5d8b4 (3 commits) (flutter/engine#7821) b867f48 Roll src/third_party/skia 186669c4128b..09c01e9df260 (5 commits) (flutter/engine#7820) af39e22 Fix tests that were committed after cirrus ran (flutter/engine#7819) 1f2cbf7 Roll src/third_party/dart 0a7dcf17eb..c92d5ca288 (64 commits) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff (liyuqian@google.com), and stop the roller if necessary.
No description provided.