Skip to content

Commit

Permalink
Fixes an NPE in CheckAccessControls that was documented but overloo…
Browse files Browse the repository at this point in the history
…ked.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240829658
  • Loading branch information
nreid260 authored and tjgq committed Mar 28, 2019
1 parent 402f52a commit 2a2e7a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/CheckAccessControls.java
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ private void checkPrivatePropertyVisibility(
// enclosing class.
// TODO(tbreisacher): Should we also include the filename where ownerType is defined?
String readableTypeName =
Objects.equals(ownerType, propRef.getReceiverType())
ownerType == null || ownerType.equals(propRef.getReceiverType())
? propRef.getReadableTypeNameOrDefault()
: ownerType.toString();
compiler.report(
Expand Down

0 comments on commit 2a2e7a2

Please sign in to comment.