Skip to content

Commit

Permalink
Apply formatting rules to the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Feb 25, 2024
1 parent c428ca3 commit b776dd3
Show file tree
Hide file tree
Showing 3,773 changed files with 18,872 additions and 17,821 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 6 additions & 3 deletions api/src/main/java/org/jboss/cdi/tck/api/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public interface Configuration {
public void setEl(EL el);

/**
* 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
* 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
* directory will be added to the deployed artifact.
*
* By default no directory is used.
Expand All @@ -116,7 +117,8 @@ public interface Configuration {
public void setLibraryDirectory(String libraryDir);

/**
* 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
* 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
* <code>persistence</code>.
*
* @return the JNDI name of the test datasource
Expand Down Expand Up @@ -163,7 +165,8 @@ public interface Configuration {
public void setTestJmsTopic(String testJmsTopic);

/**
* 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
* 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
* according to the testing runtime performance and throughput.
*
* @return the test timeout factor (in percent)
Expand Down
116 changes: 58 additions & 58 deletions api/src/main/java/org/jboss/cdi/tck/spi/Beans.java
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
/*
* Copyright 2010, Red Hat, Inc., and individual contributors
*
* Licensed 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 KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.cdi.tck.spi;

import java.io.IOException;

/**
* Provides Bean related operations.
*
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
*
* This interface may be removed.
*
* @author Shane Bryzak
* @author Pete Muir
* @author David Allen
*
*/
public interface Beans {

public static final String PROPERTY_NAME = Beans.class.getName();

/**
* Determines if the object instance is actually a proxy object.
*
* @param instance The object which might be a proxy
* @return true if the object is a proxy
*/
public boolean isProxy(Object instance);

/**
* Passivates the object tree starting with the bean instance provided.
*
* @param instance The bean instance to serialize
* @return the serialized byte array of the bean instance
*/
public byte[] passivate(Object instance) throws IOException;

/**
* Activates a bean instance from the given serialized bytes.
*
* @param bytes The serialized byte stream of a bean instance
* @return the serialized byte array of the bean instance
*/
public Object activate(byte[] bytes) throws IOException, ClassNotFoundException;

}
/*
* Copyright 2010, Red Hat, Inc., and individual contributors
*
* Licensed 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 KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.cdi.tck.spi;

import java.io.IOException;

/**
* Provides Bean related operations.
*
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
*
* This interface may be removed.
*
* @author Shane Bryzak
* @author Pete Muir
* @author David Allen
*
*/
public interface Beans {

public static final String PROPERTY_NAME = Beans.class.getName();

/**
* Determines if the object instance is actually a proxy object.
*
* @param instance The object which might be a proxy
* @return true if the object is a proxy
*/
public boolean isProxy(Object instance);

/**
* Passivates the object tree starting with the bean instance provided.
*
* @param instance The bean instance to serialize
* @return the serialized byte array of the bean instance
*/
public byte[] passivate(Object instance) throws IOException;

/**
* Activates a bean instance from the given serialized bytes.
*
* @param bytes The serialized byte stream of a bean instance
* @return the serialized byte array of the bean instance
*/
public Object activate(byte[] bytes) throws IOException, ClassNotFoundException;

}
148 changes: 74 additions & 74 deletions api/src/main/java/org/jboss/cdi/tck/spi/Contexts.java
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
/*
* Copyright 2010, Red Hat, Inc., and individual contributors
*
* Licensed 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 KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.cdi.tck.spi;

import jakarta.enterprise.context.spi.Context;

/**
* This interface provides operations relating to Contexts.
*
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
*
* @author Shane Bryzak
* @author Pete Muir
*
* @param <T> The concrete context type of the implementation
*
*/
public interface Contexts<T extends Context> {

public static final String PROPERTY_NAME = Contexts.class.getName();

/**
* Sets the specified context as active.
* <p>
* The set of existing contextual instances of the context is preserved
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
*
* @param context The context to set active
*/
public void setActive(T context);

/**
* Sets the specified context as inactive.
* <p>
* The set of existing contextual instances of the context is preserved
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
*
* @param context The context to set inactive
*/
public void setInactive(T context);

/**
* Get the request context, regardless of whether it is active or not
*
* @return The request context
*/
public T getRequestContext();

/**
* Returns the dependent context, regardless of whether it is active or not
*
* @return the dependent context
*/
public T getDependentContext();

/**
* Destroy the context. This operation is defined by the CDI specification but has no API.
*
* @param context the context to destroy
*/
public void destroyContext(T context);

}
/*
* Copyright 2010, Red Hat, Inc., and individual contributors
*
* Licensed 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 KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.cdi.tck.spi;

import jakarta.enterprise.context.spi.Context;

/**
* This interface provides operations relating to Contexts.
*
* The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
*
* @author Shane Bryzak
* @author Pete Muir
*
* @param <T> The concrete context type of the implementation
*
*/
public interface Contexts<T extends Context> {

public static final String PROPERTY_NAME = Contexts.class.getName();

/**
* Sets the specified context as active.
* <p>
* The set of existing contextual instances of the context is preserved
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
*
* @param context The context to set active
*/
public void setActive(T context);

/**
* Sets the specified context as inactive.
* <p>
* The set of existing contextual instances of the context is preserved
* across invocations of {@link #setActive(Context)} and {@link #setInactive(Context)}.
*
* @param context The context to set inactive
*/
public void setInactive(T context);

/**
* Get the request context, regardless of whether it is active or not
*
* @return The request context
*/
public T getRequestContext();

/**
* Returns the dependent context, regardless of whether it is active or not
*
* @return the dependent context
*/
public T getDependentContext();

/**
* Destroy the context. This operation is defined by the CDI specification but has no API.
*
* @param context the context to destroy
*/
public void destroyContext(T context);

}
3 changes: 2 additions & 1 deletion api/src/main/java/org/jboss/cdi/tck/spi/EL.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public interface EL {
* @param expectedParamTypes
* @return
*/
public <T> T evaluateMethodExpression(BeanManager beanManager, String expression, Class<T> expectedType, Class<?>[] expectedParamTypes,
public <T> T evaluateMethodExpression(BeanManager beanManager, String expression, Class<T> expectedType,
Class<?>[] expectedParamTypes,
Object[] expectedParams);

/**
Expand Down
2 changes: 1 addition & 1 deletion ext-lib/src/main/java/org/jboss/cdi/tck/extlib/Strict.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 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,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 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,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 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,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Expand All @@ -18,7 +18,7 @@
@Strict
@Dependent
public class Translator {

public String echo(String text) {
return text;
}
Expand Down
6 changes: 3 additions & 3 deletions impl/src/main/java/org/jboss/cdi/tck/AbstractTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ protected <T> Set<Bean<T>> getBeans(TypeLiteral<T> type, Annotation... bindings)
}

protected <T> T getContextualReference(Class<T> beanType, Annotation... qualifiers) {
return BeanLookupUtils.<T>getContextualReference(getCurrentManager(), beanType, qualifiers);
return BeanLookupUtils.<T> getContextualReference(getCurrentManager(), beanType, qualifiers);
}

protected <T> T getContextualReference(TypeLiteral<T> beanType, Annotation... qualifiers) {
return BeanLookupUtils.<T>getContextualReference(getCurrentManager(), beanType, qualifiers);
return BeanLookupUtils.<T> getContextualReference(getCurrentManager(), beanType, qualifiers);
}

protected <T> T getContextualReference(String name, Class<T> beanType) {
return BeanLookupUtils.<T>getContextualReference(getCurrentManager(), name, beanType);
return BeanLookupUtils.<T> getContextualReference(getCurrentManager(), name, beanType);
}

protected <T> DependentInstance<T> newDependentInstance(Class<T> beanType, Annotation... qualifiers) {
Expand Down
14 changes: 7 additions & 7 deletions impl/src/main/java/org/jboss/cdi/tck/TestGroups.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ public final class TestGroups {

/**
* Requires following mapping of roles to principals:
* --------------------------------
* | Principal | Group |
* --------------------------------
* | student | student |
* | alarm | student, alarm |
* | printer | printer |
* --------------------------------
* --------------------------------
* | Principal | Group |
* --------------------------------
* | student | student |
* | alarm | student, alarm |
* | printer | printer |
* --------------------------------
*/
public static final String SECURITY = "security";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public int getTestTimeoutFactor() {

@Override
public void setTestTimeoutFactor(int timeoutFactor) {
if(timeoutFactor <= 0) {
if (timeoutFactor <= 0) {
throw new IllegalArgumentException("Test timeout factor must be greater than zero");
}
this.testTimeoutFactor = timeoutFactor;
Expand Down
Loading

0 comments on commit b776dd3

Please sign in to comment.