Skip to content

Commit

Permalink
making the switch working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
wadoon committed Feb 11, 2024
1 parent 5a22f22 commit 4051630
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ on:
- 'KeY-*'

jobs:
checkerFramework:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'corretto'
cache: 'gradle'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: -DENABLE_NULLNESS=true compileTest


qodana:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ subprojects {
compileOnly 'org.jspecify:jspecify:0.3.0'
compileOnly 'io.github.eisop:checker-qual:3.34.0-eisop1'
compileOnly 'io.github.eisop:checker-util:3.34.0-eisop1'
testCompileOnly 'io.github.eisop:checker-qual:3.34.0-eisop1'
checkerFramework 'io.github.eisop:checker:3.34.0-eisop1'
testCompileOnly 'io.github.eisop:checker-qual:3.34.0-eisop2'
checkerFramework 'io.github.eisop:checker:3.34.0-eisop2'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-only */
package org.key_project.util.collection;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
Expand Down Expand Up @@ -64,6 +62,10 @@ private DefaultImmutableSet(ImmutableList<T> elementList) {
this.elementList = elementList;
}

public static <T> ImmutableSet<T> fromCollection(Collection<T> seq) {
return new DefaultImmutableSet<>(ImmutableList.fromList(seq));
}

// private static HashSet<String> previousComplains = new HashSet<>();
private void complainAboutSize() {
// // Immutable linear sets are very expensive with O(n) addition
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ include 'keyext.slicing'
include 'keyext.caching'

// ENABLE NULLNESS here or on the CLI
// This flag is activated to enable the checker framework.
// System.setProperty("ENABLE_NULLNESS", "true")

0 comments on commit 4051630

Please sign in to comment.