Fixed major issues reported by sonar (Use Index Of Char)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63813 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-03-09 22:30:55 +00:00
parent 3adb3fa420
commit f2f2c6f9e3
2 changed files with 2 additions and 2 deletions

View File

@@ -1321,7 +1321,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
// we need to strip off the first part of the path
String path = entry.getPath();
String displayPath = path;
int idx = path.indexOf("/", 1);
int idx = path.indexOf('/', 1);
if (idx != -1)
{
displayPath = "/File Plan" + path.substring(idx);

View File

@@ -897,7 +897,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
String name = (String)nodeService.getProperty(document, ContentModel.PROP_NAME);
// rename the record
int dotIndex = name.lastIndexOf(".");
int dotIndex = name.lastIndexOf('.');
String prefix = name;
String postfix = "";
if (dotIndex != -1)