"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/java/edu/umd/cs/findbugs/classfile/analysis/MethodInfo.java" between
findbugs-3.0.0-source.zip and findbugs-3.0.1-source.zip

About: FindBugs uses static analysis to look for bugs in Java code. Source.

MethodInfo.java  (findbugs-3.0.0-source):MethodInfo.java  (findbugs-3.0.1-source)
skipping to change at line 390 skipping to change at line 390
@Override @Override
public boolean isAbstract() { public boolean isAbstract() {
return checkFlag(Constants.ACC_ABSTRACT); return checkFlag(Constants.ACC_ABSTRACT);
} }
@Override @Override
public boolean isSynchronized() { public boolean isSynchronized() {
return checkFlag(Constants.ACC_SYNCHRONIZED); return checkFlag(Constants.ACC_SYNCHRONIZED);
} }
@Override
public boolean isBridge() {
return checkFlag(Constants.ACC_BRIDGE);
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see edu.umd.cs.findbugs.ba.XMethod#isReturnTypeReferenceType() * @see edu.umd.cs.findbugs.ba.XMethod#isReturnTypeReferenceType()
*/ */
@Override @Override
public boolean isReturnTypeReferenceType() { public boolean isReturnTypeReferenceType() {
SignatureParser parser = new SignatureParser(getSignature()); SignatureParser parser = new SignatureParser(getSignature());
String returnTypeSig = parser.getReturnTypeSignature(); String returnTypeSig = parser.getReturnTypeSignature();
return SignatureParser.isReferenceType(returnTypeSig); return SignatureParser.isReferenceType(returnTypeSig);
skipping to change at line 552 skipping to change at line 557
return methodAnnotations.keySet(); return methodAnnotations.keySet();
} }
@Override @Override
public AnnotationValue getAnnotation(ClassDescriptor desc) { public AnnotationValue getAnnotation(ClassDescriptor desc) {
return methodAnnotations.get(desc); return methodAnnotations.get(desc);
} }
@Override @Override
public Collection<AnnotationValue> getAnnotations() { public Collection<AnnotationValue> getAnnotations() {
return methodAnnotations.values();
Collection<AnnotationValue> result = methodAnnotations.values();
if (result.isEmpty() && isBridge()) {
XMethod to = bridgeTo();
if (to != null) {
result = to.getAnnotations();
}
}
return result;
} }
/** /**
* Destructively add an annotation. We do this for "built-in" annotations * Destructively add an annotation. We do this for "built-in" annotations
* that might not be directly evident in the code. It's not a great idea in * that might not be directly evident in the code. It's not a great idea in
* general, but we can get away with it as long as it's done early enough * general, but we can get away with it as long as it's done early enough
* (i.e., before anyone asks what annotations this method has.) * (i.e., before anyone asks what annotations this method has.)
* *
* @param annotationValue * @param annotationValue
* an AnnotationValue representing a method annotation * an AnnotationValue representing a method annotation
skipping to change at line 608 skipping to change at line 621
* *
* @see edu.umd.cs.findbugs.ba.XMethod#getMethodDescriptor() * @see edu.umd.cs.findbugs.ba.XMethod#getMethodDescriptor()
*/ */
@Override @Override
public MethodDescriptor getMethodDescriptor() { public MethodDescriptor getMethodDescriptor() {
return this; return this;
} }
@Override @Override
public ElementType getElementType() { public ElementType getElementType() {
if (getName().equals("<init>")) { if ("<init>".equals(getName())) {
return ElementType.CONSTRUCTOR; return ElementType.CONSTRUCTOR;
} }
return ElementType.METHOD; return ElementType.METHOD;
} }
@Override @Override
public @CheckForNull public @CheckForNull
AnnotatedObject getContainingScope() { AnnotatedObject getContainingScope() {
try { try {
return Global.getAnalysisCache().getClassAnalysis(XClass.class, getC lassDescriptor()); return Global.getAnalysisCache().getClassAnalysis(XClass.class, getC lassDescriptor());
 End of changes. 3 change blocks. 
2 lines changed or deleted 15 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS