Skip to content

Commit c047e0d

Browse files
authored
Formatting rules (#548)
* Apply same formatting rules as CDI API uses * Apply formatting rules to the codebase
1 parent ba46fa7 commit c047e0d

File tree

3,776 files changed

+18994
-17823
lines changed

Some content is hidden

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

3,776 files changed

+18994
-17823
lines changed

.github/workflows/ci-actions.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
java-version: ${{ matrix.java }}
2525
- name: "Maven install(staging)"
2626
run: |
27-
mvn clean install -Pstaging -B -V
27+
mvn clean install -Dno-format -Pstaging -B -V
2828
- name: "Maven install"
2929
run: |
30-
mvn clean install -B -V javadoc:javadoc
30+
mvn clean install -Dno-format -B -V javadoc:javadoc

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ target
33
.settings
44
.classpath
55
.idea
6+
.cache
67
*.iml
78

89
test-output

api/src/main/java/org/jboss/cdi/tck/api/Configuration.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public interface Configuration {
104104
public void setEl(EL el);
105105

106106
/**
107-
* The TCK allows additional libraries to be put in the deployed test artifacts (for example the porting package for the implementation). Any jars in this
107+
* The TCK allows additional libraries to be put in the deployed test artifacts (for example the porting package for the
108+
* implementation). Any jars in this
108109
* directory will be added to the deployed artifact.
109110
*
110111
* By default no directory is used.
@@ -116,7 +117,8 @@ public interface Configuration {
116117
public void setLibraryDirectory(String libraryDir);
117118

118119
/**
119-
* Few TCK tests need to work with Java EE services related to persistence (JPA, JTA) - test datasource must be provided. These tests belong to testng group
120+
* Few TCK tests need to work with Java EE services related to persistence (JPA, JTA) - test datasource must be provided.
121+
* These tests belong to testng group
120122
* <code>persistence</code>.
121123
*
122124
* @return the JNDI name of the test datasource
@@ -163,7 +165,8 @@ public interface Configuration {
163165
public void setTestJmsTopic(String testJmsTopic);
164166

165167
/**
166-
* All tests using some timeout technique (e.g. wait for async processing) should use this value to adjust the final timeout so that it's possible to configure timeouts
168+
* All tests using some timeout technique (e.g. wait for async processing) should use this value to adjust the final timeout
169+
* so that it's possible to configure timeouts
167170
* according to the testing runtime performance and throughput.
168171
*
169172
* @return the test timeout factor (in percent)
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
/*
2-
* Copyright 2010, Red Hat, Inc., and individual contributors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
* Unless required by applicable law or agreed to in writing, software
9-
* distributed under the License is distributed on an "AS IS" BASIS,
10-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11-
* See the License for the specific language governing permissions and
12-
* limitations under the License.
13-
*/
14-
package org.jboss.cdi.tck.spi;
15-
16-
import java.io.IOException;
17-
18-
/**
19-
* Provides Bean related operations.
20-
*
21-
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
22-
*
23-
* This interface may be removed.
24-
*
25-
* @author Shane Bryzak
26-
* @author Pete Muir
27-
* @author David Allen
28-
*
29-
*/
30-
public interface Beans {
31-
32-
public static final String PROPERTY_NAME = Beans.class.getName();
33-
34-
/**
35-
* Determines if the object instance is actually a proxy object.
36-
*
37-
* @param instance The object which might be a proxy
38-
* @return true if the object is a proxy
39-
*/
40-
public boolean isProxy(Object instance);
41-
42-
/**
43-
* Passivates the object tree starting with the bean instance provided.
44-
*
45-
* @param instance The bean instance to serialize
46-
* @return the serialized byte array of the bean instance
47-
*/
48-
public byte[] passivate(Object instance) throws IOException;
49-
50-
/**
51-
* Activates a bean instance from the given serialized bytes.
52-
*
53-
* @param bytes The serialized byte stream of a bean instance
54-
* @return the serialized byte array of the bean instance
55-
*/
56-
public Object activate(byte[] bytes) throws IOException, ClassNotFoundException;
57-
58-
}
1+
/*
2+
* Copyright 2010, Red Hat, Inc., and individual contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package org.jboss.cdi.tck.spi;
15+
16+
import java.io.IOException;
17+
18+
/**
19+
* Provides Bean related operations.
20+
*
21+
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
22+
*
23+
* This interface may be removed.
24+
*
25+
* @author Shane Bryzak
26+
* @author Pete Muir
27+
* @author David Allen
28+
*
29+
*/
30+
public interface Beans {
31+
32+
public static final String PROPERTY_NAME = Beans.class.getName();
33+
34+
/**
35+
* Determines if the object instance is actually a proxy object.
36+
*
37+
* @param instance The object which might be a proxy
38+
* @return true if the object is a proxy
39+
*/
40+
public boolean isProxy(Object instance);
41+
42+
/**
43+
* Passivates the object tree starting with the bean instance provided.
44+
*
45+
* @param instance The bean instance to serialize
46+
* @return the serialized byte array of the bean instance
47+
*/
48+
public byte[] passivate(Object instance) throws IOException;
49+
50+
/**
51+
* Activates a bean instance from the given serialized bytes.
52+
*
53+
* @param bytes The serialized byte stream of a bean instance
54+
* @return the serialized byte array of the bean instance
55+
*/
56+
public Object activate(byte[] bytes) throws IOException, ClassNotFoundException;
57+
58+
}
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
/*
2-
* Copyright 2010, Red Hat, Inc., and individual contributors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
* Unless required by applicable law or agreed to in writing, software
9-
* distributed under the License is distributed on an "AS IS" BASIS,
10-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11-
* See the License for the specific language governing permissions and
12-
* limitations under the License.
13-
*/
14-
package org.jboss.cdi.tck.spi;
15-
16-
import jakarta.enterprise.context.spi.Context;
17-
18-
/**
19-
* This interface provides operations relating to Contexts.
20-
*
21-
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
22-
*
23-
* @author Shane Bryzak
24-
* @author Pete Muir
25-
*
26-
* @param <T> The concrete context type of the implementation
27-
*
28-
*/
29-
public interface Contexts<T extends Context> {
30-
31-
public static final String PROPERTY_NAME = Contexts.class.getName();
32-
33-
/**
34-
* Sets the specified context as active.
35-
* <p>
36-
* The set of existing contextual instances of the context is preserved
37-
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
38-
*
39-
* @param context The context to set active
40-
*/
41-
public void setActive(T context);
42-
43-
/**
44-
* Sets the specified context as inactive.
45-
* <p>
46-
* The set of existing contextual instances of the context is preserved
47-
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
48-
*
49-
* @param context The context to set inactive
50-
*/
51-
public void setInactive(T context);
52-
53-
/**
54-
* Get the request context, regardless of whether it is active or not
55-
*
56-
* @return The request context
57-
*/
58-
public T getRequestContext();
59-
60-
/**
61-
* Returns the dependent context, regardless of whether it is active or not
62-
*
63-
* @return the dependent context
64-
*/
65-
public T getDependentContext();
66-
67-
/**
68-
* Destroy the context. This operation is defined by the CDI specification but has no API.
69-
*
70-
* @param context the context to destroy
71-
*/
72-
public void destroyContext(T context);
73-
74-
}
1+
/*
2+
* Copyright 2010, Red Hat, Inc., and individual contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package org.jboss.cdi.tck.spi;
15+
16+
import jakarta.enterprise.context.spi.Context;
17+
18+
/**
19+
* This interface provides operations relating to Contexts.
20+
*
21+
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
22+
*
23+
* @author Shane Bryzak
24+
* @author Pete Muir
25+
*
26+
* @param <T> The concrete context type of the implementation
27+
*
28+
*/
29+
public interface Contexts<T extends Context> {
30+
31+
public static final String PROPERTY_NAME = Contexts.class.getName();
32+
33+
/**
34+
* Sets the specified context as active.
35+
* <p>
36+
* The set of existing contextual instances of the context is preserved
37+
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
38+
*
39+
* @param context The context to set active
40+
*/
41+
public void setActive(T context);
42+
43+
/**
44+
* Sets the specified context as inactive.
45+
* <p>
46+
* The set of existing contextual instances of the context is preserved
47+
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
48+
*
49+
* @param context The context to set inactive
50+
*/
51+
public void setInactive(T context);
52+
53+
/**
54+
* Get the request context, regardless of whether it is active or not
55+
*
56+
* @return The request context
57+
*/
58+
public T getRequestContext();
59+
60+
/**
61+
* Returns the dependent context, regardless of whether it is active or not
62+
*
63+
* @return the dependent context
64+
*/
65+
public T getDependentContext();
66+
67+
/**
68+
* Destroy the context. This operation is defined by the CDI specification but has no API.
69+
*
70+
* @param context the context to destroy
71+
*/
72+
public void destroyContext(T context);
73+
74+
}

api/src/main/java/org/jboss/cdi/tck/spi/EL.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public interface EL {
4747
* @param expectedParamTypes
4848
* @return
4949
*/
50-
public <T> T evaluateMethodExpression(BeanManager beanManager, String expression, Class<T> expectedType, Class<?>[] expectedParamTypes,
50+
public <T> T evaluateMethodExpression(BeanManager beanManager, String expression, Class<T> expectedType,
51+
Class<?>[] expectedParamTypes,
5152
Object[] expectedParams);
5253

5354
/**

ext-lib/src/main/java/org/jboss/cdi/tck/extlib/Strict.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* You may obtain a copy of the License at
77
* http://www.apache.org/licenses/LICENSE-2.0
88
* Unless required by applicable law or agreed to in writing, software
9-
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* distributed under the License is distributed on an "AS IS" BASIS,
1010
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.

ext-lib/src/main/java/org/jboss/cdi/tck/extlib/StrictLiteral.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* You may obtain a copy of the License at
77
* http://www.apache.org/licenses/LICENSE-2.0
88
* Unless required by applicable law or agreed to in writing, software
9-
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* distributed under the License is distributed on an "AS IS" BASIS,
1010
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.

ext-lib/src/main/java/org/jboss/cdi/tck/extlib/Translator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* You may obtain a copy of the License at
77
* http://www.apache.org/licenses/LICENSE-2.0
88
* Unless required by applicable law or agreed to in writing, software
9-
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* distributed under the License is distributed on an "AS IS" BASIS,
1010
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.
@@ -18,7 +18,7 @@
1818
@Strict
1919
@Dependent
2020
public class Translator {
21-
21+
2222
public String echo(String text) {
2323
return text;
2424
}

impl/src/main/java/org/jboss/cdi/tck/AbstractTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,15 @@ protected <T> Set<Bean<T>> getBeans(TypeLiteral<T> type, Annotation... bindings)
170170
}
171171

172172
protected <T> T getContextualReference(Class<T> beanType, Annotation... qualifiers) {
173-
return BeanLookupUtils.<T>getContextualReference(getCurrentManager(), beanType, qualifiers);
173+
return BeanLookupUtils.<T> getContextualReference(getCurrentManager(), beanType, qualifiers);
174174
}
175175

176176
protected <T> T getContextualReference(TypeLiteral<T> beanType, Annotation... qualifiers) {
177-
return BeanLookupUtils.<T>getContextualReference(getCurrentManager(), beanType, qualifiers);
177+
return BeanLookupUtils.<T> getContextualReference(getCurrentManager(), beanType, qualifiers);
178178
}
179179

180180
protected <T> T getContextualReference(String name, Class<T> beanType) {
181-
return BeanLookupUtils.<T>getContextualReference(getCurrentManager(), name, beanType);
181+
return BeanLookupUtils.<T> getContextualReference(getCurrentManager(), name, beanType);
182182
}
183183

184184
protected <T> DependentInstance<T> newDependentInstance(Class<T> beanType, Annotation... qualifiers) {

impl/src/main/java/org/jboss/cdi/tck/TestGroups.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ public final class TestGroups {
8787

8888
/**
8989
* Requires following mapping of roles to principals:
90-
* --------------------------------
91-
* | Principal | Group |
92-
* --------------------------------
93-
* | student | student |
94-
* | alarm | student, alarm |
95-
* | printer | printer |
96-
* --------------------------------
90+
* --------------------------------
91+
* | Principal | Group |
92+
* --------------------------------
93+
* | student | student |
94+
* | alarm | student, alarm |
95+
* | printer | printer |
96+
* --------------------------------
9797
*/
9898
public static final String SECURITY = "security";
9999

0 commit comments

Comments
 (0)