Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIX JENKINS-25405] Bridge ParserResult#addAnnotations for void retur…
Browse files Browse the repository at this point in the history
…n type
  • Loading branch information
olivergondza committed Nov 3, 2014
1 parent cf1f8f0 commit ebd4529
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pom.xml
Expand Up @@ -77,6 +77,20 @@
</excludes>
</configuration>
</plugin>

<!-- JENKINS-25405 -->
<plugin>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector</artifactId>
<version>1.2</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/hudson/plugins/analysis/core/ParserResult.java
Expand Up @@ -13,6 +13,7 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;

import edu.umd.cs.findbugs.annotations.SuppressWarnings;

Expand Down Expand Up @@ -256,6 +257,7 @@ private boolean hasRelativeFileName(final FileAnnotation annotation) {
* @param annotation the annotation to add
* @return the number of added annotations
*/
@WithBridgeMethods(value=void.class) // JENKINS-25405
public final int addAnnotation(final FileAnnotation annotation) {
expandRelativePaths(annotation);
if (annotations.add(annotation)) {
Expand All @@ -272,6 +274,7 @@ public final int addAnnotation(final FileAnnotation annotation) {
* @param newAnnotations the annotations to add
* @return the number of added annotations
*/
@WithBridgeMethods(value=void.class) // JENKINS-25405
public final int addAnnotations(final Collection<? extends FileAnnotation> newAnnotations) {
int count = 0;
for (FileAnnotation annotation : newAnnotations) {
Expand Down

0 comments on commit ebd4529

Please sign in to comment.