eclipse / Xpect

This repository has been rewritten to move to the Eclipse Foundation. Find the old history here: https://github.com/TypeFox/Xpect
http://www.xpect-tests.org/
Eclipse Public License 2.0
30 stars 28 forks source link

Don't log resource exceptions in ContentTypeUtil.getContentType #210

Closed iloveeclipse closed 7 years ago

iloveeclipse commented 7 years ago

Follow up on #168

ContentTypeUtil.getContentType should not log errors, because they have no value but can pollute the error log.

We just saw the case where the decorator was running over lot of files which were modified externally and so it produced tons of errors without any value.

Quote:

Moritz, there is no need to log the error since it is expected that the test might fail. So could you please remove new logging you've added with b3bfc60 - it will pollute the error log exact in the same way as before, with a slightly different stack trace.

The point of this method is to check if the given resource (of any kind and in any state) matches the xpect content type. If the resource is in bad state, it is just supposed to return "BINARY".

meysholdt commented 7 years ago

fixed since https://github.com/meysholdt/Xpect/commit/aa52404b94a82be798dd289295fa748fcae31605.