aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2013-08-19 16:31:20 (EDT)
committerJohn Ross2013-08-19 16:31:20 (EDT)
commite862a0697e3ea44c260490c5f043c959411b3eb9 (patch)
tree52e5809614763465e5f6d8bc6b43d714bfd6c066
parent7e2584a55df25931c9953369ed2c55b8eb76ef6d (diff)
downloadrt.equinox.bundles-e862a0697e3ea44c260490c5f043c959411b3eb9.zip
rt.equinox.bundles-e862a0697e3ea44c260490c5f043c959411b3eb9.tar.gz
rt.equinox.bundles-e862a0697e3ea44c260490c5f043c959411b3eb9.tar.bz2
[Bug 414943] Ensure last modified timestamp change of component.xml is sufficiently large to notice.I20130820-0800
-rwxr-xr-xbundles/org.eclipse.equinox.ds.tests/bundles_src/tb26/org/eclipse/equinox/ds/tests/tb26/Component.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb26/org/eclipse/equinox/ds/tests/tb26/Component.java b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb26/org/eclipse/equinox/ds/tests/tb26/Component.java
index cf1ce9f..32fa7b8 100755
--- a/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb26/org/eclipse/equinox/ds/tests/tb26/Component.java
+++ b/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb26/org/eclipse/equinox/ds/tests/tb26/Component.java
@@ -74,10 +74,6 @@ public abstract class Component {
return new FileInputStream(getResourceAsFile(name));
}
- private FileOutputStream getResourceAsFileOutputStream(String name) throws Exception {
- return new FileOutputStream(getResourceAsFile(name));
- }
-
private URI getResourceAsUri(String name) throws Exception {
URL url = getResource(name);
URLConverter converter = tracker.getService();
@@ -106,12 +102,15 @@ public abstract class Component {
}
private void writeResource(String name, byte[] content) throws Exception {
- FileOutputStream fos = getResourceAsFileOutputStream(name);
+ File file = getResourceAsFile(name);
+ FileOutputStream fos = new FileOutputStream(file);
try {
fos.write(content);
}
finally {
closeSilently(fos);
}
+ // Ensure the update will be detected.
+ file.setLastModified(file.lastModified() + 1000);
}
}