You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2020/01/25 21:35:27 UTC

[GitHub] [cxf] amarkevich opened a new pull request #632: avoid checked exception in @PostConstruct method

amarkevich opened a new pull request #632: avoid checked exception in @PostConstruct method
URL: https://github.com/apache/cxf/pull/632
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta commented on a change in pull request #632: avoid checked exception in @PostConstruct method

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #632: avoid checked exception in @PostConstruct method
URL: https://github.com/apache/cxf/pull/632#discussion_r371015899
 
 

 ##########
 File path: rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
 ##########
 @@ -994,27 +993,19 @@ protected void retrieveListenerFactory() {
      * This method is called after configure on this object.
      */
     @PostConstruct
-    public void finalizeConfig()
-        throws GeneralSecurityException,
-               IOException {
+    public void finalizeConfig() {
         retrieveListenerFactory();
         checkConnectorPort();
         this.configFinalized = true;
     }
 
-    private void checkConnectorPort() throws IOException {
-        try {
-            if (null != connector) {
-                int cp = ((ServerConnector)connector).getPort();
-                if (port != cp) {
-                    throw new IOException("Error: Connector port " + cp + " does not match"
-                                + " with the server engine port " + port);
-                }
+    private void checkConnectorPort() {
+        if (null != connector) {
+            int cp = ((ServerConnector)connector).getPort();
+            if (port != cp) {
+                throw new IllegalStateException("Error: Connector port " + cp + " does not match"
 
 Review comment:
   May be `UncheckedIOException` would be better replacement for `IOException`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] amarkevich merged pull request #632: avoid checked exception in @PostConstruct method

Posted by GitBox <gi...@apache.org>.
amarkevich merged pull request #632: avoid checked exception in @PostConstruct method
URL: https://github.com/apache/cxf/pull/632
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services