/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6838467
* @summary JSR199 FileObjects don't obey general contract of equals.
*/
public class T6838467 {
enum FileKind {
}
};
enum CompareKind {
SAME {
},
ABSOLUTE {
},
},
};
};
}
// on Windows, verify file system is not case significant
error("fileSystemIsCaseSignificant is set on Windows.");
}
// create a set of directories and zip files to compare
if (fileSystemIsCaseSignificant) {
}
// test the various sorts of file objects that can be obtained from
// the file manager, and for various values that may or may not match.
}
}
// verify that the various different types of file object were all
// tested
"RegularFileObject", "ZipFileObject", "ZipFileIndexFileObject" ));
error("expected fileobject classes not found\n"
+ "found: " + foundClasses);
}
if (errors > 0)
}
try {
// If the directories or zip files match, we expect "n" matches in
// the "n-squared" comparisons to come, where "n" is the number of
// entries in the the directories or zip files.
// If the directories or zip files don't themselves match,
// we obviously don't expect any of their contents to match either.
} finally {
}
}
// For a pair of file managers that may or may not have similar entries
// on the classpath, compare all files returned from one against all files
// returned from the other. For each pair of files, verify that if they
// are equal, the hashcode is equal as well, and finally verify that the
// expected number of matches was found.
boolean foundFiles1 = false;
boolean foundFiles2 = false;
int foundEqualCount = 0;
foundFiles1 = true;
foundFiles2 = true;
}
}
}
if (!foundFiles1)
error("no files found for file manager 1");
if (!foundFiles2)
error("no files found for file manager 2");
// verify the expected number of matches were found
if (foundEqualCount != expectEqualCount)
}
// create a file manager to test a FileKind, with a given directory
// or zip file placed on the classpath
return fm;
}
}
// create a directory containing a given set of paths
try {
} finally {
}
}
}
// create a sip file containing a given set of entries
try {
zos.closeEntry();
}
} finally {
}
}
errors++;
}
int count;
int errors;
}