JarEntryTime.java revision 0
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * This code is free software; you can redistribute it and/or modify it
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * under the terms of the GNU General Public License version 2 only, as
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * published by the Free Software Foundation.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * This code is distributed in the hope that it will be useful, but WITHOUT
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * version 2 for more details (a copy is included in the LICENSE file that
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * accompanied this code).
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You should have received a copy of the GNU General Public License version
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 2 along with this work; if not, write to the Free Software Foundation,
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CA 95054 USA or visit www.sun.com if you need additional information or
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * have any questions.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * @bug 4225317
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * @summary Check extracted files have date as per those in the .jar file
9512fe850e98fdd448c638ca63fdd92a8a510255ahlpublic class JarEntryTime {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl boolean rc = true;
23b5c241225a8ade2b6b9f06ebb891ee459e3b02tomee if (x != null) {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl static void extractJar(File jarFile, boolean useExtractionTime) throws Throwable {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl javahome = javahome.substring(0, javahome.length() - 4);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl String jarcmd = javahome + File.separator + "bin" + File.separator + "jar";
if (useExtractionTime) {
// allow for e.g. rounding/truncation and networked/samba drives.
* foo.txt
* yesterday, and foo.txt created "earlier".