[Libreoffice-commits] core.git: scripting/java
rbuj
robert.buj at gmail.com
Sat Sep 13 08:06:15 PDT 2014
scripting/java/com/sun/star/script/framework/container/ParcelContainer.java | 4 ++--
scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java | 2 +-
scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java | 4 ++--
scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java | 6 +++---
scripting/java/org/openoffice/idesupport/OfficeDocument.java | 2 +-
scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java | 2 +-
scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 81711134207a2715ba6b41e659c1e80e0cd4e05d
Author: rbuj <robert.buj at gmail.com>
Date: Sat Sep 13 10:35:23 2014 +0200
scripting: use a character literal
Change-Id: Iabd3514f3c64ff851463cb9b2c1c425164285eb5
Reviewed-on: https://gerrit.libreoffice.org/11430
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java
index 38b7dff..0b41f28 100644
--- a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java
+++ b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java
@@ -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 );
diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
index b6cc860..c0d53a7 100644
--- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
+++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
@@ -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);
diff --git a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java
index 657e7dc..d36bada 100644
--- a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java
+++ b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java
@@ -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 )
diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
index d08011b..2da7926 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
@@ -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 ) )
diff --git a/scripting/java/org/openoffice/idesupport/OfficeDocument.java b/scripting/java/org/openoffice/idesupport/OfficeDocument.java
index cbb36c5..764501f 100644
--- a/scripting/java/org/openoffice/idesupport/OfficeDocument.java
+++ b/scripting/java/org/openoffice/idesupport/OfficeDocument.java
@@ -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);
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java b/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java
index e5b0e90..01710f9 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java
@@ -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);
}
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java b/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java
index 3e95cef..91b4d97 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java
@@ -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);
}
More information about the Libreoffice-commits
mailing list