Commit fd7130df authored by manohar's avatar manohar

Bug fixing of substring index exception


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92825 ce508802-f39f-4f6c-b175-0d175dae99d5
parent eae026e0
...@@ -592,7 +592,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -592,7 +592,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
{ {
relArray.add(rs.getString(1)); relArray.add(rs.getString(1));
} }
System.out.println("relArray and rights value"+relArray); System.out.println("relArray and rights value 1 ["+relArray + "]");
rs.close(); rs.close();
rs = null; rs = null;
...@@ -606,9 +606,9 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -606,9 +606,9 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
rs = pSelectStmt.executeQuery(); rs = pSelectStmt.executeQuery();
while(rs.next()) while(rs.next())
{ {
relArray1.add(rs.getString(1)); relArray.add(rs.getString(1));
} }
System.out.println("relArray1 and rights value"+relArray1); System.out.println("relArray and rights value 2 ["+relArray + "]");
rs.close(); rs.close();
rs = null; rs = null;
...@@ -616,12 +616,12 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -616,12 +616,12 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
pSelectStmt = null; pSelectStmt = null;
//ended by akhilesh //ended by akhilesh
rightChar = ""; rightChar = "";
for (int iCtr = 0; iCtr < rights.length(); iCtr++) for (int iCtr = 0; iCtr < rights.trim().length(); iCtr++)
{ {
rightChar = rights.substring(iCtr,1); rightChar = rights.substring(iCtr,iCtr+1);
System.out.println("relArray ["+relArray+" ] rightChar ["+ rightChar + "] rights [" + rights + "]"); System.out.println("iCtr [" + iCtr + "] relArray ["+relArray+" ] rightChar ["+ rightChar + "] rights [" + rights + "]");
//if(!(relArray1.contains(rightStr[i]) || relArray.contains(rightStr[i]) || "*".equals(rightStr[i]) || "".equals(rightStr[i]))) //if(!(relArray1.contains(rightStr[i]) || relArray.contains(rightStr[i]) || "*".equals(rightStr[i]) || "".equals(rightStr[i])))
if(!(relArray1.contains(rightChar) || relArray.contains(rightChar) || "*".equals(rightChar) || "".equals(rightChar) || "$".equals(rightChar) || "#".equals(rightChar) )) if(!(relArray.contains(rightChar) || "*".equals(rightChar) || "".equals(rightChar) || "$".equals(rightChar) || "#".equals(rightChar) ))
{ {
System.out.println("r************"+relArray+""+rights); System.out.println("r************"+relArray+""+rights);
returnString="VTRIGHT"; returnString="VTRIGHT";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment