< prev index next >

src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, 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 --- 1,7 ---- /* ! * 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,131 **** String getTempFileSuffix() { return suffix; } /** ! * @param dir */ ! public final void setDir(String dir) { ! if (tempDir == null && dir != null && !dir.equals("")) { ! tempDir = new File(dir); } } /** * Validates if it can create temporary files. Otherwise, it stores --- 117,132 ---- String getTempFileSuffix() { return suffix; } /** ! * @param directory ! * temp directory */ ! 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,151 **** if (!deleted) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath()); } } ! } catch(Exception ioe) { memoryThreshold = -1L; // whole attachment will be in-memory } } } --- 142,154 ---- if (!deleted) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath()); } } ! } 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 >