Regarding this:

On 10/2/2018 3:54 PM, Igal Sapir wrote:
Rainer pointed out to me the class JrePlatform [1], which has a helper field called IS_WINDOWS.

I think that it would make sense to add a constant field OS_NAME, as well as IS_LINUX and IS_MACOS, and use these fields instead of calling System.getProperty("os.name") in multiple places - some examples [2] [3] [4].

If there is no objection, I can go ahead and refactor that.

[1] https://github.com/apache/tomcat/blob/trunk/java/org/apache/tomcat/util/compat/JrePlatform.java

[2] https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/util/ServerInfo.java#L113

[3] https://github.com/apache/tomcat/blob/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java#L56


Example [3] above is in a separate module, so perhaps those should not be dependent on org.apache.tomcat?  I'm not sure but wanted to point it out.

Igal

[4] https://github.com/apache/tomcat/blob/trunk/test/org/apache/tomcat/util/net/TesterSupport.java#L196


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



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

Reply via email to