Skip to content

Commit

Permalink
Latest docs on successful build 6142 auto-pushed to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
copybara-service[bot] committed Apr 18, 2024
1 parent 609eb09 commit abb85ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
10 changes: 5 additions & 5 deletions api/latest/index-all.html
Expand Up @@ -163,7 +163,7 @@ <h2 class="title" id="I:A">A</h2>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/UAnyOf.html#accept(com.sun.source.tree.TreeVisitor,D)" class="member-name-link">accept(TreeVisitor&lt;R, D&gt;, D)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UAnyOf.html" title="class in com.google.errorprone.refaster">UAnyOf</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/UMethodIdent.html#accept(com.sun.source.tree.TreeVisitor,D)" class="member-name-link">accept(TreeVisitor&lt;R, D&gt;, D)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UMethodIdent.html" title="class in com.google.errorprone.refaster">UMethodIdent</a></dt>
<dt><a href="com/google/errorprone/refaster/UFreeIdent.html#accept(com.sun.source.tree.TreeVisitor,D)" class="member-name-link">accept(TreeVisitor&lt;R, D&gt;, D)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UFreeIdent.html" title="class in com.google.errorprone.refaster">UFreeIdent</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/ULiteral.html#accept(com.sun.source.tree.TreeVisitor,D)" class="member-name-link">accept(TreeVisitor&lt;R, D&gt;, D)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/ULiteral.html" title="class in com.google.errorprone.refaster">ULiteral</a></dt>
<dd>&nbsp;</dd>
Expand Down Expand Up @@ -4917,7 +4917,7 @@ <h2 class="title" id="I:G">G</h2>
</dd>
<dt><a href="com/google/errorprone/refaster/UAnyOf.html#getKind()" class="member-name-link">getKind()</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UAnyOf.html" title="class in com.google.errorprone.refaster">UAnyOf</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/UMethodIdent.html#getKind()" class="member-name-link">getKind()</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UMethodIdent.html" title="class in com.google.errorprone.refaster">UMethodIdent</a></dt>
<dt><a href="com/google/errorprone/refaster/UFreeIdent.html#getKind()" class="member-name-link">getKind()</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UFreeIdent.html" title="class in com.google.errorprone.refaster">UFreeIdent</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/ULiteral.html#getKind()" class="member-name-link">getKind()</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/ULiteral.html" title="class in com.google.errorprone.refaster">ULiteral</a></dt>
<dd>&nbsp;</dd>
Expand Down Expand Up @@ -6263,7 +6263,7 @@ <h2 class="title" id="I:I">I</h2>
</dd>
<dt><a href="com/google/errorprone/bugpatterns/inject/InjectOnMemberAndConstructor.html#%3Cinit%3E()" class="member-name-link">InjectOnMemberAndConstructor()</a> - Constructor for class com.google.errorprone.bugpatterns.inject.<a href="com/google/errorprone/bugpatterns/inject/InjectOnMemberAndConstructor.html" title="class in com.google.errorprone.bugpatterns.inject">InjectOnMemberAndConstructor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/UType.html#inline(com.google.errorprone.refaster.Inliner)" class="member-name-link">inline(Inliner)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UType.html" title="class in com.google.errorprone.refaster">UType</a></dt>
<dt><a href="com/google/errorprone/refaster/UTree.html#inline(com.google.errorprone.refaster.Inliner)" class="member-name-link">inline(Inliner)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/UTree.html" title="class in com.google.errorprone.refaster">UTree</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/refaster/StringName.html#inline(com.google.errorprone.refaster.Inliner)" class="member-name-link">inline(Inliner)</a> - Method in class com.google.errorprone.refaster.<a href="com/google/errorprone/refaster/StringName.html" title="class in com.google.errorprone.refaster">StringName</a></dt>
<dd>&nbsp;</dd>
Expand Down Expand Up @@ -8361,7 +8361,7 @@ <h2 class="title" id="I:M">M</h2>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/bugpatterns/TypeParameterQualifier.html#matchMemberSelect(com.sun.source.tree.MemberSelectTree,com.google.errorprone.VisitorState)" class="member-name-link">matchMemberSelect(MemberSelectTree, VisitorState)</a> - Method in class com.google.errorprone.bugpatterns.<a href="com/google/errorprone/bugpatterns/TypeParameterQualifier.html" title="class in com.google.errorprone.bugpatterns">TypeParameterQualifier</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/bugpatterns/JUnit4TearDownNotRun.html#matchMethod(com.sun.source.tree.MethodTree,com.google.errorprone.VisitorState)" class="member-name-link">matchMethod(MethodTree, VisitorState)</a> - Method in class com.google.errorprone.bugpatterns.<a href="com/google/errorprone/bugpatterns/JUnit4TearDownNotRun.html" title="class in com.google.errorprone.bugpatterns">JUnit4TearDownNotRun</a></dt>
<dt><a href="com/google/errorprone/bugpatterns/JUnit4SetUpNotRun.html#matchMethod(com.sun.source.tree.MethodTree,com.google.errorprone.VisitorState)" class="member-name-link">matchMethod(MethodTree, VisitorState)</a> - Method in class com.google.errorprone.bugpatterns.<a href="com/google/errorprone/bugpatterns/JUnit4SetUpNotRun.html" title="class in com.google.errorprone.bugpatterns">JUnit4SetUpNotRun</a></dt>
<dd>
<div class="block">Matches if all of the following conditions are true: 1) The method matches <code>AbstractJUnit4InitMethodNotRun.methodMatcher()</code>, (looks like setUp() or tearDown(), and none of the overrides in the
hierarchy of the method have the appropriate @Before or @After annotations) 2) The method is
Expand Down Expand Up @@ -9156,7 +9156,7 @@ <h2 class="title" id="I:M">M</h2>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/bugpatterns/collectionincompatibletype/AbstractCollectionIncompatibleTypeMatcher.MatchResult.html#%3Cinit%3E()" class="member-name-link">MatchResult()</a> - Constructor for class com.google.errorprone.bugpatterns.collectionincompatibletype.<a href="com/google/errorprone/bugpatterns/collectionincompatibletype/AbstractCollectionIncompatibleTypeMatcher.MatchResult.html" title="class in com.google.errorprone.bugpatterns.collectionincompatibletype">AbstractCollectionIncompatibleTypeMatcher.MatchResult</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/bugpatterns/AsyncCallableReturnsNull.html#matchReturn(com.sun.source.tree.ReturnTree,com.google.errorprone.VisitorState)" class="member-name-link">matchReturn(ReturnTree, VisitorState)</a> - Method in class com.google.errorprone.bugpatterns.<a href="com/google/errorprone/bugpatterns/AsyncCallableReturnsNull.html" title="class in com.google.errorprone.bugpatterns">AsyncCallableReturnsNull</a></dt>
<dt><a href="com/google/errorprone/bugpatterns/ReturnsNullCollection.html#matchReturn(com.sun.source.tree.ReturnTree,com.google.errorprone.VisitorState)" class="member-name-link">matchReturn(ReturnTree, VisitorState)</a> - Method in class com.google.errorprone.bugpatterns.<a href="com/google/errorprone/bugpatterns/ReturnsNullCollection.html" title="class in com.google.errorprone.bugpatterns">ReturnsNullCollection</a></dt>
<dd>&nbsp;</dd>
<dt><a href="com/google/errorprone/bugpatterns/AbstractReturnValueIgnored.html#matchReturn(com.sun.source.tree.ReturnTree,com.google.errorprone.VisitorState)" class="member-name-link">matchReturn(ReturnTree, VisitorState)</a> - Method in class com.google.errorprone.bugpatterns.<a href="com/google/errorprone/bugpatterns/AbstractReturnValueIgnored.html" title="class in com.google.errorprone.bugpatterns">AbstractReturnValueIgnored</a></dt>
<dd>
Expand Down
2 changes: 1 addition & 1 deletion api/latest/member-search-index.js

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions bugpattern/UseCorrectAssertInTests.md
Expand Up @@ -14,13 +14,14 @@ To make changes, edit the @BugPattern annotation or the explanation in docs/bugp


## The problem
Java assert statements are not run unless targets explicitly opt in via runtime
flags to the JVM invocation. Tests are typically not run with asserts enabled,
meaning a test will continue to pass even if a bug is introduced since these
statements were never executed. To avoid this, use one of the assertion
libraries that are always enabled, such as JUnit's `org.junit.Assert` or
Google's Truth library. These will also produce richer contextual failure
diagnostics to aid and accelerate debugging.
Java assert statements are not run unless explicitly enabled via runtime flags
to the JVM invocation.

If asserts are not enabled, then a test using assert would continue to pass even
if a bug is introduced since these statements will not be executed. To avoid
this, use one of the assertion libraries that are always enabled, such as
JUnit's `org.junit.Assert` or Google's Truth library. These will also produce
richer contextual failure diagnostics to aid and accelerate debugging.

Don't do this:

Expand Down

0 comments on commit abb85ff

Please sign in to comment.