Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

illegal.argument exception

Andrew Striletskyi February 21, 2018

I have a part of script . On Jira 7 this script succesfully working , but in jira 6.4 I see an error illegalArgument exception (in line with "def PriorityQueue") . Code: 
How to fix it?

class Agent {

ApplicationUser user;

int issueCount;

long lastAssignedTime;


def groups = ComponentAccessor.getGroupManager() as GroupManager

def agents = groups.getUsersInGroup("jira-software-users")

def userManager = ComponentAccessor.getUserManager() as UserManager

def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser

def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser.class)

def searchProvider = ComponentAccessor.getComponent(SearchProvider.class)

def PriorityQueue<Agent> agentPQ = new PriorityQueue<>(agents.size(), new Comparator<Agent>() {


int compare(Agent o1, Agent o2) {

if(o1.issueCount == o2.issueCount){

if(o2.lastAssignedTime == o1.lastAssignedTime){



return o1.lastAssignedTime.compareTo(o2.lastAssignedTime)



return o1.issueCount - o2.issueCount





0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events