From b08b86243c9def85df47a2a46a47126027af5a04 Mon Sep 17 00:00:00 2001 From: Santiago Pericasgeertsen Date: Mon, 14 Sep 2020 17:03:47 -0400 Subject: [PATCH] Limit module visibility by making several classes package private (#2359) * Limit module visibility by making several classes package private. None of these classes should be used directly by Helidon applications. Signed-off-by: Santiago Pericasgeertsen * Removed public from constructors and fixed copyrights. Signed-off-by: Santiago Pericasgeertsen --- .../microprofile/faulttolerance/AsynchronousAntn.java | 6 +++--- .../helidon/microprofile/faulttolerance/BulkheadAntn.java | 6 +++--- .../microprofile/faulttolerance/CircuitBreakerAntn.java | 4 ++-- .../helidon/microprofile/faulttolerance/CommandBinding.java | 4 ++-- .../microprofile/faulttolerance/CommandInterceptor.java | 2 +- .../helidon/microprofile/faulttolerance/FallbackAntn.java | 4 ++-- .../microprofile/faulttolerance/LiteralCommandBinding.java | 4 ++-- .../io/helidon/microprofile/faulttolerance/MethodAntn.java | 6 +++--- .../helidon/microprofile/faulttolerance/MethodInvoker.java | 4 ++-- .../io/helidon/microprofile/faulttolerance/RetryAntn.java | 6 +++--- .../io/helidon/microprofile/faulttolerance/TimeoutAntn.java | 6 +++--- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/AsynchronousAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/AsynchronousAntn.java index 87818ba6532..cb27c5da690 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/AsynchronousAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/AsynchronousAntn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ /** * Class AsynchronousAntn. */ -public class AsynchronousAntn extends MethodAntn implements Asynchronous { +class AsynchronousAntn extends MethodAntn implements Asynchronous { /** * Constructor. @@ -34,7 +34,7 @@ public class AsynchronousAntn extends MethodAntn implements Asynchronous { * @param beanClass Bean class. * @param method The method. */ - public AsynchronousAntn(Class beanClass, Method method) { + AsynchronousAntn(Class beanClass, Method method) { super(beanClass, method); } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/BulkheadAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/BulkheadAntn.java index c7eff4cf0a4..83faf08d9ff 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/BulkheadAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/BulkheadAntn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ /** * Class BulkheadAntn. */ -public class BulkheadAntn extends MethodAntn implements Bulkhead { +class BulkheadAntn extends MethodAntn implements Bulkhead { /** * Constructor. @@ -32,7 +32,7 @@ public class BulkheadAntn extends MethodAntn implements Bulkhead { * @param beanClass Bean class. * @param method The method. */ - public BulkheadAntn(Class beanClass, Method method) { + BulkheadAntn(Class beanClass, Method method) { super(beanClass, method); } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CircuitBreakerAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CircuitBreakerAntn.java index a16457e95c0..db6c7ace928 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CircuitBreakerAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CircuitBreakerAntn.java @@ -25,7 +25,7 @@ /** * Class CircuitBreakerAntn. */ -public class CircuitBreakerAntn extends MethodAntn implements CircuitBreaker { +class CircuitBreakerAntn extends MethodAntn implements CircuitBreaker { /** * Constructor. @@ -33,7 +33,7 @@ public class CircuitBreakerAntn extends MethodAntn implements CircuitBreaker { * @param beanClass The bean class. * @param method The method. */ - public CircuitBreakerAntn(Class beanClass, Method method) { + CircuitBreakerAntn(Class beanClass, Method method) { super(beanClass, method); } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandBinding.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandBinding.java index e2b75f6059b..9d769200d7e 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandBinding.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,5 +35,5 @@ @Retention(RUNTIME) @Documented @InterceptorBinding -public @interface CommandBinding { +@interface CommandBinding { } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandInterceptor.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandInterceptor.java index 89223f920ab..b9f5db93ad0 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandInterceptor.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/CommandInterceptor.java @@ -29,7 +29,7 @@ @Interceptor @CommandBinding @Priority(Interceptor.Priority.PLATFORM_AFTER + 10) -public class CommandInterceptor { +class CommandInterceptor { private static final Logger LOGGER = Logger.getLogger(CommandInterceptor.class.getName()); diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/FallbackAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/FallbackAntn.java index e39a2df4c0e..0afb9fd26b3 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/FallbackAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/FallbackAntn.java @@ -26,7 +26,7 @@ /** * Class FallbackAntn. */ -public class FallbackAntn extends MethodAntn implements Fallback { +class FallbackAntn extends MethodAntn implements Fallback { /** * Constructor. @@ -34,7 +34,7 @@ public class FallbackAntn extends MethodAntn implements Fallback { * @param beanClass Bean class. * @param method The method. */ - public FallbackAntn(Class beanClass, Method method) { + FallbackAntn(Class beanClass, Method method) { super(beanClass, method); } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/LiteralCommandBinding.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/LiteralCommandBinding.java index 77cde33c3a6..4c42fec6433 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/LiteralCommandBinding.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/LiteralCommandBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ /** * Class LiteralCommandBinding. */ -public class LiteralCommandBinding extends AnnotationLiteral implements CommandBinding { +class LiteralCommandBinding extends AnnotationLiteral implements CommandBinding { private static final long serialVersionUID = 1L; private static final CommandBinding INSTANCE = new LiteralCommandBinding(); diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodAntn.java index 85b17fac089..db40b53c10c 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodAntn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ /** * Class MethodAntn. */ -public abstract class MethodAntn { +abstract class MethodAntn { private static final Logger LOGGER = Logger.getLogger(MethodAntn.class.getName()); private final Method method; @@ -72,7 +72,7 @@ public A getAnnotation() { * @param beanClass Bean class. * @param method The method. */ - public MethodAntn(Class beanClass, Method method) { + MethodAntn(Class beanClass, Method method) { this.beanClass = beanClass; this.method = method; } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodInvoker.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodInvoker.java index bc5c29affdd..3268183bd38 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodInvoker.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/MethodInvoker.java @@ -90,7 +90,7 @@ * of this class is created for each method invocation. Some state is shared across * all invocations of a method, including for circuit breakers and bulkheads. */ -public class MethodInvoker implements FtSupplier { +class MethodInvoker implements FtSupplier { private static final Logger LOGGER = Logger.getLogger(MethodInvoker.class.getName()); /** @@ -283,7 +283,7 @@ public boolean cancel(boolean mayInterruptIfRunning) { * @param context The invocation context. * @param introspector The method introspector. */ - public MethodInvoker(InvocationContext context, MethodIntrospector introspector) { + MethodInvoker(InvocationContext context, MethodIntrospector introspector) { this.context = context; this.introspector = introspector; this.method = context.getMethod(); diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/RetryAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/RetryAntn.java index c335607912d..6cc987136aa 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/RetryAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/RetryAntn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ /** * Class RetryAntn. */ -public class RetryAntn extends MethodAntn implements Retry { +class RetryAntn extends MethodAntn implements Retry { /** * Constructor. @@ -33,7 +33,7 @@ public class RetryAntn extends MethodAntn implements Retry { * @param beanClass Bean class. * @param method The method. */ - public RetryAntn(Class beanClass, Method method) { + RetryAntn(Class beanClass, Method method) { super(beanClass, method); } diff --git a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/TimeoutAntn.java b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/TimeoutAntn.java index 862c84aa33f..50ad125479a 100644 --- a/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/TimeoutAntn.java +++ b/microprofile/fault-tolerance/src/main/java/io/helidon/microprofile/faulttolerance/TimeoutAntn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ /** * Class TimeoutAntn. */ -public class TimeoutAntn extends MethodAntn implements Timeout { +class TimeoutAntn extends MethodAntn implements Timeout { /** * Constructor. @@ -33,7 +33,7 @@ public class TimeoutAntn extends MethodAntn implements Timeout { * @param beanClass Bean class. * @param method The method. */ - public TimeoutAntn(Class beanClass, Method method) { + TimeoutAntn(Class beanClass, Method method) { super(beanClass, method); }