Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor

...

Code Block
bgColor#FFCCCC
public int nop() {
  while (true) {}
}

Compliant Solution (Thread.sleep())

This compliant solution avoids use of a meaningless infinite loop by sleeping the current thread within the while loop. The loop body contains semantically meaningful operations and consequently cannot be optimized away.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7c5c3367ffbdc300-087ccbd1-460444e9-8d6b80f5-a1cdeb628fe9f1bfbd5c08b0"><ac:plain-text-body><![CDATA[

[[API 2006

https://www.securecoding.cert.org/confluence/display/java/AA.+Java+References#AA.JavaReferences-API06]]

]]></ac:plain-text-body></ac:structured-macro>

...