https://bz.apache.org/bugzilla/show_bug.cgi?id=60381

            Bug ID: 60381
           Summary: Inconsistent toString() in ValveBase and RealmBase
           Product: Tomcat 8
           Version: 8.5.x-trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: 1983-01...@gmx.net
  Target Milestone: ----

Moving several components from Tomcat 6.0.x to 8.5.x I have noticed that
#getInfo() is gone. RealmBase has an abstact method #getName() which is used in
#toString()(). ValveBase lacks this abstract method. This makes the #toString()
implementations inconsistent.

RealmBase:

> @Override
> public String toString() {
>     StringBuilder sb = new StringBuilder("Realm[");
>     sb.append(getName());
>     sb.append(']');
>     return sb.toString();
> }

ValveBase:

> @Override
> public String toString() {
>     StringBuilder sb = new StringBuilder(this.getClass().getName());
>     sb.append('[');
>     if (container == null) {
>         sb.append("Container is null");
>     } else {
>         sb.append(container.getName());
>     }
>     sb.append(']');
>     return sb.toString();
> }

I would rather expect a consistent behavior for both base implementations

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to