-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused or unneeded JarInfer flags (#1050)
The `JarInferRegexStripModelJar` and `JarInferRegexStripCodeJar` options seem completely unused in our code base; so removing them is just a cleanup. (We should still document in the release notes.) We remove `JarInferUseReturnAnnotations` as well. Recall that JarInfer infers a `@Nullable` return annotation if it sees the statement `return null` in the body of the method. We remove this flag for a number of reasons: * I would argue this kind of thing is better controlled when _generating_ `astubx` files rather than while reading them. I would expect that methods which have `return null` in them should usually have a `@Nullable` return. In cases where this is not desired, the configuration really should be on the generation side I think, excluding a few methods. * This flag doesn't even work when instrumenting bytecodes; there the injected `@Nullable` annotations will be used independent of the flag setting. It only works for models read from `astubx`. So the most common internal use of JarInfer doesn't make use of this flag anyway. * The presence of this flag complicates merging our JarInfer handling code with our other library model handling code, a very desirable cleanup we want to do. * I confirmed that internally at Uber, not setting this flag has no impact on the build (no new errors pop up).
- Loading branch information
Showing
7 changed files
with
25 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters