mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
Merge pull request #5147 from StefanSpieker/minor_spotbugs
Minor spotbugs issues
This commit is contained in:
3 files changed
+5
-3
No files matched your search
@@ -96,7 +96,7 @@ public class ConsistentHashTest {
|
||||
}
|
||||
}
|
||||
|
||||
System.out.printf("%d/%d\n", even, odd);
|
||||
System.out.printf("%d/%d%n", even, odd);
|
||||
assertTrue(even * 8 < odd);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,8 +67,9 @@ public class SecretTest {
|
||||
|
||||
@Test
|
||||
public void encryptedValuePattern() {
|
||||
final Random random = new Random();
|
||||
for (int i = 1; i < 100; i++) {
|
||||
String plaintext = RandomStringUtils.random(new Random().nextInt(i));
|
||||
String plaintext = RandomStringUtils.random(random.nextInt(i));
|
||||
String ciphertext = Secret.fromString(plaintext).getEncryptedValue();
|
||||
//println "${plaintext} → ${ciphertext}"
|
||||
assert ENCRYPTED_VALUE_PATTERN.matcher(ciphertext).matches();
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.junit.Test;
|
||||
import org.xmlunit.diff.DefaultNodeMatcher;
|
||||
import org.xmlunit.diff.ElementSelectors;
|
||||
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
@@ -141,7 +142,7 @@ public class XStreamDOMTest {
|
||||
v.values.put("foo",createSomeFoo().bar);
|
||||
String xml = xs.toXML(v);
|
||||
Object v2 = xs.fromXML(xml);
|
||||
assertTrue(v2 instanceof DomInMap);
|
||||
assertThat(v2, instanceOf(DomInMap.class));
|
||||
assertXStreamDOMEquals(v.values.get("foo"), ((DomInMap)v2).values.get("foo"));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user