summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-09 14:51:38 +0200
committerNoel Grandin <noel@peralex.com>2015-01-09 15:10:51 +0200
commit3757c03fc8f138427e21c41ef5e66e8c5a98159c (patch)
tree64d58e7d94aa60c4da475ac038e59d5c1a517437 /framework
parent8912e6dab98eabbdeea870a387d30ef1de938acb (diff)
java: simplify array creation
and remove the need to worry about keeping indexes correct Change-Id: I9a5fc00f7e28f305279b41099274c96daebebb95
Diffstat (limited to 'framework')
-rw-r--r--framework/qa/complex/dispatches/Interceptor.java6
-rw-r--r--framework/qa/complex/dispatches/checkdispatchapi.java3
2 files changed, 3 insertions, 6 deletions
diff --git a/framework/qa/complex/dispatches/Interceptor.java b/framework/qa/complex/dispatches/Interceptor.java
index a6653d195e98..44ba2a2a9da0 100644
--- a/framework/qa/complex/dispatches/Interceptor.java
+++ b/framework/qa/complex/dispatches/Interceptor.java
@@ -259,8 +259,7 @@ public class Interceptor implements XDispatch,
{
if (m_lURLs4InterceptionInfo == null)
{
- m_lURLs4InterceptionInfo = new String[1];
- m_lURLs4InterceptionInfo[0] = "*";
+ m_lURLs4InterceptionInfo = new String[] { "*" };
}
return m_lURLs4InterceptionInfo;
@@ -276,8 +275,7 @@ public class Interceptor implements XDispatch,
{
if (m_lURLs4Blocking == null)
{
- m_lURLs4Blocking = new String[1];
- m_lURLs4Blocking[0] = "*";
+ m_lURLs4Blocking = new String[] { "*" };
}
return m_lURLs4Blocking;
diff --git a/framework/qa/complex/dispatches/checkdispatchapi.java b/framework/qa/complex/dispatches/checkdispatchapi.java
index b2342232fece..c227be25e9bb 100644
--- a/framework/qa/complex/dispatches/checkdispatchapi.java
+++ b/framework/qa/complex/dispatches/checkdispatchapi.java
@@ -251,8 +251,7 @@ public class checkdispatchapi
public void checkInterception()
{
- String[] lDisabledURLs = new String[1];
- lDisabledURLs[0] = ".uno:Open";
+ String[] lDisabledURLs = new String[] { ".uno:Open" };
System.out.println("create and initialize interceptor ...");
Interceptor aInterceptor = new Interceptor();