You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by isapir <gi...@git.apache.org> on 2017/10/02 19:24:38 UTC

[GitHub] tomcat pull request #75: added javadoc comments and a method that takes defa...

GitHub user isapir opened a pull request:

    https://github.com/apache/tomcat/pull/75

    added javadoc comments and a method that takes default value

    The `getInitParameter(String name, String defaultValue)` adds useful functionality to this base class so that any optional parameter can be set in one line of code instead of checking whether it is null or not, e.g.
    
        String value = deafultValue;
        if (getInitParameter(param) != null)
          value = getInitParameter(param);
    
    or
    
        if (getInitParameter(param) != null)
          value = getInitParameter(param);
        else
          value = defaultValue;
    
    becomes
    
        value = getInitParameter(param, defaultValue);
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/isapir/tomcat update-02

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tomcat/pull/75.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #75
    
----
commit 85a2af36923e8177b83f02d4aab0ddfa4ea06da0
Author: Igal Sapir <de...@21solutions.net>
Date:   2017-10-02T19:20:27Z

    added javadoc comments and a method that takes default value
    
    The getInitParameter(String name, String defaultValue) adds useful functionality to this base class so that any optional parameter can be set in one line of code instead of checking whether it is null or not.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] tomcat issue #75: added javadoc comments and a method that takes default val...

Posted by isapir <gi...@git.apache.org>.
Github user isapir commented on the issue:

    https://github.com/apache/tomcat/pull/75
  
    OK, the reason that I added this method is that I saw `init()` and I did not realize that it was part of the spec since it is not marked with `@Override` and I've never seen it before (looks like it's new in Servlet 4.0)
    
    Should I re-submit the JavaDoc enhancements and add `@Override` to `init()`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] tomcat pull request #75: added javadoc comments and a method that takes defa...

Posted by isapir <gi...@git.apache.org>.
Github user isapir closed the pull request at:

    https://github.com/apache/tomcat/pull/75


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] tomcat issue #75: added javadoc comments and a method that takes default val...

Posted by markt-asf <gi...@git.apache.org>.
Github user markt-asf commented on the issue:

    https://github.com/apache/tomcat/pull/75
  
    -1
    The public API of specification defined classes may not be changed.
    This method would be worth adding to o.a.catalina.filters.FilterBase if any of Tomcat's internal filter implementations could make use of it (i.e. if it resulted in removing more code than it added)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] tomcat issue #75: added javadoc comments and a method that takes default val...

Posted by isapir <gi...@git.apache.org>.
Github user isapir commented on the issue:

    https://github.com/apache/tomcat/pull/75
  
    Actually, I see that I can not add `@Override` since it's not part of the `javax.servlet.Filter` interface.
    



---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org