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 = 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älzer



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to