Skip to content

Commit

Permalink
1. Updated release version.
Browse files Browse the repository at this point in the history
2. Removed unnecessary generator class.
  • Loading branch information
conor10 committed Dec 20, 2016
1 parent 277fc0d commit 719b5c3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
9 changes: 4 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Java 8:
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>1.0.9</version>
<version>1.1.0</version>
</dependency>
Android:
Expand All @@ -88,7 +88,7 @@ Android:
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core-android</artifactId>
<version>1.0.9</version>
<version>1.1.0</version>
</dependency>
Gradle
Expand All @@ -98,13 +98,13 @@ Java 8:

.. code-block:: groovy
compile ('org.web3j:core:1.0.9')
compile ('org.web3j:core:1.1.0')
Android:

.. code-block:: groovy
compile ('org.web3j:core-android:1.0.9')
compile ('org.web3j:core-android:1.1.0')
Start a client
Expand Down Expand Up @@ -155,7 +155,6 @@ To use an RxJava Observable:
...
});
To send synchronous requests:

.. code-block:: java
Expand Down
9 changes: 4 additions & 5 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Java 8:
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>1.0.9</version>
<version>1.1.0</version>
</dependency>
Android:
Expand All @@ -23,7 +23,7 @@ Android:
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core-android</artifactId>
<version>1.0.9</version>
<version>1.1.0</version>
</dependency>
Gradle
Expand All @@ -33,13 +33,13 @@ Java 8:

.. code-block:: groovy
compile ('org.web3j:core:1.0.9')
compile ('org.web3j:core:1.1.0')
Android:

.. code-block:: groovy
compile ('org.web3j:core-android:1.0.9')
compile ('org.web3j:core-android:1.1.0')
Start a client
Expand Down Expand Up @@ -76,7 +76,6 @@ To send asynchronous requests using a Future::
Web3ClientVersion web3ClientVersion = web3.web3ClientVersion().sendAsync().get();
String clientVersion = web3ClientVersion.getWeb3ClientVersion();


To use an RxJava Observable::

Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/web3j/codegen/AbiTypesMapperGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
/**
* Generator class for creating all the different numeric type variants.
*/
public class AbiTypesMapperGenerator extends Generator {
public class AbiTypesMapperGenerator {

private static final String CODEGEN_WARNING = "<p>Auto generated code.<br>\n" +
"<strong>Do not modifiy!</strong><br>\n" +
"Please use {@link " + AbiTypesMapperGenerator.class.getName() + "} to update.</p>\n";

private static final String TYPE = "type";

public static void main(String[] args) throws Exception {
AbiTypesMapperGenerator abiTypesMapperGenerator = new AbiTypesMapperGenerator();
if (args.length == 1) {
Expand All @@ -39,7 +41,7 @@ private void generate(String destinationDir) throws IOException {

MethodSpec.Builder builder = MethodSpec.methodBuilder("getType")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.addParameter(String.class, "type")
.addParameter(String.class, TYPE)
.returns(
ParameterizedTypeName.get(ClassName.get(Class.class),
WildcardTypeName.subtypeOf(Object.class))
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/org/web3j/codegen/Generator.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* Java wrapper source code generator for Solidity ABI format.
*/
public class SolidityFunctionWrapperGenerator extends Generator {
public class SolidityFunctionWrapperGenerator {

private static final String BINARY = "BINARY";
private static final String WEB3J = "web3j";
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/org/web3j/utils/Async.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public static <T> CompletableFuture<T> run(Callable<T> callable) {
return result;
}

private static int getCpuCount() {
return Runtime.getRuntime().availableProcessors();
}

public static ExecutorService defaultExecutorService() {
return Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
return Executors.newFixedThreadPool(getCpuCount());
}
}

0 comments on commit 719b5c3

Please sign in to comment.