File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
sources/net.sf.j2s.java.core/src/javajs/http Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -289,25 +289,26 @@ public HttpRequest clearFormParts(String name) {
289289 private byte [] toBytes (Object data ) {
290290 if (data == null || data instanceof byte []) {
291291 return (byte []) data ;
292- } else if (data instanceof File ) {
292+ }
293+ if (data instanceof File ) {
293294 try (FileInputStream fis = new FileInputStream ((File ) data )) {
294295 return getBytes (fis );
295296 }
296297 catch (IOException e ) {
297298 e .printStackTrace ();
298299 return null ;
299300 }
300- } else if (data instanceof InputStream ) {
301+ }
302+ if (data instanceof InputStream ) {
301303 try (InputStream is = (InputStream ) data ) {
302304 return getBytes (is );
303305 }
304306 catch (IOException e ) {
305307 e .printStackTrace ();
306308 return null ;
307309 }
308- } else {
309- return data .toString ().getBytes ();
310310 }
311+ return data .toString ().getBytes ();
311312 }
312313
313314 @ Override
You can’t perform that action at this time.
0 commit comments