Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykola Nikishov2019-12-25 21:19:04 +0000
committerMickael Istria2021-09-09 16:54:56 +0000
commit53ee3115279481f88f0c58b41043c47f66d4a4e2 (patch)
tree8c6ed3bff93b614e8c9e7126271d5cedd7bb4d84
parentcffbbf943301cf705e03f78b3feeaf4081d698a3 (diff)
downloadrt.equinox.p2-53ee3115279481f88f0c58b41043c47f66d4a4e2.tar.gz
rt.equinox.p2-53ee3115279481f88f0c58b41043c47f66d4a4e2.tar.xz
rt.equinox.p2-53ee3115279481f88f0c58b41043c47f66d4a4e2.zip
Enrich log message with repository location when it is not a local file system URII20210915-0700I20210915-0510I20210915-0150I20210914-1800I20210913-2050I20210911-1800I20210910-1800I20210909-1800
Change-Id: Ib34db907101b04fcc1d4cb0e5ee0e6d1ed94cd67 Signed-off-by: Mykola Nikishov <mn@mn.com.ua> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/155046 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
index 22b65a2e1..a4ae2b92b 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
@@ -14,6 +14,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.repository;
+import static java.lang.String.format;
+
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -105,7 +107,7 @@ public class Activator implements BundleActivator {
private File getLockFile(URI repositoryLocation) throws IOException {
if (!URIUtil.isFileURI(repositoryLocation)) {
- throw new IOException("Cannot lock a non file based repository"); //$NON-NLS-1$
+ throw new IOException(format("Cannot lock a non file based repository %s", repositoryLocation)); //$NON-NLS-1$
}
URI result = URIUtil.append(repositoryLocation, ".artifactlock"); //$NON-NLS-1$
return URIUtil.toFile(result);

Back to the top