perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5855 - trunk/perfsonar_base/src/main/java/org/perfsonar/service /measurementArchive/metadataConfig/queryGenerator
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r5855 - trunk/perfsonar_base/src/main/java/org/perfsonar/service /measurementArchive/metadataConfig/queryGenerator
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5855 - trunk/perfsonar_base/src/main/java/org/perfsonar/service /measurementArchive/metadataConfig/queryGenerator
- Date: Wed, 5 Oct 2011 13:24:15 +0100 (BST)
Author: psnc.pikusa
Date: 2011-10-05 13:24:15 +0100 (Wed, 05 Oct 2011)
New Revision: 5855
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
Log:
if conditional added to parameters section
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
2011-10-05 11:58:27 UTC (rev 5854)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
2011-10-05 12:24:15 UTC (rev 5855)
@@ -21,7 +21,7 @@
* (query to fetch metadata with owamp data)
*
* @author fernandes
- *
+ * @autor <a
;>Piotr
Pikusa</a>
*/
public class OwampQueryGenerator implements MetadataQueryGenerator {
@@ -74,12 +74,14 @@
throws PerfSONARException {
- if (query == null)
- throw new PerfSONARException(
- "error.ma.query",
- "OwampQueryGenerator.getMetadataQuery: "
- + "Input message is null");
-
+ if (query == null){
+ logger.error("QUERY is null!");
+ throw new PerfSONARException(
+ "error.ma.query",
+ "OwampQueryGenerator.getMetadataQuery: "
+ + "Input message is null");
+ }
+
String src = "";
String dst = "";
String eventType = "";
@@ -108,13 +110,16 @@
EndPointPair end = subject.getEndPointPair();
Parameters params = metadata.getParameters();
- for(String parameter : parameters){
- if(params.getParameterByName(parameter) != null)
- parametersMap.put(parameter,
-
(params.getParameterByName(parameter).getParameterValue() != null ?
-
params.getParameterByName(parameter).getParameterValue().trim() : ""));
+ if(params != null){
+ for(String parameter : parameters){
+ if(params.getParameterByName(parameter) != null)
+ parametersMap.put(parameter,
+
(params.getParameterByName(parameter).getParameterValue() != null ?
+
params.getParameterByName(parameter).getParameterValue().trim() : ""));
+ }
}
+
if (end != null) {
src = (end.getSourceElement() != null ?
end.getSourceElement().getValue().trim() : "");
dst = (end.getDestinationElement() != null ?
end.getDestinationElement().getValue().trim() : "");
- [pS-dev] [GEANT/SA2/ps-java-services] r5855 - trunk/perfsonar_base/src/main/java/org/perfsonar/service /measurementArchive/metadataConfig/queryGenerator, svn-noreply, 10/05/2011
Archive powered by MHonArc 2.6.16.