Make UI.wrapperElement non-public by adding private field and public getter#22016
Make UI.wrapperElement non-public by adding private field and public getter#22016
Conversation
|
@mshabarov 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
…getter Co-authored-by: mshabarov <61410877+mshabarov@users.noreply.github.com>
Format Checker Report
Here is the list of files with format issues in your PR: |
|
| * | ||
| * @return the wrapper element, or {@code null} if server-side routing is used | ||
| */ | ||
| public Element getWrapperElement() { |
There was a problem hiding this comment.
As per #22008 (comment), it would make sense to avoid public API exposure for this getter. Let's consider moving it to UIInternals and possibly making package-private or marked as internal API.
|
Superseeded by #23194 |




The
wrapperElementfield in theUIclass was incorrectly declared aspublic, which violates encapsulation principles and exposes internal implementation details.This PR addresses the issue by:
public Element wrapperElement;toprivate Element wrapperElement;public Element getWrapperElement()method with proper JavaDoc documentationChanges Made
ui.getWrapperElement()Benefits
The
wrapperElementis used as a container for route components when client-side routing is enabled, and this refactoring ensures it follows proper object-oriented design principles while maintaining full backward compatibility.Fixes #22008.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
maven.vaadin.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/flow/flow org.codehaus.plexus.classworlds.launcher.Launcher compile -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.