Skip to content

Commit

Permalink
Change the top-level package to reactor.blockhound.
Browse files Browse the repository at this point in the history
To be more Jigsaw friendly, we should clearly define the top level
package for each Reactor's sub-project.
`reactor.BlockHound` class breaks this, and should be moved to a
dedicated package (`reactor.blockhound`)

See reactor/reactor#667
  • Loading branch information
bsideup committed Apr 29, 2019
1 parent ed911d6 commit 07dbf59
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package reactor;
package reactor.blockhound;

import org.objectweb.asm.*;
import org.objectweb.asm.commons.GeneratorAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package reactor;
package reactor.blockhound;

import net.bytebuddy.agent.ByteBuddyAgent;
import reactor.blockhound.integration.BlockHoundIntegration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package reactor;
package reactor.blockhound;

import java.util.function.Consumer;
import java.util.function.Predicate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package reactor;
package reactor.blockhound;

import static org.objectweb.asm.Opcodes.ACC_STATIC;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package reactor;
package reactor.blockhound;

import java.io.File;
import java.io.FileOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package reactor.blockhound.integration;

import reactor.BlockHound;
import reactor.blockhound.BlockHound;

public interface BlockHoundIntegration extends Comparable<BlockHoundIntegration> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package reactor.blockhound.integration;

import com.google.auto.service.AutoService;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;

@AutoService(BlockHoundIntegration.class)
public class LoggingIntegration implements BlockHoundIntegration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package reactor.blockhound.integration;

import com.google.auto.service.AutoService;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;
import reactor.core.scheduler.NonBlocking;
import reactor.core.scheduler.Schedulers;
import reactor.blockhound.integration.util.TaskWrappingScheduledExecutorService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import io.reactivex.functions.Function;
import io.reactivex.internal.schedulers.NonBlockingThread;
import io.reactivex.plugins.RxJavaPlugins;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;

@AutoService(BlockHoundIntegration.class)
public class RxJava2Integration implements BlockHoundIntegration {
Expand Down
4 changes: 2 additions & 2 deletions docs/how_it_works.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To detect blocking Java methods, BlockHound alters the bytecode of a method and
```java
// java.net.Socket
public void connect(SocketAddress endpoint, int timeout) {
reactor.BlockHoundRuntime.checkBlocking(
reactor.blockhound.BlockHoundRuntime.checkBlocking(
"java.net.Socket",
"connect",
/*method modifiers*/
Expand Down Expand Up @@ -47,7 +47,7 @@ As you can see, the cost of such instrumentation is minimal and only adds 1 hop
Now, we add the blocking call detection, the same way as we do it with Java methods:
```java
public static void sleep(long millis) {
reactor.BlockHoundRuntime.checkBlocking(
reactor.blockhound.BlockHoundRuntime.checkBlocking(
"java.lang.Thread",
"sleep",
/*method modifiers*/
Expand Down
2 changes: 1 addition & 1 deletion example/src/test/java/com/example/BuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example;

import org.junit.Test;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

Expand Down
2 changes: 1 addition & 1 deletion example/src/test/java/com/example/FalseNegativesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

Expand Down
2 changes: 1 addition & 1 deletion example/src/test/java/com/example/ReactorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
Expand Down
2 changes: 1 addition & 1 deletion example/src/test/java/com/example/RxJavaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import io.reactivex.Single;
import io.reactivex.exceptions.CompositeException;
import org.junit.Test;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;
import reactor.core.publisher.Flux;

import java.util.concurrent.TimeUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.google.auto.service.AutoService;
import org.junit.platform.launcher.TestExecutionListener;
import reactor.BlockHound;
import reactor.blockhound.BlockHound;

@AutoService(TestExecutionListener.class)
public class BlockHoundTestExecutionListener implements TestExecutionListener {
Expand Down

0 comments on commit 07dbf59

Please sign in to comment.