Kaydet (Commit) 81711134 authored tarafından rbuj's avatar rbuj Kaydeden (comit) David Tardon

scripting: use a character literal

Change-Id: Iabd3514f3c64ff851463cb9b2c1c425164285eb5
Reviewed-on: https://gerrit.libreoffice.org/11430Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst e41cc689
......@@ -176,7 +176,7 @@ public class ParcelContainer implements XNameAccess
{
// return name
String decodedUrl = java.net.URLDecoder.decode( containerUrl );
int indexOfSlash = decodedUrl.lastIndexOf( "/" );
int indexOfSlash = decodedUrl.lastIndexOf('/');
if ( indexOfSlash != -1 )
{
name = decodedUrl.substring( indexOfSlash + 1 );
......@@ -479,7 +479,7 @@ public class ParcelContainer implements XNameAccess
}
LogUtils.DEBUG("Processing " + parcelDescUrl + " closed " );
int indexOfSlash = parcelUrl.lastIndexOf("/");
int indexOfSlash = parcelUrl.lastIndexOf('/');
String name = parcelUrl.substring( indexOfSlash + 1 );
parcel = new Parcel( m_xSFA, this, pd, name );
......
......@@ -260,7 +260,7 @@ public class ScriptMetaData extends ScriptEntry {
}
private URL createURL( String path ) throws java.net.MalformedURLException
{
int indexOfColon = path.indexOf(":");
int indexOfColon = path.indexOf(':');
String scheme = path.substring( 0, indexOfColon );
UCBStreamHandler handler = new UCBStreamHandler( scheme, parent.m_xSFA);
......
......@@ -357,11 +357,11 @@ public class UnoPkgContainer extends ParcelContainer
//its in a bundle need to determine the uno-package file its in
LogUtils.DEBUG("processUnoPackage - is part of a uno bundle");
int index = uri.lastIndexOf("/");
int index = uri.lastIndexOf('/');
if ( uri.endsWith("/") )
{
uri = uri.substring( 0, index );
index = uri.lastIndexOf("/");
index = uri.lastIndexOf('/');
}
if ( index > -1 )
......
......@@ -612,12 +612,12 @@ public abstract class ScriptProvider
String libName;
if (Name.endsWith("/"))
{
String tmp = Name.substring( 0, Name.lastIndexOf( "/" ) );
libName = tmp.substring( tmp.lastIndexOf( "/" ) + 1 );
String tmp = Name.substring( 0, Name.lastIndexOf('/') );
libName = tmp.substring( tmp.lastIndexOf('/') + 1 );
}
else
{
libName = Name.substring( Name.lastIndexOf( "/" ) + 1 );
libName = Name.substring( Name.lastIndexOf('/') + 1 );
}
LogUtils.DEBUG("Deregistering library " + libName );
if ( c.removeParcel( libName ) )
......
......@@ -71,7 +71,7 @@ public class OfficeDocument
if (ze.getName().endsWith(ParcelZipper.PARCEL_DESCRIPTOR_XML))
{
String tmp = ze.getName();
int end = tmp.lastIndexOf("/");
int end = tmp.lastIndexOf('/');
tmp = tmp.substring(0, end);
String parcelName = ze.getName().substring(0, end);
......
......@@ -95,7 +95,7 @@ public class OfficeDocumentChildren extends Children.Keys
setIconBase("/org/openoffice/netbeans/modules/office/resources/ParcelIcon");
setName(name);
setDisplayName(name.substring(name.lastIndexOf("/") + 1));
setDisplayName(name.substring(name.lastIndexOf('/') + 1));
setShortDescription(name);
}
......
......@@ -48,7 +48,7 @@ public class ScriptNode extends AbstractNode {
String name = nameElement.getAttribute("value");
setName(name);
setDisplayName(name.substring(name.lastIndexOf(".") + 1));
setDisplayName(name.substring(name.lastIndexOf('.') + 1));
setShortDescription(name);
}
......
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