Resolves checkstyle errors for patterns starting with letter r (#1072)

* Reduces checkstyle errors in reactor

* Reduces checkstyle errors in reader-writer-lock

* Reduces checkstyle errors in repository

* Reduces checkstyle errors in resource-acquisition-is-initialization

* Reduces checkstyle errors in retry
This commit is contained in:
Anurag Agarwal
2019-11-10 23:12:26 +05:30
committed by Ilkka Seppälä
parent 4dae1fae57
commit 9c8ad4485b
31 changed files with 345 additions and 377 deletions

View File

@@ -27,31 +27,30 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* Resource Acquisition Is Initialization pattern was developed for exception safe resource
* management by C++ creator Bjarne Stroustrup.
* <p>
* In RAII resource is tied to object lifetime: resource allocation is done during object creation
* while resource deallocation is done during object destruction.
* <p>
* In Java RAII is achieved with try-with-resources statement and interfaces {@link java.io.Closeable} and
* {@link AutoCloseable}. The try-with-resources statement ensures that each resource is closed at
* the end of the statement. Any object that implements {@link java.lang.AutoCloseable}, which
* includes all objects which implement {@link java.io.Closeable}, can be used as a resource.
*
* In this example, {@link SlidingDoor} implements {@link AutoCloseable} and {@link TreasureChest}
* implements {@link java.io.Closeable}. Running the example, we can observe that both resources are
* automatically closed.
* <p>
* http://docs.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html
* <p>In RAII resource is tied to object lifetime: resource allocation is done during object
* creation while resource deallocation is done during object destruction.
*
* <p>In Java RAII is achieved with try-with-resources statement and interfaces {@link
* java.io.Closeable} and {@link AutoCloseable}. The try-with-resources statement ensures that each
* resource is closed at the end of the statement. Any object that implements {@link
* java.lang.AutoCloseable}, which includes all objects which implement {@link java.io.Closeable},
* can be used as a resource.
*
* <p>In this example, {@link SlidingDoor} implements {@link AutoCloseable} and {@link
* TreasureChest} implements {@link java.io.Closeable}. Running the example, we can observe that
* both resources are automatically closed.
*
* <p>http://docs.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html
*/
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program entry point
* Program entry point.
*/
public static void main(String[] args) throws Exception {

View File

@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* SlidingDoor resource
*
* SlidingDoor resource.
*/
public class SlidingDoor implements AutoCloseable {

View File

@@ -23,16 +23,13 @@
package com.iluwatar.resource.acquisition.is.initialization;
import java.io.Closeable;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Closeable;
import java.io.IOException;
/**
*
* TreasureChest resource
*
* TreasureChest resource.
*/
public class TreasureChest implements Closeable {