audit use of `instanceof DirectoryFileSource`
See original GitHub issueThere were a number of places #4622 did:
- if (module.isCodeModule()) {
+ if (module.getResources() instanceof DirectoryFileSource) {
because isCodeModule
is not a method in gestalt-v7.
These call sites need to be audited to see if that is a suitable replacement.
- What is it they need to know about the module?
- Does the replacement work in all situations? if module is checked out as source, if it’s a jar in cachedModules, if it’s in a release bundle, etc.
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Java instanceof Operator - Baeldung
instanceof is a binary operator we use to test if an object is of a given type. The result of the operation is...
Read more >The performance impact of using instanceof in Java
class implementation. I used jmh to run the benchmark with 100 warmup calls, 1000 iterations under measuring, and with 10 forks. So each...
Read more >Java “instanceOf”: Why And How To Avoid It In Code - Armedia
The java “instanceof” operator is used to test whether the object is an instance of the specified type (class or subclass or interface)....
Read more >3 Pattern Matching for the instanceof Operator
Pattern matching involves testing whether an object has a particular structure, then extracting data from that object if there's a match.
Read more >instanceof - JavaScript - MDN Web Docs
instanceof. The instanceof operator tests to see if the prototype property of a constructor appears anywhere in the prototype chain of an object....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
100% agree with you on this; that’s the sort of thing I was thinking in that “trying to restrain self from going on ModuleManager tangent” comment a bit ago.
Occurrence in WorldGeneratorManager.java:
WorldGenManager
is refreshed for instance on saving the world gen configRegisterWorldGenerator.class
annotation to add valid world generators to a list with generator informationLike with the metrics, the intent here might’ve been to skip asset-only modules as they won’t have annotations to scan.