From: <ksa...@we...> - 2006-12-05 10:35:00
|
Hello, I wanted to use Collection_SumFunction.calculateSum(featureCollection, attribute) to get the sum of the attribute in the FeatureCollection, but = I got a NullPointerException in = SubFeatureCollection.accepts(FeatureVisitor, ProgressListener) when executing progress.complete(). My workaround is = to pass a NullProgressListener as can be seen in the following code = snippet: >>> SumVisitor sv =3D new SumVisitor(attributeName, featureCollection.getSchema()); featureCollection.accepts(sv, new NullProgressListener()); <<< In SubFeatureCollection.accepts(FeatureVisitor, ProgressListener) the = check, if null is passed as listener is commented out. I assume, this is my problem. So my questions are: Is it done by purpose? Or do I try to use = the Collection_SumFunction in a wrong way? Anyway, I can work with the workaround, I just wanted to be sure to understand the Collection_SumFunction class right. Regards, Kerstin S=E4lzer |