提交 787123cf 编写于 作者: C Christoph Kutzinski

fixed compiler warnings

上级 fc65f0b4
......@@ -142,7 +142,8 @@ public abstract class AbstractMavenProject<P extends AbstractProject<P,R>,R exte
* @return
* True if any upstream projects are building or in queue, false otherwise.
*/
private boolean areUpstreamsBuilding(AbstractProject<?,?> downstreamProject,
@SuppressWarnings("rawtypes")
private boolean areUpstreamsBuilding(AbstractProject<?,?> downstreamProject,
AbstractProject<?,?> excludeProject) {
DependencyGraph graph = Jenkins.getInstance().getDependencyGraph();
Set<AbstractProject> tups = graph.getTransitiveUpstream(downstreamProject);
......
......@@ -51,6 +51,7 @@ import org.apache.maven.project.MavenProject;
* This is only used for
* {@link MavenModuleSet#isAggregatorStyleBuild() the aggregator style build}.
*/
@SuppressWarnings("deprecation") // as we're restricted to Maven 2.x API here, but compile against Maven 3.x, we cannot avoid deprecations
final class Maven2Builder extends MavenBuilder {
private final Map<ModuleName,MavenBuildProxy2> proxies;
private final Map<ModuleName,List<MavenReporter>> reporters = new HashMap<ModuleName,List<MavenReporter>>();
......
......@@ -69,6 +69,7 @@ import org.codehaus.plexus.configuration.PlexusConfiguration;
* @author Kohsuke Kawaguchi
* @since 1.133
*/
@SuppressWarnings("deprecation") // as we're restricted to Maven 2.x API here, but compile against Maven 3.x we cannot avoid deprecations
public abstract class MavenBuilder extends AbstractMavenBuilder implements DelegatingCallable<Result,IOException> {
......
......@@ -472,7 +472,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
@Override
public Fingerprint.RangeSet getDownstreamRelationship(AbstractProject that) {
public Fingerprint.RangeSet getDownstreamRelationship(@SuppressWarnings("rawtypes") AbstractProject that) {
Fingerprint.RangeSet rs = super.getDownstreamRelationship(that);
for(List<MavenBuild> builds : getModuleBuilds().values())
for (MavenBuild b : builds)
......@@ -619,7 +619,6 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
+ " but cannot find the config");
} else {
logger.println("using settings config with name " + config.name);
String settingsContent = config.content;
if (config.content != null ) {
remoteSettings = SettingsProviderUtils.copyConfigContentToFilePath( config, getWorkspace() );
project.setAlternateSettings( remoteSettings.getRemote() );
......
......@@ -65,7 +65,7 @@ public class MavenTestDataPublisher extends Recorder {
return BuildStepMonitor.STEP;
}
public boolean perform(AbstractBuild build, Launcher launcher,
public boolean perform(AbstractBuild<?,?> build, Launcher launcher,
BuildListener listener) throws InterruptedException, IOException {
SurefireReport report = build.getAction(SurefireReport.class);
......
......@@ -223,7 +223,6 @@ public class RedeployPublisher extends Recorder {
+ " but cannot find the config" );
} else {
listener.getLogger().println( "redeploy publisher using settings config with name " + config.name );
String settingsContent = config.content;
if (config.content != null ) {
remoteSettingsFromConfig = SettingsProviderUtils.copyConfigContentToFilePath( config, build.getWorkspace() );
altSettingsPath = remoteSettingsFromConfig.getRemote();
......@@ -386,7 +385,7 @@ public class RedeployPublisher extends Recorder {
//---------------------------------------------
@SuppressWarnings("deprecation") // as we're restricted to Maven 2.x API here, but compile against Maven 3.x we cannot avoid deprecations
public static class WrappedArtifactRepository implements ArtifactRepository {
private ArtifactRepository artifactRepository;
private boolean uniqueVersion;
......
......@@ -105,7 +105,7 @@ public abstract class MavenAbstractArtifactRecord<T extends AbstractBuild<?,?>>
/**
* Returns the log of this deployment record.
*/
public AnnotatedLargeText getLog() {
public AnnotatedLargeText<Record> getLog() {
return new AnnotatedLargeText<Record>(new File(getBuild().getRootDir(),fileName), Charset.defaultCharset(), true, this);
}
......@@ -218,12 +218,12 @@ public abstract class MavenAbstractArtifactRecord<T extends AbstractBuild<?,?>>
final Record record = new Record(repositoryUrl, logFile.getName());
records.add(record);
new TaskThread(this,ListenerAndText.forFile(logFile)) {
new TaskThread(this,ListenerAndText.forFile(logFile,this)) {
protected void perform(TaskListener listener) throws Exception {
try {
MavenEmbedder embedder = MavenUtil.createEmbedder(listener,getBuild());
ArtifactRepositoryLayout layout =
(ArtifactRepositoryLayout) embedder.lookup( ArtifactRepositoryLayout.class,"default");
embedder.lookup( ArtifactRepositoryLayout.class,"default");
ArtifactRepositoryFactory factory =
(ArtifactRepositoryFactory) embedder.lookup(ArtifactRepositoryFactory.ROLE);
......
......@@ -32,8 +32,6 @@ import com.google.common.collect.Lists;
@PrepareForTest( { MavenModuleSet.class, DescriptorImpl.class, AbstractProject.class})
public class MavenModuleTest {
private MavenModuleSet parent;
private MavenModule module;
private MavenProject project;
......@@ -73,6 +71,7 @@ public class MavenModuleTest {
Lists.<AbstractProject<?,?>>newArrayList(this.module, pluginModule));
graph.build();
@SuppressWarnings("rawtypes")
List<AbstractProject> downstream = graph.getDownstream(pluginModule);
Assert.assertEquals(1, downstream.size());
Assert.assertSame(this.module, downstream.get(0));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册