Skip to content

Commit

Permalink
Fixed bug JENKINS-25424: Added a NodePropertyDescriptor to DisplayAll…
Browse files Browse the repository at this point in the history
…ocator.Property.
  • Loading branch information
levsa committed Nov 10, 2014
1 parent ca66528 commit 952b291
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/hudson/plugins/xvnc/DisplayAllocator.java
Expand Up @@ -7,6 +7,7 @@
import java.util.Random;
import java.util.Set;

import hudson.slaves.NodePropertyDescriptor;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

Expand All @@ -25,7 +26,7 @@ final class DisplayAllocator {
public DisplayAllocator() {
}

private final int getRandomValue(final int min, final int max) {
private int getRandomValue(final int min, final int max) {
return min + (new Random().nextInt(getRange(min, max)));
}

Expand Down Expand Up @@ -81,5 +82,11 @@ private Object readResolve() {
allocator = new DisplayAllocator();
return this;
}

public static class DescriptorImpl extends NodePropertyDescriptor {

@Override
public String getDisplayName() { return ""; }
}
}
}

0 comments on commit 952b291

Please sign in to comment.