Skip to content

Commit

Permalink
Calls to @VisibleForTesting annotated methods from an inner class wer…
Browse files Browse the repository at this point in the history
…e reported as forbidden accesses.

This access type should always be allowed.
  • Loading branch information
Frank Jakop committed Mar 10, 2015
1 parent 2719c5b commit bdc014d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public void sawOpcode(final int opcode) {
* @return true, if the member is called within the same package
*/
private boolean hasToCheck(final @Nonnull ClassMember member, final @Nonnull ClassDescriptor currentClass) {
if (currentClass.equals(member.getClassDescriptor())) {
log.debug("No check: " + member.getName() + " is called within the same class: " + currentClass.getClassName());
if (currentClass.getClassName().startsWith(member.getClassDescriptor().getClassName())) {
log.debug("No check: " + member.getName() + " is called within the same class or inner class: " + currentClass.getClassName());
// no need to check, because method is called by owner
return false;
} else if (!member.getPackageName().equals(currentClass.getPackageName())) {
Expand Down

0 comments on commit bdc014d

Please sign in to comment.