Issue Type: Bug Bug
Affects Versions: 8.1
Assignee: Jody Garnett
Components: main
Created: 30/Aug/12 1:06 AM
Description:

In the transition to an internal list of parameters, the accessor methods provided by the various classification functions have been broken.

For example

public void setClasses(int classes) {
        org.opengis.filter.FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Literal _expression_ = ff.literal(classes);
        getParameters().set(1, _expression_);
    }

The above function will only work if setParameters( List ) has already been called. During construction parameters is set to new ArrayList(2). Which is still empty, and thus set(1, _expression_ ) will result in an IndexOutOfBounds exception.

Work around as a user is to use setParameters:

List<_expression_> params = new ArrayList<_expression_>(2);
params.add( expr );
params.add( literal );
function.setParameters(params);
Project: GeoTools
Priority: Minor Minor
Reporter: Jody Garnett
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to