Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 197177
Collapse All | Expand All

(-)src-local/org/eclipse/hyades/execution/security/KeystoreHelper.java (-3 / +5 lines)
Lines 44-50 Link Here
44
		File file=new File(pathname);
44
		File file=new File(pathname);
45
		
45
		
46
		/* Do not stomp an existing file */
46
		/* Do not stomp an existing file */
47
		if(!file.exists()) {
47
		/* bug 197177, handle situation when dat file is of size 0. */
48
		if(!file.exists() || file.length() == 0) {
48
			ks.load(null, password.toCharArray());
49
			ks.load(null, password.toCharArray());
49
			persistKeyStore(ks, pathname, password);
50
			persistKeyStore(ks, pathname, password);
50
		}
51
		}
Lines 64-71 Link Here
64
		KeyStore ks=null;
65
		KeyStore ks=null;
65
		File file=new File(pathname);
66
		File file=new File(pathname);
66
		
67
		
67
		/* Do not stomp an existing file */
68
		/* Do not stomp an existing file. */
68
		if(file.exists()) {
69
		/* bug 197177.  Add check for file size in case this method is called by others */
70
		if(file.exists()&& file.length() > 0) {
69
			ks=KeyStore.getInstance("JKS");
71
			ks=KeyStore.getInstance("JKS");
70
			/* Initialize the keystore with no information */
72
			/* Initialize the keystore with no information */
71
			FileInputStream is=new FileInputStream(file);
73
			FileInputStream is=new FileInputStream(file);

Return to bug 197177