kaylavanhaverbeck / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

KeyStoreInputStream never close #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In back.SSLCOnnectionHelper, the keystoreInputStream parameter of the 
constructor may be 
closed no ?

code concerned :

    public SSLConnectionHelper(String appleHost, int applePort, InputStream 
keyStoreInputStream, String keyStorePass, String keystoreType) throws 
KeyStoreException, 
CertificateException, NoSuchAlgorithmException, NoSuchProviderException, 
IOException {
        logger.debug( "Instantiate SSLConnectionHelper with Keystore as InputStream" );
        this.appleHost = appleHost;
        this.applePort = applePort;
        this.keyStorePass = keyStorePass;

        // Load the Keystore
        this.keyStore = KeyStore.getInstance(keystoreType, "BC");
        this.keyStore.load( keyStoreInputStream, this.keyStorePass.toCharArray() );
    }

Original issue reported on code.google.com by desa.e...@gmail.com on 23 Mar 2010 at 10:50

GoogleCodeExporter commented 8 years ago
I'm not sure what you are asking...

Should we close the inputstream? 
seems like a bad idea.. what if the input stream is used for other things...

or check that the inputstream exists?
If there is no inputstream, then that would raise an exception...

Original comment by idbill.p...@gmail.com on 25 Mar 2010 at 5:10

GoogleCodeExporter commented 8 years ago

Original comment by idbill.p...@gmail.com on 26 Mar 2010 at 9:35