I found the Jersey source code, and it checks the etag first:

https://java.net/projects/jersey/sources/code-1_x/content/jersey-server/src/main/java/com/sun/jersey/spi/container/ContainerRequest.java

I'll take a look at the spec to see if it says anything different, but otherwise I'll change the order of these checks to match the Jersey behavior.