Skip to content

Commit 01b9442

Browse files
committed
Fix error with accessibility of the inherited fields / methods in generated classes
1 parent c717b74 commit 01b9442

File tree

20 files changed

+208
-67
lines changed

20 files changed

+208
-67
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Maven Central](https://img.shields.io/maven-central/v/net.tascalate.async/net.tascalate.async.parent.svg)](https://search.maven.org/artifact/net.tascalate.async/net.tascalate.async.parent/1.2.1/pom) [![GitHub release](https://img.shields.io/github/release/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/releases/tag/1.2.1) [![license](https://img.shields.io/github/license/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/blob/master/LICENSE)
1+
[![Maven Central](https://img.shields.io/maven-central/v/net.tascalate.async/net.tascalate.async.parent.svg)](https://search.maven.org/artifact/net.tascalate.async/net.tascalate.async.parent/1.2.2/pom) [![GitHub release](https://img.shields.io/github/release/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/releases/tag/1.2.2) [![license](https://img.shields.io/github/license/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/blob/master/LICENSE)
22
# Why async-await?
33
Asynchronous programming has long been a useful way to perform operations that don’t necessarily need to hold up the flow or responsiveness of an application. Generally, these are either compute-bound operations or I/O bound operations. Compute-bound operations are those where computations can be done on a separate thread, leaving the main thread to continue its own processing, while I/O bound operations involve work that takes place externally and may not need to block a thread while such work takes place. Common examples of I/O bound operations are file and network operations.
44

@@ -17,7 +17,7 @@ First, add Maven dependency to the library runtime:
1717
<dependency>
1818
<groupId>net.tascalate.async</groupId>
1919
<artifactId>net.tascalate.async.runtime</artifactId>
20-
<version>1.2.1</version>
20+
<version>1.2.2</version>
2121
</dependency>
2222
```
2323
Second, add the following build plugins in the specified order:
@@ -27,7 +27,7 @@ Second, add the following build plugins in the specified order:
2727
<plugin>
2828
<groupId>net.tascalate.async</groupId>
2929
<artifactId>net.tascalate.async.tools.maven</artifactId>
30-
<version>1.2.1</version>
30+
<version>1.2.2</version>
3131
<executions>
3232
<execution>
3333
<phase>process-classes</phase>

net.tascalate.async.agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>net.tascalate.async</groupId>
77
<artifactId>net.tascalate.async.parent</artifactId>
8-
<version>1.2.1</version>
8+
<version>1.2.2</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

net.tascalate.async.examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>net.tascalate.async</groupId>
77
<artifactId>net.tascalate.async.parent</artifactId>
8-
<version>1.2.1</version>
8+
<version>1.2.2</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package net.tascalate.async.examples.generator;
2+
3+
import net.tascalate.async.examples.generator.base.BaseClass;
4+
5+
public class SamePackageSubclass extends BaseClass {
6+
protected String samePackageField = "XYZ";
7+
8+
protected long samePackageMethod(long v) {
9+
return v * 1000;
10+
}
11+
}

net.tascalate.async.examples/src/main/java/net/tascalate/async/examples/generator/SimpleArgs.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import net.tascalate.concurrent.Promise;
2121
import net.tascalate.concurrent.Promises;
2222

23-
public class SimpleArgs {
23+
public class SimpleArgs extends SamePackageSubclass {
2424
final private static AtomicLong idx = new AtomicLong(0);
2525
final private static ExecutorService executor = Executors.newFixedThreadPool(4, new ThreadFactory() {
2626
@Override
@@ -48,6 +48,12 @@ public static void main(String[] args) {
4848
x.hashCode();
4949
System.out.println(Thread.currentThread().getName());
5050
System.out.println(abs + " -- " + x + ", " + scheduler);
51+
System.out.println("Inherited method (other package) " + inheritedMethod(10));
52+
System.out.println("Inherited method (same package) " + samePackageMethod(10));
53+
System.out.println("Inherited method (public method) " + super.publicMethod());
54+
System.out.println("Inherited field (other package) " + inheritedField);
55+
System.out.println("Inherited field (same package) " + samePackageField);
56+
System.out.println("Inherited field (public field) " + publicField);
5157
return async(new Date());
5258
}
5359

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package net.tascalate.async.examples.generator.base;
2+
3+
public class BaseClass {
4+
protected String inheritedField = "123";
5+
public String publicField = "ABC";
6+
7+
protected String inheritedMethod(long v) {
8+
return String.valueOf(10 * v);
9+
}
10+
11+
public String publicMethod() {
12+
return "12345";
13+
}
14+
}

net.tascalate.async.extras/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>net.tascalate.async</groupId>
77
<artifactId>net.tascalate.async.parent</artifactId>
8-
<version>1.2.1</version>
8+
<version>1.2.2</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

net.tascalate.async.resolver.propagated/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>net.tascalate.async</groupId>
77
<artifactId>net.tascalate.async.parent</artifactId>
8-
<version>1.2.1</version>
8+
<version>1.2.2</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

net.tascalate.async.resolver.provided/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>net.tascalate.async</groupId>
77
<artifactId>net.tascalate.async.parent</artifactId>
8-
<version>1.2.1</version>
8+
<version>1.2.2</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

net.tascalate.async.resolver.scoped/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>net.tascalate.async</groupId>
77
<artifactId>net.tascalate.async.parent</artifactId>
8-
<version>1.2.1</version>
8+
<version>1.2.2</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

0 commit comments

Comments
 (0)