Skip to content

Commit b1e968e

Browse files
authored
typetools/checker-framework 3.49.1 release (#1153)
2 parents 08fd456 + 8d3ba45 commit b1e968e

File tree

9 files changed

+187
-59
lines changed

9 files changed

+187
-59
lines changed

.azure/azure-pipelines-daily.yml.m4

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222

2323
- job: canary_jobs
2424
dependsOn:
25-
- junit_jdk21
26-
- nonjunit_jdk21
27-
- inference_part1_jdk21
28-
- inference_part2_jdk21
29-
- typecheck_part1_jdk21
30-
- typecheck_part2_jdk21
25+
- junit_jdk[]canary_version
26+
- nonjunit_jdk[]canary_version
27+
- inference_part1_jdk[]canary_version
28+
- inference_part2_jdk[]canary_version
29+
- typecheck_part1_jdk[]canary_version
30+
- typecheck_part2_jdk[]canary_version
3131
pool:
3232
vmImage: 'ubuntu-latest'
3333
steps:
@@ -50,20 +50,20 @@ nonjunit_job(23)
5050
# So use a timeout of 90 minutes, and hope that is enough.
5151
inference_job(11)
5252
inference_job(17)
53-
inference_job_lts(21)
53+
inference_job_split(21)
5454
inference_job(23)
5555

5656
# Do not run misc_job daily, because it does diffs that assume it is running in
5757
# a pull request.
5858

5959
typecheck_job(11)
6060
typecheck_job(17)
61-
typecheck_job_lts(21)
61+
typecheck_job_split(21)
6262
typecheck_job(23)
6363

6464
daikon_job(11)
6565
daikon_job(17)
66-
daikon_job_lts(21)
66+
daikon_job_split(21)
6767
daikon_job(23)
6868

6969
## I'm not sure why the guava_jdk11 job is failing (it's due to Error Prone).

.azure/azure-pipelines.yml.m4

+11-11
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121

2222
- job: canary_jobs
2323
dependsOn:
24-
- junit_jdk21
25-
- nonjunit_jdk21
26-
- inference_part1_jdk21
27-
- inference_part2_jdk21
28-
- typecheck_part1_jdk21
29-
- typecheck_part2_jdk21
30-
- misc_jdk21
31-
- misc_jdk23
24+
- junit_jdk[]canary_version
25+
- nonjunit_jdk[]canary_version
26+
- inference_part1_jdk[]canary_version
27+
- inference_part2_jdk[]canary_version
28+
- typecheck_part1_jdk[]canary_version
29+
- typecheck_part2_jdk[]canary_version
30+
- misc_jdk[]canary_version
31+
- misc_jdk[]latest_version
3232
pool:
3333
vmImage: 'ubuntu-latest'
3434
steps:
@@ -43,17 +43,17 @@ nonjunit_job(21)
4343
# takes much longer to complete than normal, and this Azure job times out.
4444
# When there is a timeout, one cannot examine wpi or wpi-many logs.
4545
# So use a timeout of 90 minutes, and hope that is enough.
46-
inference_job_lts(21)
46+
inference_job_split(21)
4747

4848
# Unlimited fetchDepth for misc_jobs, because of need to make contributors.tex
4949
misc_job(11)
5050
misc_job(17)
5151
misc_job(21)
5252
misc_job(23)
5353

54-
typecheck_job_lts(21)
54+
typecheck_job_split(21)
5555

56-
daikon_job_lts(21)
56+
daikon_job_split(21)
5757

5858
## I'm not sure why the guava_jdk11 job is failing (it's due to Error Prone).
5959
guava_job(21)

.azure/defs.m4

+22-21
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
changequote
22
changequote(`[',`]')dnl
3-
define([lts_version], [21])dnl
3+
ifelse([The "dnl" m4 macro means "discard to end of line",])dnl
4+
define([canary_version], [21])dnl
45
define([latest_version], [23])dnl
56
ifelse([each macro takes one argument, the JDK version])dnl
67
dnl
78
define([junit_job], [dnl
89
- job: junit_jdk$1
9-
ifelse($1,lts_version,,[ dependsOn:
10+
ifelse($1,canary_version,,[ dependsOn:
1011
- canary_jobs
11-
- junit_jdk21
12+
- junit_jdk[]canary_version
1213
])dnl
1314
pool:
1415
vmImage: 'ubuntu-latest'
@@ -22,9 +23,9 @@ ifelse($1,lts_version,,[ dependsOn:
2223
dnl
2324
define([nonjunit_job], [dnl
2425
- job: nonjunit_jdk$1
25-
ifelse($1,lts_version,,[ dependsOn:
26+
ifelse($1,canary_version,,[ dependsOn:
2627
- canary_jobs
27-
- nonjunit_jdk21
28+
- nonjunit_jdk[]canary_version
2829
])dnl
2930
pool:
3031
vmImage: 'ubuntu-latest'
@@ -35,7 +36,7 @@ ifelse($1,lts_version,,[ dependsOn:
3536
- bash: ./checker/bin-devel/test-cftests-nonjunit.sh
3637
displayName: test-cftests-nonjunit.sh])dnl
3738
dnl
38-
define([inference_job_lts], [dnl
39+
define([inference_job_split], [dnl
3940
# Split into part1 and part2 only for the inference job that "canary_jobs" depends on.
4041
- job: inference_part1_jdk$1
4142
pool:
@@ -61,10 +62,10 @@ define([inference_job_lts], [dnl
6162
dnl
6263
define([inference_job], [dnl
6364
- job: inference_jdk$1
64-
ifelse($1,lts_version,,[ dependsOn:
65+
ifelse($1,canary_version,,[ dependsOn:
6566
- canary_jobs
66-
- inference_part1_jdk21
67-
- inference_part2_jdk21
67+
- inference_part1_jdk[]canary_version
68+
- inference_part2_jdk[]canary_version
6869
])dnl
6970
pool:
7071
vmImage: 'ubuntu-latest'
@@ -79,9 +80,9 @@ ifelse($1,lts_version,,[ dependsOn:
7980
dnl
8081
define([misc_job], [dnl
8182
- job: misc_jdk$1
82-
ifelse($1,lts_version,,$1,latest_version,,[ dependsOn:
83+
ifelse($1,canary_version,,$1,latest_version,,[ dependsOn:
8384
- canary_jobs
84-
- misc_jdk21
85+
- misc_jdk[]canary_version
8586
])dnl
8687
pool:
8788
vmImage: 'ubuntu-latest'
@@ -91,7 +92,7 @@ ifelse($1,lts_version,,$1,latest_version,,[ dependsOn:
9192
- bash: ./checker/bin-devel/test-misc.sh
9293
displayName: test-misc.sh])dnl
9394
dnl
94-
define([typecheck_job_lts], [dnl
95+
define([typecheck_job_split], [dnl
9596
- job: typecheck_part1_jdk$1
9697
pool:
9798
vmImage: 'ubuntu-latest'
@@ -115,8 +116,8 @@ define([typecheck_job], [dnl
115116
- job: typecheck_jdk$1
116117
dependsOn:
117118
- canary_jobs
118-
- typecheck_part1_jdk21
119-
- typecheck_part2_jdk21
119+
- typecheck_part1_jdk[]canary_version
120+
- typecheck_part2_jdk[]canary_version
120121
pool:
121122
vmImage: 'ubuntu-latest'
122123
container: mdernst/cf-ubuntu-jdk$1-plus:latest
@@ -126,7 +127,7 @@ define([typecheck_job], [dnl
126127
- bash: ./checker/bin-devel/test-typecheck.sh
127128
displayName: test-typecheck.sh])dnl
128129
dnl
129-
define([daikon_job_lts], [dnl
130+
define([daikon_job_split], [dnl
130131
- job: daikon_part1_jdk$1
131132
dependsOn:
132133
- canary_jobs
@@ -156,8 +157,8 @@ define([daikon_job], [dnl
156157
- job: daikon_jdk$1
157158
dependsOn:
158159
- canary_jobs
159-
- daikon_part1_jdk21
160-
- daikon_part2_jdk21
160+
- daikon_part1_jdk[]canary_version
161+
- daikon_part2_jdk[]canary_version
161162
pool:
162163
vmImage: 'ubuntu-latest'
163164
container: mdernst/cf-ubuntu-jdk$1:latest
@@ -172,8 +173,8 @@ define([guava_job], [dnl
172173
- job: guava_jdk$1
173174
dependsOn:
174175
- canary_jobs
175-
ifelse($1,lts_version,,[dnl
176-
- guava_jdk21
176+
ifelse($1,canary_version,,[dnl
177+
- guava_jdk[]canary_version
177178
])dnl
178179
pool:
179180
vmImage: 'ubuntu-latest'
@@ -189,8 +190,8 @@ define([plume_lib_job], [dnl
189190
- job: plume_lib_jdk$1
190191
dependsOn:
191192
- canary_jobs
192-
ifelse($1,lts_version,,[dnl
193-
- plume_lib_jdk21
193+
ifelse($1,canary_version,,[dnl
194+
- plume_lib_jdk[]canary_version
194195
])dnl
195196
pool:
196197
vmImage: 'ubuntu-latest'

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ allprojects { currentProj ->
170170
// * any new checkers have been added, or
171171
// * backward-incompatible changes have been made to APIs or elsewhere.
172172
// To make a snapshot release, version should end in "-SNAPSHOT", then: ./gradlew publish
173-
version = '3.49.0'
173+
version = '3.49.1'
174174

175175
tasks.withType(JavaCompile).configureEach {
176176
options.fork = true

checker/src/main/java/org/checkerframework/checker/optional/OptionalImplTransfer.java

+16-13
Original file line numberDiff line numberDiff line change
@@ -217,23 +217,26 @@ private TransferResult<CFValue, CFStore> refineNonEmptyToPresentStreamResult(
217217
}
218218

219219
/**
220-
* Returns true if the receiver parameter of the method being invoked is explicitly annotated
221-
* with @{@link NonEmpty}.
220+
* Returns true if the receiver parameter of the first method being invoked is explicitly
221+
* annotated with @{@link NonEmpty}.
222222
*
223223
* @param methodInvok a method invocation node
224-
* @return true if the receiver parameter of the method being invoked is explicitly annotated
225-
* with @{@link NonEmpty}
224+
* @return true if the receiver parameter of the first method being invoked is explicitly
225+
* annotated with @{@link NonEmpty}
226226
*/
227227
private boolean isReceiverParameterNonEmpty(MethodInvocationNode methodInvok) {
228-
ExpressionTree receiverTree = TreeUtils.getReceiverTree(methodInvok.getTree());
229-
if (receiverTree instanceof MethodInvocationTree) {
230-
// TODO(https://github.com/typetools/checker-framework/issues/6848): this logic needs
231-
// further refinement to eliminate a source of false positives in the Optional Checker.
232-
// Also see the discussion in:
233-
// https://github.com/typetools/checker-framework/pull/6685#discussion_r1788632663 for
234-
// additional context.
235-
while (receiverTree instanceof MethodInvocationTree) {
236-
receiverTree = TreeUtils.getReceiverTree(receiverTree);
228+
ExpressionTree receiverTree = methodInvok.getTree();
229+
// TODO(https://github.com/typetools/checker-framework/issues/6848): this logic needs
230+
// further refinement to eliminate a source of false positives in the Optional Checker.
231+
// Also see the discussion in:
232+
// https://github.com/typetools/checker-framework/pull/6685#discussion_r1788632663
233+
// for additional context.
234+
while (receiverTree instanceof MethodInvocationTree) {
235+
ExpressionTree newReceiverTree = TreeUtils.getReceiverTree(receiverTree);
236+
if (newReceiverTree == null) {
237+
break;
238+
} else {
239+
receiverTree = newReceiverTree;
237240
}
238241
}
239242

checker/tests/optional/Issue6970.java

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import java.nio.file.Path;
2+
import java.util.Locale;
3+
import java.util.Set;
4+
5+
public class Issue6970 {
6+
7+
public static Path getPath(String moduleName) {
8+
final String fileNamePattern = ".*[\\\\/]" + moduleName.toLowerCase(Locale.ROOT) + "\\..*";
9+
return getPaths().stream()
10+
.filter(path -> path.toString().matches(fileNamePattern))
11+
.findFirst()
12+
.orElse(null);
13+
}
14+
15+
private static Set<Path> getPaths() {
16+
throw new RuntimeException("");
17+
}
18+
}

0 commit comments

Comments
 (0)