Skip to content
Permalink
Browse files
Simplify array initialization
  • Loading branch information
Amichai Rothman committed May 28, 2019
1 parent 77448df commit 6818159ff1002cd9a6d5a3b1b0420f277cac53c8
Showing 1 changed file with 4 additions and 10 deletions.
@@ -68,7 +68,7 @@ public void setUp() throws Exception {

public void testFilterRequired() throws Exception {
// Mock up the service references
ServiceReference[] serviceReferences = new ServiceReference[] {};
ServiceReference[] serviceReferences = {};

// Mock up the bundle context
BundleContext bundleContext = EasyMock.createNiceMock(BundleContext.class);
@@ -100,9 +100,7 @@ public void testSingleCommitFilter() throws Exception {
// Mock up the service references
ServiceReference filterReference = EasyMock.createNiceMock(ServiceReference.class);
EasyMock.replay(filterReference);
ServiceReference[] serviceReferences = new ServiceReference[] {
filterReference
};
ServiceReference[] serviceReferences = {filterReference};

// Mock up the bundle context
BundleContext bundleContext = EasyMock.createNiceMock(BundleContext.class);
@@ -136,9 +134,7 @@ public void testFilterChain() throws Exception {
// Mock up the service references
ServiceReference filterReference = EasyMock.createNiceMock(ServiceReference.class);
EasyMock.replay(filterReference);
ServiceReference[] serviceReferences = new ServiceReference[] {
filterReference, filterReference
};
ServiceReference[] serviceReferences = {filterReference, filterReference};

// Mock up the bundle context
BundleContext bundleContext = EasyMock.createNiceMock(BundleContext.class);
@@ -173,9 +169,7 @@ public void testAllowRequest() throws Exception {
// Mock up the service references
ServiceReference filterReference = EasyMock.createNiceMock(ServiceReference.class);
EasyMock.replay(filterReference);
ServiceReference[] serviceReferences = new ServiceReference[] {
filterReference
};
ServiceReference[] serviceReferences = {filterReference};

// Mock up the bundle context
BundleContext bundleContext = EasyMock.createNiceMock(BundleContext.class);

0 comments on commit 6818159

Please sign in to comment.