Skip to content
Snippets Groups Projects
Commit 6c2ba9a9 authored by felmer's avatar felmer
Browse files

BIS-142 bug in TransferAuthorizationAnnotations fixed

SVN: 26580
parent c107e70a
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ public class TransferAuthorizationAnnotations ...@@ -59,6 +59,7 @@ public class TransferAuthorizationAnnotations
if (indexOfOpenParanthesis < 0) if (indexOfOpenParanthesis < 0)
{ {
indexOfOpenParanthesis = firstLine.length(); indexOfOpenParanthesis = firstLine.length();
finished = true;
} }
annotationName = firstLine.substring(indexOfStart + 1, indexOfOpenParanthesis); annotationName = firstLine.substring(indexOfStart + 1, indexOfOpenParanthesis);
} }
...@@ -169,6 +170,10 @@ public class TransferAuthorizationAnnotations ...@@ -169,6 +170,10 @@ public class TransferAuthorizationAnnotations
private static String getCanonicalSignature(String joinedSignatureLines) private static String getCanonicalSignature(String joinedSignatureLines)
{ {
int parametersStartIndex = joinedSignatureLines.indexOf('('); int parametersStartIndex = joinedSignatureLines.indexOf('(');
if (parametersStartIndex < 0)
{
throw new IllegalArgumentException("Invalid signature: " + joinedSignatureLines);
}
int parametersEndIndex = joinedSignatureLines.lastIndexOf(')'); int parametersEndIndex = joinedSignatureLines.lastIndexOf(')');
String[] splittedBeginning = String[] splittedBeginning =
joinedSignatureLines.substring(0, parametersStartIndex).split(" "); joinedSignatureLines.substring(0, parametersStartIndex).split(" ");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment