-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14fe0fc
commit 0d657a7
Showing
17 changed files
with
171 additions
and
118 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
examples/distribution/src/main/java/com/github/springjarhelsing/TestContext.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.github.spring-jar-helsing</groupId> | ||
<artifactId>examples</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<packaging>jar</packaging> | ||
<artifactId>examples-api</artifactId> | ||
|
||
</project> |
9 changes: 9 additions & 0 deletions
9
...s/examples-api/src/main/java/com/github/springjarhelsing/UninterpretableFutureGetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.github.springjarhelsing; | ||
|
||
import java.util.concurrent.*; | ||
|
||
public interface UninterpretableFutureGetter { | ||
|
||
<T> T get(Future<T> future) throws ExecutionException, InterruptedException; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
examples/j2se-test/src/main/java/com/github/springjarhelsing/TestContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.springjarhelsing; | ||
|
||
public class TestContext { | ||
|
||
private UninterpretableFutureGetter guava09UninterpretableFutureGetter; | ||
private UninterpretableFutureGetter guava17UninterpretableFutureGetter; | ||
|
||
public void setGuava09UninterpretableFutureGetter(UninterpretableFutureGetter guava09UninterpretableFutureGetter) { | ||
this.guava09UninterpretableFutureGetter = guava09UninterpretableFutureGetter; | ||
} | ||
|
||
public UninterpretableFutureGetter getGuava09UninterpretableFutureGetter() { | ||
return guava09UninterpretableFutureGetter; | ||
} | ||
|
||
public void setGuava17UninterpretableFutureGetter(UninterpretableFutureGetter guava17UninterpretableFutureGetter) { | ||
this.guava17UninterpretableFutureGetter = guava17UninterpretableFutureGetter; | ||
} | ||
|
||
public UninterpretableFutureGetter getGuava17UninterpretableFutureGetter() { | ||
return guava17UninterpretableFutureGetter; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...uava-17/src/main/java/com/github/springjarhelsing/Guava17UninterpretableFutureGetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.github.springjarhelsing; | ||
|
||
import com.google.common.util.concurrent.Uninterruptibles; | ||
import java.util.concurrent.*; | ||
|
||
public class Guava17UninterpretableFutureGetter implements UninterpretableFutureGetter { | ||
|
||
@Override | ||
public <T> T get(Future<T> future) throws ExecutionException, InterruptedException { | ||
return Uninterruptibles.getUninterruptibly(future); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ava-r09/src/main/java/com/github/springjarhelsing/Guava09UninterpretableFutureGetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.github.springjarhelsing; | ||
|
||
import com.google.common.util.concurrent.Futures; | ||
import java.util.concurrent.*; | ||
|
||
public class Guava09UninterpretableFutureGetter implements UninterpretableFutureGetter { | ||
|
||
@Override | ||
public <T> T get(Future<T> future) throws ExecutionException, InterruptedException { | ||
// this code can not be compiled with guava 17 | ||
return Futures.makeUninterruptible(future).get(); | ||
} | ||
|
||
} |
34 changes: 0 additions & 34 deletions
34
examples/with-guavar09/src/main/java/com/github/springjarhelsing/Guava09Tester.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
examples/with-guavar17/src/main/java/com/github/springjarhelsing/Guava17Tester.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.