-
Notifications
You must be signed in to change notification settings - Fork 337
Initial handling of constructor diamond operators #1464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
a1e4bb8
22fb655
e86b344
81f952c
03ce931
dfba3e5
fdf01ee
4446516
dc3a227
471701d
aea98ae
0e2df18
e607850
d1636f7
c6c1e9a
68ad56d
02d32b6
ec32f89
bae860f
e1d8386
89bb268
36ac60c
65fc519
2454efd
df8f89e
82e633e
319f453
1374e89
4babffe
78501f2
2c50426
95ee81d
39898d7
bfd95f7
d50bf7b
bc76012
2883e5a
e321bbc
dc9d2dc
829490a
caa54dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -544,11 +544,7 @@ private void reportInvalidOverridingMethodParamTypeError( | |
| if (treePath == null) { | ||
| return null; | ||
| } | ||
| TreePath parentPath = treePath.getParentPath(); | ||
| if (parentPath == null) { | ||
| return null; | ||
| } | ||
| return getDiamondTypeFromParentContext(tree, state, parentPath); | ||
| return getDiamondTypeFromParentContext(tree, state, castToNonNull(treePath.getParentPath())); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -624,10 +620,7 @@ private void reportInvalidOverridingMethodParamTypeError( | |
| } | ||
|
|
||
| /** Finds the path to {@code target} within {@code rootPath}, or null when not found. */ | ||
| private static @Nullable TreePath findPathToSubtree(@Nullable TreePath rootPath, Tree target) { | ||
| if (rootPath == null) { | ||
| return null; | ||
| } | ||
| private static @Nullable TreePath findPathToSubtree(TreePath rootPath, Tree target) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same worry here. These sort of traversals, as opposed to keeping the current path in state somehow, is one of the reasons Checker Framework was slower than FBInfer/NullAway in the past, no? I guess this is not a traversal from the compilation unit root, but still feels like a bit of a potential smell. |
||
| if (rootPath.getLeaf() == target) { | ||
| return rootPath; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.