mirror of git://gcc.gnu.org/git/gcc.git
re PR libgcj/29594 (jv-convert with no args NPE)
PR libgcj/29594: * gnu/gcj/convert/Convert.java (main): Correctly handle missing input or output encodings. Removed unused local variables. From-SVN: r121197
This commit is contained in:
parent
6f75716afb
commit
e858910352
|
|
@ -1,3 +1,9 @@
|
||||||
|
2007-01-25 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
PR libgcj/29594:
|
||||||
|
* gnu/gcj/convert/Convert.java (main): Correctly handle missing
|
||||||
|
input or output encodings. Removed unused local variables.
|
||||||
|
|
||||||
2007-01-25 Keith Seitz <keiths@redhat.com>
|
2007-01-25 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
* include/jvmti-int.h (_Jv_GetJDWP_JVMTIEnv): Declare.
|
* include/jvmti-int.h (_Jv_GetJDWP_JVMTIEnv): Declare.
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2002, 2005, 2006 Free Software Foundation
|
/* Copyright (C) 1999, 2002, 2005, 2006, 2007 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
|
|
@ -151,12 +151,6 @@ public class Convert
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BytesToUnicode inDecoder
|
|
||||||
= inEncodingName == null ? BytesToUnicode.getDefaultDecoder()
|
|
||||||
: BytesToUnicode.getDecoder(inEncodingName);
|
|
||||||
UnicodeToBytes outEncoder
|
|
||||||
= outEncodingName == null ? UnicodeToBytes.getDefaultEncoder()
|
|
||||||
: UnicodeToBytes.getEncoder(outEncodingName);
|
|
||||||
InputStream inStream = inName.equals("-") ? System.in
|
InputStream inStream = inName.equals("-") ? System.in
|
||||||
: new FileInputStream(inName);
|
: new FileInputStream(inName);
|
||||||
OutputStream outStream;
|
OutputStream outStream;
|
||||||
|
|
@ -165,9 +159,13 @@ public class Convert
|
||||||
else
|
else
|
||||||
outStream = new FileOutputStream(outName);
|
outStream = new FileOutputStream(outName);
|
||||||
InputStreamReader in
|
InputStreamReader in
|
||||||
= new InputStreamReader(inStream, inEncodingName);
|
= (inEncodingName == null
|
||||||
|
? new InputStreamReader(inStream)
|
||||||
|
: new InputStreamReader(inStream, inEncodingName));
|
||||||
OutputStreamWriter out
|
OutputStreamWriter out
|
||||||
= new OutputStreamWriter(outStream, outEncodingName);
|
= (outEncodingName == null
|
||||||
|
? new OutputStreamWriter(outStream)
|
||||||
|
: new OutputStreamWriter(outStream, outEncodingName));
|
||||||
char[] buffer = new char[2048];
|
char[] buffer = new char[2048];
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue