sebawagner commented on a change in pull request #166:
URL: https://github.com/apache/openmeetings/pull/166#discussion_r732447851



##########
File path: 
openmeetings-util/src/main/java/org/apache/openmeetings/util/OpenmeetingsVariables.java
##########
@@ -249,11 +256,12 @@ public static String getBaseUrl() {
        }
 
        public static String getWebappPath() {
-               String webappPath = baseUrl;
-               if (webappPath.endsWith("/")) {
-                       webappPath = webappPath.substring(0, 
webappPath.length() - 1);
+               try {

Review comment:
       ```
   } catch (URISyntaxException e) {
           return getWebappPath(DEFAULT_BASE_URL);
       }
   ```
   Will not compile. It will throw an exception in the catch block. Which will 
just not compile. I also don't see why you need to split this into 2 methods.
   
   > your current code will return https://localhost:5443/openmeetings
   
   No it won't. It says ".getPath()" so it won't. DEFAULT_BASE_URL is actually 
the same it will use by default. 
   
   There is no different between our alternatives. Except your alternative 
splits it into 2 methods. For no obvious reason. 
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to