throw new MalformedURLException( "The Trac URL is incorrect." );
}
config.setBasicUserName( tracUser );
config.setBasicPassword( tracPassword );
XmlRpcClient client = new XmlRpcClient();
client.setConfig( config );
// Fetch issues
String qstr = "";
if ( !StringUtils.isEmpty( query ) )
{
qstr = query;
}
Object[] params = new Object[] { new String( qstr ) };
Object[] queryResult = null;
ArrayList<Issue> issueList = new ArrayList<Issue>();
try
{
queryResult = (Object[]) client.execute( "ticket.query", params );
for ( int i = 0; i < queryResult.length; i++ )
{
params = new Object[] { queryResult[i] };
Object[] ticketGetResult = null;
ticketGetResult = (Object[]) client.execute( "ticket.get", params );
issueList.add( createIssue( ticketGetResult ) );
}
}
catch ( XmlRpcException e )
{