Skip to content

Commit 94e5a66

Browse files
author
vsilaev
committed
Fix formatting
1 parent 82eeed8 commit 94e5a66

File tree

46 files changed

+399
-433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+399
-433
lines changed

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/Execution.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public class Execution implements Runnable {
2929

3030
@LoggableMethod
3131
public @continuable void run() {
32-
String[] array = new String[]{"A", "B", "C"};
32+
String[] array = new String[] {"A", "B", "C"};
3333
for (int i = 0; i < array.length; i++) {
3434
System.out.println("Execution " + i);
3535
invokeDependent(array[i]);
3636
}
3737
}
38-
39-
protected @continuable void invokeDependent(final String value) {
40-
target.execute(value);
38+
39+
protected @continuable void invokeDependent(String value) {
40+
target.execute(value);
4141
}
4242
}

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/OWBApplication.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,39 @@
2525

2626
public class OWBApplication {
2727

28-
@Inject
28+
@Inject
2929
Execution execution;
3030

3131
public void run() {
3232
int i = 0;
3333
for (Continuation cc = Continuation.startWith(execution); null != cc; cc = cc.resume(i += 100)) {
3434
System.out.println("SUSPENDED " + cc.value());
3535
}
36-
36+
3737
System.out.println("===");
3838
}
39-
40-
public static void main(final String[] argv) throws Exception {
39+
40+
public static void main(String[] argv) throws Exception {
4141
boot(null);
4242
try {
4343
BeanManager beanManager = lifecycle.getBeanManager();
4444
Bean<?> bean = beanManager.getBeans(OWBApplication.class).iterator().next();
45-
OWBApplication app = (OWBApplication)lifecycle.getBeanManager().getReference(bean, OWBApplication.class, beanManager.createCreationalContext(bean));
45+
OWBApplication app = (OWBApplication) lifecycle.getBeanManager().getReference(
46+
bean, OWBApplication.class, beanManager.createCreationalContext(bean)
47+
);
4648
app.run();
4749
} finally {
4850
shutdown(null);
4951
}
5052
}
51-
53+
5254
private static ContainerLifecycle lifecycle = null;
53-
55+
5456
private static void boot(Object startupObject) throws Exception {
5557
lifecycle = WebBeansContext.getInstance().getService(ContainerLifecycle.class);
5658
lifecycle.startApplication(startupObject);
5759
}
58-
60+
5961
private static void shutdown(Object endObject) throws Exception {
6062
lifecycle.stopApplication(endObject);
6163
}

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/TargetClass.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ public class TargetClass implements TargetInterface {
2929

3030
@Override
3131
@TransactionalMethod
32-
public @continuable void execute(final String prefix) {
32+
public @continuable void execute(String prefix) {
3333
executeNested(prefix);
3434
}
3535

3636
@LoggableMethod
37-
protected @continuable void executeNested(final String prefix) {
37+
protected @continuable void executeNested(String prefix) {
3838
System.out.println("In target BEFORE suspend");
39-
final Object value = Continuation.suspend(this + " @ " + prefix);
39+
Object value = Continuation.suspend(this + " @ " + prefix);
4040
System.out.println("In target AFTER suspend: " + value);
4141
}
42-
42+
4343
}

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/annotations/LoggableMethod.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,4 @@
2525
@InterceptorBinding
2626
@Retention(RetentionPolicy.RUNTIME)
2727
@Target({ElementType.TYPE,ElementType.METHOD})
28-
public @interface LoggableMethod {
29-
30-
}
28+
public @interface LoggableMethod {}

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/annotations/SecureBean.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,4 @@
2525
@InterceptorBinding
2626
@Retention(RetentionPolicy.RUNTIME)
2727
@Target({ElementType.TYPE})
28-
public @interface SecureBean {
29-
30-
}
28+
public @interface SecureBean {}

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/annotations/TransactionalMethod.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,4 @@
2525
@InterceptorBinding
2626
@Retention(RetentionPolicy.RUNTIME)
2727
@Target({ElementType.TYPE,ElementType.METHOD})
28-
public @interface TransactionalMethod {
29-
30-
}
28+
public @interface TransactionalMethod {}

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/interceptors/LoggableMethodInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.commons.javaflow.examples.cdi.owb.annotations.LoggableMethod;
2323

2424
@LoggableMethod @Interceptor
25-
public class LoggableMethodInterceptor {
25+
public class LoggableMethodInterceptor {
2626

2727
@AroundInvoke
2828
public Object manageSecurityContext(InvocationContext ctx) throws Exception {

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/interceptors/SecureBeanInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.commons.javaflow.examples.cdi.owb.annotations.SecureBean;
2323

2424
@SecureBean @Interceptor
25-
public class SecureBeanInterceptor {
25+
public class SecureBeanInterceptor {
2626

2727
@AroundInvoke
2828
public Object manageSecurityContext(InvocationContext ctx) throws Exception {

net.tascalate.javaflow.examples-cdi-owb/src/main/java/org/apache/commons/javaflow/examples/cdi/owb/interceptors/TransactionalMethodInterceptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
import org.apache.commons.javaflow.examples.cdi.owb.annotations.TransactionalMethod;
2323

2424
@TransactionalMethod @Interceptor
25-
public class TransactionalMethodInterceptor {
25+
public class TransactionalMethodInterceptor {
2626

2727
@AroundInvoke
2828
public Object manageTransaction(InvocationContext ctx) throws Throwable {
2929
System.out.println("Begin transaction...");
3030
boolean success = true;
3131
try {
3232
return ctx.proceed();
33-
} catch (final Throwable ex) {
33+
} catch (Throwable ex) {
3434
System.out.println("...Rollback transaction");
3535
success = false;
3636
throw ex;

net.tascalate.javaflow.examples-cdi-weld/src/main/java/org/apache/commons/javaflow/examples/cdi/weld/Execution.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ public class Execution implements Runnable {
2727

2828
@Inject
2929
TargetInterface target;
30-
30+
3131
@LoggableMethod
3232
public @continuable void run() {
33-
System.out.println("Target is proxy? " + (target instanceof ProxyObject));
34-
String[] array = new String[]{"A", "B", "C"};
33+
System.out.println("Target is proxy? " + (target instanceof ProxyObject));
34+
String[] array = new String[] {"A", "B", "C"};
3535
for (int i = 0; i < array.length; i++) {
3636
System.out.println("Execution " + i);
3737
invokeDependent(array[i]);
3838
}
3939
}
40-
41-
protected @continuable void invokeDependent(final String value) {
42-
target.execute(value);
40+
41+
protected @continuable void invokeDependent(String value) {
42+
target.execute(value);
4343
}
4444
}

0 commit comments

Comments
 (0)