jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1779804 - in /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http: proxy/DefaultSamplerCreator.java proxy/Proxy.java sampler/HTTPFileImpl.java
Date Sun, 22 Jan 2017 12:51:21 GMT
Author: fschumacher
Date: Sun Jan 22 12:51:20 2017
New Revision: 1779804

URL: http://svn.apache.org/viewvc?rev=1779804&view=rev
Log:
Utilised Java 8 (and 7) features to tidy up code. Used multi-catch. Contributed by Graham
Russell (graham at ham1.co.uk). Part 4/8 of github pr #255

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java?rev=1779804&r1=1779803&r2=1779804&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
Sun Jan 22 12:51:20 2017
@@ -235,11 +235,7 @@ public class DefaultSamplerCreator exten
             xmlReader.setErrorHandler(detectionHandler);
             xmlReader.parse(new InputSource(new StringReader(postData)));
             return !detectionHandler.isErrorDetected();
-        } catch (ParserConfigurationException e) {
-            return false;
-        } catch (SAXException e) {
-            return false;
-        } catch (IOException e) {
+        } catch (ParserConfigurationException | SAXException | IOException e) {
             return false;
         }
     }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1779804&r1=1779803&r2=1779804&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Sun Jan
22 12:51:20 2017
@@ -333,10 +333,7 @@ public class Proxy extends Thread {
                     hashAlias = alias;
                     keyAlias = alias;
                 }
-            } catch (IOException e) {
-                log.error(port + "Problem with keystore", e);
-                return null;
-            } catch (GeneralSecurityException e) {
+            } catch (IOException | GeneralSecurityException e) {
                 log.error(port + "Problem with keystore", e);
                 return null;
             }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java?rev=1779804&r1=1779803&r2=1779804&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java
Sun Jan 22 12:51:20 2017
@@ -95,8 +95,6 @@ public class HTTPFileImpl extends HTTPAb
             res = resultProcessing(areFollowingRedirect, frameDepth, res);
 
             return res;
-        } catch (FileNotFoundException e) {
-            return errorResult(e, res);
         } catch (IOException e) {
             return errorResult(e, res);
         } finally {



Mime
View raw message