Skip to content

Commit

Permalink
[NTI] Tiny cleanup to use helper fn in CheckAccessControls.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128822467
  • Loading branch information
aravind-pg authored and blickly committed Jul 29, 2016
1 parent f6bc1df commit 2b682b3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/com/google/javascript/jscomp/CheckAccessControls.java
Expand Up @@ -1028,14 +1028,11 @@ private boolean isPropertyDeclaredConstant(
*/ */
private static String getPropertyDeprecationInfo(ObjectTypeI type, private static String getPropertyDeprecationInfo(ObjectTypeI type,
String prop) { String prop) {
JSDocInfo info = type.getOwnPropertyJSDocInfo(prop); String depReason = getDeprecationReason(type.getOwnPropertyJSDocInfo(prop));
if (info != null && info.isDeprecated()) { if (depReason != null) {
if (info.getDeprecationReason() != null) { return depReason;
return info.getDeprecationReason();
}

return "";
} }

ObjectTypeI implicitProto = type.getPrototypeObject(); ObjectTypeI implicitProto = type.getPrototypeObject();
if (implicitProto != null) { if (implicitProto != null) {
return getPropertyDeprecationInfo(implicitProto, prop); return getPropertyDeprecationInfo(implicitProto, prop);
Expand Down

0 comments on commit 2b682b3

Please sign in to comment.