commit | f1ebb4ca8f03e0d9118fe5f832da8c6166c9f03b | [log] [tgz] |
---|---|---|
author | Mat Booth <mat.booth@redhat.com> | Thu Nov 01 11:15:17 2018 +0000 |
committer | Mat Booth <mat.booth@redhat.com> | Thu Nov 01 11:15:17 2018 +0000 |
tree | 06033a222bd217aaf8e0a8e8202b916927e5764a | |
parent | 96d632e6fbd55d4c0bd4d271646ca6c902097306 [diff] |
Bug 540310 - Eclipse Fails to start if the mtime of the bundles.info file is zero Fix tests failing with UnsupportedOperationException on Windows. Change-Id: Iac435bedca69156d40861bc32442d8827915a6cc Signed-off-by: Mat Booth <mat.booth@redhat.com>
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java index c1735df..7cecf5d 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
@@ -131,7 +131,7 @@ try { FileTime ft = (FileTime) Files.getAttribute(file.toPath(), "unix:ctime"); ctime = ft.toMillis(); - } catch (IllegalArgumentException | IOException e) { + } catch (UnsupportedOperationException | IllegalArgumentException | IOException e) { // Not applicable on non-posix platforms } if (storeZero) {
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java index c6512e3..dfd9496 100644 --- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java +++ b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
@@ -414,7 +414,7 @@ // platforms creation time is a synonym for last modified time) FileTime ctime = (FileTime) Files.getAttribute(file.toPath(), "unix:ctime"); lastModified = ctime.toMillis(); - } catch (IllegalArgumentException | IOException e) { + } catch (UnsupportedOperationException | IllegalArgumentException | IOException e) { // We expect this attribute to not exist on non-posix platforms like Windows } }