File tree 3 files changed +16
-7
lines changed
eclipse.platform.releng/bundles
org.eclipse.test/src/org/eclipse/test
org.eclipse.test.performance
src/org/eclipse/test/internal 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ org.eclipse.jdt.core.compiler.problem.APILeak=warning
32
32
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated =info
33
33
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface =warning
34
34
org.eclipse.jdt.core.compiler.problem.assertIdentifier =error
35
- org.eclipse.jdt.core.compiler.problem.autoboxing =info
35
+ org.eclipse.jdt.core.compiler.problem.autoboxing =ignore
36
36
org.eclipse.jdt.core.compiler.problem.comparingIdentical =warning
37
37
org.eclipse.jdt.core.compiler.problem.deadCode =warning
38
38
org.eclipse.jdt.core.compiler.problem.deprecation =warning
Original file line number Diff line number Diff line change @@ -93,8 +93,15 @@ public static void dumpAwtScreenshot(String screenshotFile) {
93
93
processBuilder .environment ().put ("AWT_TOOLKIT" , "CToolkit" );
94
94
}
95
95
Process process = processBuilder .start ();
96
- new StreamForwarder (process .getErrorStream (), System .out ).start ();
97
- new StreamForwarder (process .getInputStream (), System .out ).start ();
96
+
97
+ @ SuppressWarnings ("resource" ) // never close process streams
98
+ InputStream errorStream = process .getErrorStream ();
99
+
100
+ @ SuppressWarnings ("resource" ) // never close process streams
101
+ InputStream inputStream = process .getInputStream ();
102
+
103
+ new StreamForwarder (errorStream , System .out ).start ();
104
+ new StreamForwarder (inputStream , System .out ).start ();
98
105
long end = System .currentTimeMillis () + TIMEOUT_SECONDS * 1000 ;
99
106
boolean done = false ;
100
107
do {
Original file line number Diff line number Diff line change @@ -129,8 +129,9 @@ Reader getSysErrReader() throws IOException {
129
129
* @throws IOException If any I/O problem occurs during writing the data
130
130
*/
131
131
void writeSysOut (Writer writer ) throws IOException {
132
- Objects .requireNonNull (writer , "Writer cannot be null" );
133
- writeFrom (this .sysOutStore , writer );
132
+ @ SuppressWarnings ("resource" ) // requireNonNull just returns first argument
133
+ Writer w = Objects .requireNonNull (writer , "Writer cannot be null" );
134
+ writeFrom (this .sysOutStore , w );
134
135
}
135
136
136
137
/**
@@ -141,8 +142,9 @@ void writeSysOut(Writer writer) throws IOException {
141
142
* @throws IOException If any I/O problem occurs during writing the data
142
143
*/
143
144
void writeSysErr (Writer writer ) throws IOException {
144
- Objects .requireNonNull (writer , "Writer cannot be null" );
145
- writeFrom (this .sysErrStore , writer );
145
+ @ SuppressWarnings ("resource" ) // requireNonNull just returns first argument
146
+ Writer w = Objects .requireNonNull (writer , "Writer cannot be null" );
147
+ writeFrom (this .sysErrStore , w );
146
148
}
147
149
148
150
static Optional <TestIdentifier > traverseAndFindTestClass (TestPlan testPlan , TestIdentifier testIdentifier ) {
You can’t perform that action at this time.
0 commit comments