Skip to Content.
Sympa Menu

perfsonar-dev - r1950 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType

Subject: perfsonar development work

List archive

r1950 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType


Chronological Thread 
  • From:
  • To:
  • Subject: r1950 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType
  • Date: Mon, 22 Jan 2007 04:56:49 -0500

Author: roman
Date: 2007-01-22 04:56:46 -0500 (Mon, 22 Jan 2007)
New Revision: 1950

Modified:

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
Log:
When startTime or endTime parameter in the request to the SQL MA had wrong
format then the exception were not caught.
Now it's fixed and relevant result (error) code is generated and sent in the
response.

Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-01-19 14:58:20 UTC (rev 1949)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-01-22 09:56:46 UTC (rev 1950)
@@ -131,11 +131,29 @@
// + pname + ", " + pvalue + "]");

if (pname.equals("startTime")) {
- long startTime = Long.parseLong(pvalue);
+ long startTime = 0;
+ try {
+ startTime = Long.parseLong(pvalue);
+ } catch (NumberFormatException nfex) {
+ throw new RequestException(
+ "error.ma.query",
+ "SQLStorageManager.fetch: "
+ + "startTime parameter in the request "
+ + "has wrong format");
+ }
ibatisParams.put(pname, startTime);

} else if (pname.equals("endTime")) {
- long endTime = Long.parseLong(pvalue);
+ long endTime = 0;
+ try {
+ endTime = Long.parseLong(pvalue);
+ } catch (NumberFormatException nfex) {
+ throw new RequestException(
+ "error.ma.query",
+ "SQLStorageManager.fetch: "
+ + "endTime parameter in the request "
+ + "has wrong format");
+ }
ibatisParams.put(pname, endTime);

} else {



  • r1950 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType, svnlog, 01/22/2007

Archive powered by MHonArc 2.6.16.

Top of Page