On Tue, 15 Feb 2022 15:48:17 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> My wording for the &&: If the tag is not a constructed and context-specific >> tag number 0, then an exception is thrown. The parens denote that both >> conditions need to apply: >> >> !(isCSTag0 && isConst) >> >> true, true = !(true && true) = !true = false >> true, false = !(true && false) = !false = true >> false, true = !(false && true) = !false = true >> false, false = !(false && false) = !false = true >> >> >> !isCSTag0 || !isConst >> >> true, true = !true || !true = false || false = false >> true, false = !true || !false = false || true = true >> false, true = !false || !true = true || false = true >> false, false = !false || !false = true || true = true > > If you really like it, I'll write > > if (derValue1.isContextSpecific((byte) 0) && > derValue1.isConstructed()) { > nameValue = derValue1.data.toByteArray(); > } else { > throw new IOException("value is not [0]"); > } > > Turns out I don't need to move all lines into the block. Yes, that is fine also! ------------- PR: https://git.openjdk.java.net/jdk/pull/7167