Skip to content
Permalink
Browse files
Remove leading whitespace
  • Loading branch information
Amichai Rothman committed May 28, 2019
1 parent 230db05 commit 5c1e2c963efca73af157339532a68e08f44e7075
Showing 50 changed files with 105 additions and 105 deletions.
@@ -10,9 +10,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -27,7 +27,7 @@
<suppress checks=".*"
files=".+[\\\/]build[\\\/]src[\\\/].+\.java"
/>

<suppress checks=".*"
files=".+[\\\/]contrib[\\\/].+\.java"
/>
@@ -7,9 +7,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,14 +25,14 @@
Checks to make sure the code meets the CXF coding guidelines which
are similar to the Sun guidelines at:
http://java.sun.com/docs/codeconv/index.html
It also enforces aa bunch of other "BestPractices like method
lengths, if/try depths, etc...
-->

<module name="Checker">
<property name="severity" value="error"/>

<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<!--
@@ -32,7 +32,7 @@ public ServerEndpoint(EndpointDescription desc, Server server) {
this.desc = desc;
this.server = server;
}

public Server getServer() {
return this.server;
}
@@ -29,7 +29,7 @@ public interface IntentManager {
Set<String> getExported(Map<String, Object> sd);

Set<String> getImported(Map<String, Object> sd);

List<Object> getRequiredIntents(Set<String> requiredIntents);

<T> List<T> getIntents(Class<? extends T> type, List<Object> intents);
@@ -81,7 +81,7 @@ private String getName(ServiceReference<Object> reference) {
};
tracker.open();
}

@Deactivate
public void deactivate() {
tracker.close();
@@ -123,7 +123,7 @@ public synchronized List<Object> getRequiredIntents(Set<String> requiredIntents)
}
return intents;
}

public <T> T getIntent(Class<? extends T> type, List<Object> intents) {
List<T> selectedIntents = getIntents(type, intents);
if (selectedIntents.isEmpty()) {
@@ -134,7 +134,7 @@ public <T> T getIntent(Class<? extends T> type, List<Object> intents) {
}
return (T)selectedIntents.iterator().next();
}

public <T> List<T> getIntents(Class<? extends T> type, List<Object> intents) {
List<T> result = new ArrayList<T>();
for (Object intent : intents) {
@@ -162,7 +162,7 @@ public synchronized String[] assertAllIntentsSupported(Set<String> requiredInten
LOG.debug(msg, Arrays.toString(unsupportedIntents.toArray()), remainingSeconds);
}
}

try {
wait(1000);
} catch (InterruptedException e) {
@@ -188,7 +188,7 @@ private synchronized Set<String> getMissingIntents(Collection<String> requiredIn
}
return unsupportedIntents;
}

public Set<String> getExported(Map<String, Object> sd) {
Set<String> allIntents = new HashSet<String>();
Collection<String> intents = PropertyHelper
@@ -199,7 +199,7 @@ public Set<String> getExported(Map<String, Object> sd) {
allIntents.addAll(parseIntents(intents2));
return allIntents;
}

public List<Object> getIntentsFromService(Object serviceBean) {
List<Object> intents = new ArrayList<>();
if (serviceBean instanceof IntentsProvider) {
@@ -217,12 +217,12 @@ public List<Object> getIntentsFromService(Object serviceBean) {
}
return intents;
}

public Set<String> getImported(Map<String, Object> sd) {
Collection<String> intents = PropertyHelper.getMultiValueProperty(sd.get(RemoteConstants.SERVICE_INTENTS));
return new HashSet<String>(intents);
}

private static Collection<String> parseIntents(Collection<String> intents) {
List<String> parsed = new ArrayList<String>();
for (String intent : intents) {
@@ -29,11 +29,11 @@
public class ExceptionMapper {
private static final String REMOTE_EXCEPTION_TYPE = "REMOTE";
private Map<Method, Set<Class<?>>> exceptionsMap = new HashMap<Method, Set<Class<?>>>();

public ExceptionMapper(Class<?> iType) {
introspectTypeForExceptions(iType);
}

public Throwable mapException(Method m, Throwable ex) throws Throwable {
Throwable cause = ex.getCause() == null ? ex : ex.getCause();
Set<Class<?>> excTypes = exceptionsMap.get(m);
@@ -49,7 +49,7 @@ public Throwable mapException(Method m, Throwable ex) throws Throwable {
}
return new ServiceException(REMOTE_EXCEPTION_TYPE, ex);
}

private void introspectTypeForExceptions(Class<?> iType) {
for (Method m : iType.getDeclaredMethods()) {
addExceptions(m);
@@ -34,7 +34,7 @@ public void testIntentsFromFeatureAnn() {
Object feature = intents.iterator().next();
Assert.assertEquals(GZIPFeature.class, feature.getClass());
}

@Test
public void testIntentsFromIntentsProvider() {
IntentManagerImpl im = new IntentManagerImpl();
@@ -82,11 +82,11 @@ public void testException() throws IOException {
MySubService proxy = ProxyFactory.create(new MyServiceImpl(), MySubService.class);
proxy.throwException2();
}

@Test(expected = IOException.class)
public void testInheritedException() throws IOException {
MySubService proxy = ProxyFactory.create(new MyServiceImpl(), MySubService.class);
proxy.throwException1();
}

}
@@ -44,7 +44,7 @@ public class ServiceDecoratorImpl implements ServiceDecorator {
public ServiceDecoratorImpl() {
parser = new DecorationParser();
}

public void decorate(ServiceReference<?> sref, Map<String, Object> target) {
for (Rule matcher : decorations) {
matcher.apply(sref, target);
@@ -52,7 +52,7 @@ void removeDecorations(Bundle bundle) {

Bundle b = EasyMock.createMock(Bundle.class);
EasyMock.replay(b);

ServiceDecoratorBundleListener listener = new ServiceDecoratorBundleListener(serviceDecorator);

assertEquals("Precondition failed", 0, called.size());
@@ -143,7 +143,7 @@ public void testAddDecorations7() {

assertDecorate(serviceProps, EMPTY, RES_SD_1);
}

private void assertDecorate(final Map<String, Object> serviceProps,
Map<String, Object> expected, URL... resources) {
Map<String, Object> actual = testDecorate(serviceProps, resources);
@@ -19,7 +19,7 @@
<feature>cxf-databinding-aegis</feature>
<bundle>mvn:${project.groupId}/cxf-dosgi-provider-ws/${project.version}</bundle>
</feature>

<feature name="cxf-dosgi-provider-rs" version="${project.version}">
<feature>cxf-dosgi-common</feature>
<feature>cxf-jaxrs</feature>
@@ -264,7 +264,7 @@
</execution>
</executions>
</plugin>

<!-- Unzip the archive created by bnd export plugin. To then repackage it in the assembly phase -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -16,7 +16,7 @@
<version>${aries.rsa.version}</version>
<type>pom</type>
</dependency>

<!-- Workaround for missing dependency in rsa repo -->
<dependency>
<groupId>org.fusesource.jansi</groupId>
@@ -32,11 +32,11 @@
<artifactId>cxf-dosgi-itests-multibundle</artifactId>
<packaging>jar</packaging>
<name>CXF DOSGi Integration Tests Multi-Bundle</name>

<properties>
<topDirectoryLocation>../..</topDirectoryLocation>
</properties>

<!--
When changing code make sure to run the distro before testing
or you will be testing the old code.
@@ -82,7 +82,7 @@
<artifactId>pax-exam-link-mvn</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
@@ -152,7 +152,7 @@
</exclusion>
</exclusions>
</dependency>

<!-- Samples -->
<dependency>
<groupId>org.apache.cxf.dosgi.samples</groupId>
@@ -206,7 +206,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>depends-maven-plugin</artifactId>
@@ -220,7 +220,7 @@
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
@@ -59,19 +59,19 @@ public class AbstractDosgiTest {
static final String HTTP_HOST = "localhost"; // can specify specific bound IP
static final String HTTP_BASE_URI = "http://" + HTTP_HOST + ":" + HTTP_PORT;
private static final int TIMEOUT = 20;

@Inject
BundleContext bundleContext;

@BeforeClass
public static void log() {
System.out.println("-----------------------------------------------------------------");
}

public <T> T tryTo(String message, Callable<T> func) throws TimeoutException {
return tryTo(message, func, 5000);
}

public <T> T tryTo(String message, Callable<T> func, long timeout) throws TimeoutException {
Throwable lastException = null;
long startTime = System.currentTimeMillis();
@@ -256,7 +256,7 @@ protected static Option configZKServer() {
.put("clientPort", "" + ZK_PORT) //
.asOption();
}

protected static Option configLogging() {
return ConfigurationAdminOptions.configurationFolder(new File("src/test/resources/cfg"));
}
@@ -265,7 +265,7 @@ protected static MavenArtifactProvisionOption taskServiceAPI() {
return mavenBundle().groupId("org.apache.cxf.dosgi.samples")
.artifactId("cxf-dosgi-samples-soap-api").versionAsInProject();
}

protected static MavenArtifactProvisionOption taskServiceImpl() {
return mavenBundle().groupId("org.apache.cxf.dosgi.samples")
.artifactId("cxf-dosgi-samples-soap-impl").versionAsInProject();
@@ -296,7 +296,7 @@ protected static Option basicTestOptions() throws Exception {

mavenBundle("org.ops4j.pax.tinybundles", "tinybundles").versionAsInProject(),
mavenBundle("biz.aQute.bnd", "biz.aQute.bndlib").versionAsInProject(),

systemProperty("org.osgi.service.http.port").value("" + HTTP_PORT),
systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), //
systemProperty("pax.exam.osgi.unresolved.fail").value("true"), //
@@ -61,7 +61,7 @@ public Task call() throws Exception {
return taskService.get(1);
}
});

Assert.assertEquals("changed", task.getTitle());
}

@@ -38,11 +38,11 @@
@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class TestExportPolicy extends AbstractDosgiTest {

@Inject
@Filter("(name=cxf)")
ExportPolicy policy;

@Configuration
public static Option[] configure() throws Exception {
return new Option[] //
@@ -50,7 +50,7 @@ public class TestExportService extends AbstractDosgiTest {

private static final String SERVICE_URI = HTTP_BASE_URI + "/cxf/taskservice";
private static final String REST_SERVICE_URI = HTTP_BASE_URI + "/cxf/tasks";

private static final String GREETER_ZOOKEEPER_NODE = //
"/osgi/service_registry/http:##localhost:8181#cxf#taskservice";

@@ -76,7 +76,7 @@ public void testSOAPCall() throws Exception {
Task task = taskService.get(1);
Assert.assertEquals("Buy some coffee", task.getTitle());
}

@Test
public void testRESTCall() throws Exception {
waitWebPage(REST_SERVICE_URI);
@@ -94,7 +94,7 @@ public org.apache.cxf.dosgi.samples.rest.Task call() throws Exception {
String swaggerJson = swaggerClient.get(String.class);
Assert.assertEquals("{\"swagger\":\"2.0\"", swaggerJson.substring(0, 16));
}

@Test
public void testDiscoveryExport() throws Exception {
ZooKeeper zk = createZookeeperClient();
@@ -112,7 +112,7 @@ public Document call() throws Exception {
return db.parse(wsdlURL.openStream());
}
});

Element el = doc.getDocumentElement();
Assert.assertEquals("definitions", el.getLocalName());
Assert.assertEquals("http://schemas.xmlsoap.org/wsdl/", el.getNamespaceURI());

0 comments on commit 5c1e2c9

Please sign in to comment.