Skip to content

Commit

Permalink
Fix compilation issues with eclipse compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtnord committed Sep 10, 2015
1 parent 781a914 commit d3abea3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@
import com.cloudbees.plugins.credentials.CredentialsScope;
import com.cloudbees.plugins.credentials.domains.Domain;
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;

import hudson.model.FreeStyleBuild;
import hudson.model.Item;
import hudson.model.FreeStyleProject;
import hudson.tasks.Shell;

import java.util.Collections;
import java.util.List;

import org.jenkinsci.plugins.credentialsbinding.Binding;
import org.jenkinsci.plugins.credentialsbinding.MultiBinding;
import org.junit.Test;

import static org.junit.Assert.*;

import org.junit.Rule;
import org.jvnet.hudson.test.JenkinsRule;

Expand All @@ -52,7 +58,7 @@ public class UsernamePasswordBindingTest {
FreeStyleProject p = r.createFreeStyleProject();
p.getBuildWrappersList().add(new SecretBuildWrapper(Collections.<Binding<?>>singletonList(new UsernamePasswordBinding("AUTH", c.getId()))));
p.getBuildersList().add(new Shell("set +x\necho $AUTH > auth.txt"));
r.configRoundtrip(p);
r.configRoundtrip((Item)p);
SecretBuildWrapper wrapper = p.getBuildWrappersList().get(SecretBuildWrapper.class);
assertNotNull(wrapper);
List<? extends MultiBinding<?>> bindings = wrapper.getBindings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,23 @@
import com.cloudbees.plugins.credentials.CredentialsScope;
import com.cloudbees.plugins.credentials.domains.Domain;
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;

import hudson.Functions;
import hudson.model.FreeStyleBuild;
import hudson.model.Item;
import hudson.model.FreeStyleProject;
import hudson.tasks.BatchFile;
import hudson.tasks.Shell;

import java.util.Collections;
import java.util.List;
import java.util.TreeSet;

import org.jenkinsci.plugins.credentialsbinding.MultiBinding;
import org.junit.Test;

import static org.junit.Assert.*;

import org.junit.Rule;
import org.jvnet.hudson.test.JenkinsRule;

Expand All @@ -58,7 +64,7 @@ public class UsernamePasswordMultiBindingTest {
} else {
p.getBuildersList().add(new Shell("set +x\necho $userid/$pass > auth.txt"));
}
r.configRoundtrip(p);
r.configRoundtrip((Item)p);
SecretBuildWrapper wrapper = p.getBuildWrappersList().get(SecretBuildWrapper.class);
assertNotNull(wrapper);
List<? extends MultiBinding<?>> bindings = wrapper.getBindings();
Expand Down

0 comments on commit d3abea3

Please sign in to comment.