-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop Java 7 support #833
Drop Java 7 support #833
Conversation
8f9d2eb
to
a90f39f
Compare
ff1d701
to
98f6286
Compare
6e74bd5
to
5283d33
Compare
Signed-off-by: Marion Knopp <marion.knopp@gmail.com>
Signed-off-by: Marion Knopp <marion.knopp@gmail.com>
60e293f
to
fb1d8d1
Compare
there are two commits to update mockito - should we not join this to one? |
archunit/src/main/java/com/tngtech/archunit/core/domain/JavaClass.java
Outdated
Show resolved
Hide resolved
Oh, those two Mockito-commits are some artifact from rebasing 🙈 The former one should be squashed into the Guava-upgrade, because it has nothing to do with Mockito 😬 Good catch! 👍 |
We needed the Android version to be Java 7 compatible. Using a Java 8 compatible version now gives us some benefits (like a `Collector` for `Immutable{List/Set}`). Note that some `@Nullable` annotation in Guava made it necessary to refactor some code a little, where Spotbugs now complained about possible nullability. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
We could not use a newer major version because of being Java 7 compatible. Now we can upgrade to the latest version. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
These dependencies were hold back by the necessity to be Java 7 compatible. Now that we do not need this anymore we can finally upgrade to the latest version. Note that some `@Nullable` annotation in Guava made it necessary to refactor some code a little, where Spotbugs now complained about possible nullability. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
By replacing the getters by an API that takes a `Consumer` to iterate over the internal collections we can avoid copying the internal sets to `ImmutableSet` and still keep an immutable API of `ClassFileImportRecord`. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Marion Knopp <marion.knopp@gmail.com>
The main usage was ArchUnit's own `Optional` type, so now almost all usages are already gone. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Marion Knopp <marion.knopp@gmail.com> Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
The only reason where we specifically use a Guava supplier is to leverage the Guava utility class `Suppliers`. From this in turn we only use `memoize` and `ofInstance`. The former one we can simply wrap into an ArchUnit utility class and the latter one does not really provide much value, since `() -> value` is way shorter to read than `Suppliers.ofInstance(value)` anyway. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Since the API to create a `Stream` from an `Iterable` is so much less user-friendly we should try to offer `Collection` in the API where reasonable. APIs that consume from the user should take `Iterable` if there is no reason for a more narrow type. But APIs that offer to the user should offer `Collection` instead of `Iterable` to make the `Stream` processing simpler. Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
de39fa6
to
122c0aa
Compare
@hankem @codecholeric - I stumbled into this because of the 122c0aa commit. Since Perhaps we could make this more discoverable by adding it to https://github.com/TNG/ArchUnit/releases/tag/v1.0.0-rc1? 🤔 Just a list below the
There might be other things worth mentioning there as well, I'll leave it up to your good judgment to decide on that. 👍 The ArchUnit |
This will make Java 8 the minimum required Java version to run ArchUnit tests. We also refactored many internals to use Java 8 streams and lambdas instead of anonymous classes and replaced ArchUnit's own
Function
,Predicate
,Optional
andSupplier
by the standard JDK ones. Furthermore, we upgraded most dependencies that were only hold back to be Java 7 compatible (like Guava and AssertJ).Note that this is obviously a breaking change which will make ArchUnit unusable in Java 7 projects and will break all user code that depend on the mentioned ArchUnit types that were replaced by standard types. Thus, this change will only be released with version
1.0.0
.