< prev index next >
src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -117,15 +117,16 @@
String getTempFileSuffix() {
return suffix;
}
/**
- * @param dir
+ * @param directory
+ * temp directory
*/
- public final void setDir(String dir) {
- if (tempDir == null && dir != null && !dir.equals("")) {
- tempDir = new File(dir);
+ public final void setDir(String directory) {
+ if (tempDir == null && directory != null && !directory.equals("")) {
+ tempDir = new File(directory);
}
}
/**
* Validates if it can create temporary files. Otherwise, it stores
@@ -141,11 +142,13 @@
if (!deleted) {
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath());
}
}
- } catch(Exception ioe) {
+ } catch(RuntimeException e) {
+ memoryThreshold = -1L; // whole attachment will be in-memory
+ } catch(Exception e) {
memoryThreshold = -1L; // whole attachment will be in-memory
}
}
}
< prev index next >