Skip to content

Commit

Permalink
feat(TCOMP-2408): check style fixe.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypiel-talend committed Jun 10, 2024
1 parent 13ea702 commit 661d858
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ public ComponentException(final Throwable cause) {

/**
* Transform all specific cause exceptions to Exception class.
*
* @param t
* @return An exception of type java.lang.Exception.
*/
private Exception transformException(Throwable t) {
private Exception transformException(final Throwable t) {
Exception cause = null;
if (t.getCause() != null) {
cause = transformException(t.getCause());
Expand All @@ -89,5 +90,4 @@ private Exception transformException(Throwable t) {
return e;
}


}
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright (C) 2006-2023 Talend Inc. - www.talend.com
*
* 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.talend.sdk.component.api.exception;

import org.junit.jupiter.api.Assertions;
Expand All @@ -8,9 +23,10 @@
class ComponentExceptionTest {

@Test
public void testTypedCauseExceptionTransformation(){
public void testTypedCauseExceptionTransformation() {
IndexOutOfBoundsException indexOutOfBoundsException = new IndexOutOfBoundsException("AAA");
IllegalArgumentException illegalArgumentException = new IllegalArgumentException("BBB", indexOutOfBoundsException);
IllegalArgumentException illegalArgumentException =
new IllegalArgumentException("BBB", indexOutOfBoundsException);
IllegalStateException illegalStateException = new IllegalStateException("CCC", illegalArgumentException);

ComponentException componentException = new ComponentException("DDD", illegalStateException);
Expand Down

0 comments on commit 661d858

Please sign in to comment.