wasync icon indicating copy to clipboard operation
wasync copied to clipboard

Bug in TransportsUtil.java

Open Michenux opened this issue 8 years ago • 5 comments

Hi,

I think there's a bug in class TransportsUtil.java.

for (Object m : l) {
          return matchDecoder(e, m, nd, decodedObjects);
}

matchDecoder will be invoked only for the first element of the list and the following elements will be ignored.

Not sure but something like this would be better :

ArrayList<Object> list = new ArrayList<>();
for (Object m : l) {
   list.add(matchDecoder(e, m, nd, decodedObjects));
}
return list;

Michenux avatar Jul 31 '17 12:07 Michenux

@Michenux Pull request welcomed :-)

jfarcand avatar Jul 31 '17 14:07 jfarcand

Fixed https://github.com/Atmosphere/wasync/pull/153

jfarcand avatar Jul 31 '17 22:07 jfarcand

This sounds similar to the issue I reported in #130, doesn't it? Maybe #130 wasn't properly fixed after all.

slovdahl avatar Aug 01 '17 05:08 slovdahl

Yes, the problem i had is the same as in #130. Works well with the fix but i tested it only with polling transport.

Michenux avatar Aug 01 '17 09:08 Michenux

There were build test-failures, please reconsider the fix.

thabach avatar Aug 02 '17 08:08 thabach