I've just been getting an NPE in autogenerated junit tests; tracked this down to extractAttachments() being called when there are no attachments.
The fix I did was to guard the code with a test for attachments. Should I commit this or does anyone think there should be a better way. diff -r1.20 Stub.java 322,324c322,326 < Iterator iterator = call.getResponseMessage().getAttachments(); < while(iterator.hasNext()){ < attachments.add(iterator.next()); --- > if(call.getResponseMessage().countAttachments()>0) { > Iterator iterator = call.getResponseMessage().getAttachments(); > while(iterator.hasNext()){ > attachments.add(iterator.next()); > }