jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1710149 - in /jmeter/trunk/src/components/org/apache/jmeter/extractor/json: jsonpath/gui/JSONPostProcessorGui.java render/RenderAsJsonRenderer.java
Date Fri, 23 Oct 2015 09:07:45 GMT
Author: milamber
Date: Fri Oct 23 09:07:45 2015
New Revision: 1710149

URL: http://svn.apache.org/viewvc?rev=1710149&view=rev
Log:
Format code and NON-NLS strings
Bugzilla Id: 58515

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/json/render/RenderAsJsonRenderer.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java?rev=1710149&r1=1710148&r2=1710149&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
Fri Oct 23 09:07:45 2015
@@ -154,7 +154,7 @@ public class JSONPostProcessorGui extend
         panel.add(item.get(0), gbc.clone());
         gbc.gridx++;
         gbc.weightx = 1;
-        gbc.fill=GridBagConstraints.HORIZONTAL;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
         panel.add(item.get(1), gbc.clone());
     }
     
@@ -162,7 +162,7 @@ public class JSONPostProcessorGui extend
         panel.add(label, gbc.clone());
         gbc.gridx++;
         gbc.weightx = 1;
-        gbc.fill=GridBagConstraints.HORIZONTAL;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
         panel.add(checkBox, gbc.clone());
     }
 
@@ -170,7 +170,7 @@ public class JSONPostProcessorGui extend
         gbc.gridx = 0;
         gbc.gridy++;
         gbc.weightx = 0;
-        gbc.fill=GridBagConstraints.NONE;
+        gbc.fill = GridBagConstraints.NONE;
     }
 
     private void initConstraints(GridBagConstraints gbc) {

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/json/render/RenderAsJsonRenderer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/json/render/RenderAsJsonRenderer.java?rev=1710149&r1=1710148&r2=1710149&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/json/render/RenderAsJsonRenderer.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/json/render/RenderAsJsonRenderer.java
Fri Oct 23 09:07:45 2015
@@ -120,20 +120,19 @@ public class RenderAsJsonRenderer implem
     private String process(String textToParse) {
         try {
             List<String> matchStrings = extractWithJSonPath(textToParse, jsonPathExpressionField.getText());
-            if(matchStrings.size()==0) {
-                return "NO MATCH";
-            }
-            else {
+            if (matchStrings.size() == 0) {
+                return "NO MATCH"; //$NON-NLS-1$
+            } else {
                 StringBuilder builder = new StringBuilder();
-                int i=0;
+                int i = 0;
                 for (String text : matchStrings) {
-                    builder.append("Result[").append(i++).append("]=").append(text).append("\n");
+                    builder.append("Result[").append(i++).append("]=").append(text).append("\n");
//$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
                 }
-                
+
                 return builder.toString();
             }
         } catch (Exception e) {
-            return "Exception:"+ e.getMessage();
+            return "Exception: " + e.getMessage(); //$NON-NLS-1$
         }
     }
     
@@ -144,18 +143,16 @@ public class RenderAsJsonRenderer implem
 
     /*================= internal business =================*/
 
-
-
     /** {@inheritDoc} */
     @Override
     public void renderResult(SampleResult sampleResult) {
         String response = ViewResultsFullVisualizer.getResponseAsString(sampleResult);
         try {
-            jsonDataField.setText(response == null ? "" : RenderAsJSON.prettyJSON(response,
TAB_SEPARATOR));
+            jsonDataField.setText(response == null ? "" : RenderAsJSON.prettyJSON(response,
TAB_SEPARATOR));  //$NON-NLS-1$
             jsonDataField.setCaretPosition(0);
         } catch (Exception e) {
-            LOGGER.error("Exception converting to XML:"+response+ ", message:"+e.getMessage(),e);
-            jsonDataField.setText("Exception converting to XML:"+response+ ", message:"+e.getMessage());
+            LOGGER.error("Exception converting to XML: "+response+ ", message: "+e.getMessage(),e);
//$NON-NLS-1$ $NON-NLS-2$
+            jsonDataField.setText("Exception converting to XML: "+response+ ", message: "+e.getMessage());
//$NON-NLS-1$ $NON-NLS-2$
             jsonDataField.setCaretPosition(0);
         }
     }



Mime
View raw message