Repository: primefaces/primefaces
Pull request #8067 (2021-11-10 16:00:59)

Bump byte-buddy from 1.11.22 to 1.12.1
Bumps [byte-buddy](https://github.com/raphw/byte-buddy) from 1.11.22 to 1.12.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/raphw/byte-buddy/releases">byte-buddy's releases</a>.</em></p>
<blockquote>
<h2>Byte Buddy 1.12.1</h2>
<ul>
<li>Fix binary incompatibility in <code>BaseNameResolver</code> for suffixing naming strategy.</li>
<li>Introduce caller sensitive base name resolver for suffixing naming strategies and use it as default if Graal native image property is discovered.</li>
</ul>
<h2>Byte Buddy 1.12.0</h2>
<ul>
<li>Introduce detection for Graal native image execution.</li>
<li>Correctly resolve interface implementations in revers order when compiling method graph.</li>
<li>Adjust lambda instrumentation strategy to support Java 17.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/raphw/byte-buddy/blob/master/release-notes.md">byte-buddy's changelog</a>.</em></p>
<blockquote>
<h3>9. November 2021: version 1.12.1</h3>
<ul>
<li>Fix binary incompatibility in <code>BaseNameResolver</code> for suffixing naming strategy.</li>
<li>Introduce caller sensitive base name resolver for suffixing naming strategies and use it as default if Graal native image property is discovered.</li>
</ul>
<h3>5. November 2021: version 1.12.0</h3>
<ul>
<li>Introduce detection for Graal native image execution.</li>
<li>Correctly resolve interface implementations in revers order when compiling method graph.</li>
<li>Adjust lambda instrumentation strategy to support Java 17.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/raphw/byte-buddy/commit/ef26cf09ddc6a9f0b800b03c0c45de9474416f0f"><code>ef26cf0</code></a> [maven-release-plugin] prepare release byte-buddy-1.12.1</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/952e04531cce73c479be886b8a7f6c5ea8b60ed5"><code>952e045</code></a> [release] New release</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/b6d899c407c4211b8dee45f69fef62281756beb6"><code>b6d899c</code></a> Reintroduce base name resolver in suffixing random strategy and deprecate it ...</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/3ea315db38349d9b24daa0aa42c4d06baf23d35c"><code>3ea315d</code></a> Fix version.</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/9bac44eb4b140fe5c967d74312672e1b35b4f1da"><code>9bac44e</code></a> Try Zulu for EA version.</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/8c7c3ce45a50170d5b229c709c402ce42fa5f262"><code>8c7c3ce</code></a> Revert EA version.</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/d10a5b7b031c1f3bb7dc828e3ae69ff8b544d0b6"><code>d10a5b7</code></a> Fix build matrix.</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/a9603b49d746d87ad11654754598ff2293772657"><code>a9603b4</code></a> Update build matrix.</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/54b22a380cfe10b1849bc4a87c38e23fd4258fc9"><code>54b22a3</code></a> Add contextual naming strategy and make it default for Graal builds.</li>
<li><a href="https://github.com/raphw/byte-buddy/commit/d865202d6d9a5b240c60aa9a99888df8946eb1a1"><code>d865202</code></a> Increment internal Byte Buddy.</li>
<li>Additional commits viewable in <a href="https://github.com/raphw/byte-buddy/compare/byte-buddy-1.11.22...byte-buddy-1.12.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=net.bytebuddy:byte-buddy&package-manager=maven&previous-version=1.11.22&new-version=1.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/docs/11_0_0/components/dialog.md b/docs/11_0_0/components/dialog.md
index df84172dc1..e525ef8a1f 100644
--- a/docs/11_0_0/components/dialog.md
+++ b/docs/11_0_0/components/dialog.md
@@ -56,6 +56,15 @@ Dialog is a panel component that can overlay other elements on page.
 | blockScroll | false | Boolean | Whether to block scrolling of the document when sidebar is active.
 | my | center | String | Position of the dialog relative to the target.
 
+## Common Mistakes
+- Use `appendTo` with care as the page definition and HTML DOM will be different!
+    if `p:dialog` is inside an `h:form` component and `appendTo` is enabled, on the browser the `p:dialog` would be
+    outside of the form and may cause unexpected results. In this case, nest a `h:form` inside the `p:dialog`.
+- Do not place `p:dialog` inside tables, containers likes divs with relative positioning or with non-
+    visible overflow defined, in cases like these functionality might be broken. This is not a limitation
+    but a result of DOM model. For example `p:dialog` inside a `p:tabView`, `p:accordion` are a
+    couple of examples. Same applies to `p:confirmDialog` as well.
+
 ## Getting started with the Dialog
 Dialog is a panel component containing other components, note that by default dialog is not visible.
 
@@ -147,7 +156,6 @@ public class DialogBean {
 }
 ```
 
-
 ## Client Side Callbacks
 Similar to close listener, onShow and onHide are handy callbacks for client side in case you need to
 execute custom javascript.
@@ -157,6 +165,14 @@ execute custom javascript.
     //Content
 </p:dialog>
 ```
+
+## Facets
+
+| Name | Description |
+| --- | --- |
+| header | content which will be rendered in the header; alternative to the `header` attribute |
+| footer | content which will be rendered in the footer; alternative to the `footer` attribute |
+
 ## Client Side API
 Widget: _PrimeFaces.widget.Dialog_
 
@@ -171,8 +187,6 @@ Widget: _PrimeFaces.widget.Dialog_
 Dialog resides in a main container element which _styleClass_ option apply. Following is the list of
 structural style classes;
 
-
-
 | Class | Applies |
 | --- | --- |
 | .ui-dialog | Container element of dialog
@@ -182,18 +196,6 @@ structural style classes;
 | .ui-dialog-content | Dialog body
 
 As skinning style classes are global, see the main theming section for more information.
-
-## Tips
-
-- Use appendTo with care as the page definition and HTML DOM would be different, for example if
-    dialog is inside an h:form component and appendTo is enabled, on the browser dialog would be
-    outside of form and may cause unexpected results. In this case, nest a form inside a dialog.
-- Do not place dialog inside tables, containers likes divs with relative positioning or with non-
-    visible overflow defined, in cases like these functionality might be broken. This is not a limitation
-    but a result of DOM model. For example dialog inside a layout unit, tabview, accordion are a
-    couple of examples. Same applies to confirmDialog as well.
-- A facet called “header" is available to provide custom content inside header instead of using
-    header attribute.
     
 ## Modal
 The dialog support for `modal='true'` works very well. However, there is a use case where the background area of the
diff --git a/primefaces-selenium/primefaces-selenium-core/pom.xml b/primefaces-selenium/primefaces-selenium-core/pom.xml
index 24f76d9155..d184f1b592 100644
--- a/primefaces-selenium/primefaces-selenium-core/pom.xml
+++ b/primefaces-selenium/primefaces-selenium-core/pom.xml
@@ -75,7 +75,7 @@
         <dependency>
             <groupId>net.bytebuddy</groupId>
             <artifactId>byte-buddy</artifactId>
-            <version>1.11.22</version>
+            <version>1.12.1</version>
         </dependency>
     </dependencies>
 </project>
diff --git a/primefaces/src/main/java/org/primefaces/component/avatar/AvatarRenderer.java b/primefaces/src/main/java/org/primefaces/component/avatar/AvatarRenderer.java
index fb190ace3a..a365627c0c 100644
--- a/primefaces/src/main/java/org/primefaces/component/avatar/AvatarRenderer.java
+++ b/primefaces/src/main/java/org/primefaces/component/avatar/AvatarRenderer.java
@@ -133,7 +133,7 @@ public class AvatarRenderer extends CoreRenderer {
             sb.append(m.group());
         }
         String initials = sb.toString();
-        return initials.charAt(0) + initials.substring(initials.length() - 1);
+        return initials.length() == 1 ? initials : initials.charAt(0) + initials.substring(initials.length() - 1);
     }
 
     /**
diff --git a/primefaces/src/main/java/org/primefaces/component/charts/ChartRenderer.java b/primefaces/src/main/java/org/primefaces/component/charts/ChartRenderer.java
index 6acd24744d..ede957b5e3 100644
--- a/primefaces/src/main/java/org/primefaces/component/charts/ChartRenderer.java
+++ b/primefaces/src/main/java/org/primefaces/component/charts/ChartRenderer.java
@@ -256,9 +256,13 @@ public class ChartRenderer extends CoreRenderer {
         }
 
         writer.write("\"plugins\":{");
-        encodeTitle(context, options.getTitle(), false);
-        encodeTooltip(context, options.getTooltip(), true);
-        encodeLegend(context, options.getLegend(), true);
+        Title title = options.getTitle();
+        Tooltip tooltip = options.getTooltip();
+        Legend legend = options.getLegend();
+
+        encodeTitle(context, title, false);
+        encodeTooltip(context, tooltip, title != null);
+        encodeLegend(context, legend, title != null || tooltip != null);
         writer.write("}");
     }
 


Test patch:
diff --git a/primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable031.java b/primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable031Test.java
similarity index 86%
rename from primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable031.java
rename to primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable031Test.java
index 0f37d0beec..a59ecde69d 100644
--- a/primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable031.java
+++ b/primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable031Test.java
@@ -32,7 +32,7 @@ import org.primefaces.selenium.AbstractPrimePage;
 import org.primefaces.selenium.component.CommandButton;
 import org.primefaces.selenium.component.DataTable;
 
-public class DataTable031 extends AbstractDataTableTest {
+public class DataTable031Test extends AbstractDataTableTest {
 
     @Test
     @Order(1)
@@ -58,6 +58,15 @@ public class DataTable031 extends AbstractDataTableTest {
         page.dataTable.removeFilter("data");
         Assertions.assertSame(page.dataTable.getRows().size(), 4);
         Assertions.assertEquals("Data 2 1", page.dataTable.getRows().get(0).getCell(0).getText());
+
+        // filter for "Data 1 *", so no rows because we still have Data 2
+        page.dataTable.filter("data", "Data 1");
+        Assertions.assertSame(page.dataTable.getRows().size(), 0);
+
+        // switch to "Data 1"
+        page.toogle.click();
+        Assertions.assertSame(page.dataTable.getRows().size(), 4);
+        Assertions.assertEquals("Data 1 1", page.dataTable.getRows().get(0).getCell(0).getText());
     }
 
     public static class Page extends AbstractPrimePage {
diff --git a/primefaces/src/test/java/org/primefaces/component/avatar/AvatarRendererTest.java b/primefaces/src/test/java/org/primefaces/component/avatar/AvatarRendererTest.java
index 64e9aed5bd..b1b4b5cf54 100644
--- a/primefaces/src/test/java/org/primefaces/component/avatar/AvatarRendererTest.java
+++ b/primefaces/src/test/java/org/primefaces/component/avatar/AvatarRendererTest.java
@@ -52,6 +52,7 @@ class AvatarRendererTest {
                     Arguments.of(null, null),
                     Arguments.of("G", "G"),
                     Arguments.of("BD", "BD"),
+                    Arguments.of("Sting", "S"),
                     Arguments.of("Wolfgang Amadeus Mozart", "WM"),
                     Arguments.of("PrimeFaces Rocks", "PR"),
                     Arguments.of("ŞPrimeFaces Rocks", "ŞR"),