From 6e2f7d8489958183ee83c3bbf8e0c5ad15495e0c Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Tue, 14 Jun 2022 15:49:56 -0400 Subject: [PATCH 1/3] Improve regex expression Fixes https://github.com/bndtools/bnd/issues/5281 Signed-off-by: BJ Hargrave --- .../bndtools/editor/completion/BndCompletionProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bndtools.core/src/bndtools/editor/completion/BndCompletionProcessor.java b/bndtools.core/src/bndtools/editor/completion/BndCompletionProcessor.java index a572fd8999..a01951c1d8 100644 --- a/bndtools.core/src/bndtools/editor/completion/BndCompletionProcessor.java +++ b/bndtools.core/src/bndtools/editor/completion/BndCompletionProcessor.java @@ -18,7 +18,7 @@ public class BndCompletionProcessor implements IContentAssistProcessor { - private static final Pattern PREFIX_PATTERN = Pattern.compile("^(?:.*\\s)*(.*)$"); + private static final Pattern PREFIX_PATTERN = Pattern.compile("(\\S+)$"); @Override public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { @@ -26,7 +26,7 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int String pre = viewer.getDocument() .get(0, offset); Matcher matcher = PREFIX_PATTERN.matcher(pre); - if (matcher.matches()) { + if (matcher.find()) { String prefix = matcher.group(1); ICompletionProposal[] found = proposals(prefix, offset); if (found.length == 1) { From 5806a1285dfcfa2418499ce8d8d90c88218dae3c Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Tue, 14 Jun 2022 15:50:41 -0400 Subject: [PATCH 2/3] Improve regex expression Fixes https://github.com/bndtools/bnd/issues/5283 Signed-off-by: BJ Hargrave --- .../src/bndtools/jareditor/internal/JarFileSystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java b/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java index 93fbd40fe1..f38144e8eb 100644 --- a/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java +++ b/bndtools.jareditor/src/bndtools/jareditor/internal/JarFileSystem.java @@ -59,7 +59,7 @@ public class JarFileSystem extends FileSystem { private final ConcurrentMap> roots = new ConcurrentHashMap<>(); private static final Pattern JARF_P = Pattern - .compile("jarf:///(?.*)!(?(/[^!]*)+)"); + .compile("jarf:///(?.*)!(?/[^!]*)"); static abstract class JarNode extends FileStore { private final JarFolderNode parent; From 3487b9be762525880fdde1de8278634175658df7 Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Tue, 14 Jun 2022 16:19:05 -0400 Subject: [PATCH 3/3] Mark class Deprecated This class is only used by other deprecated classes in the same package. The entire package is now deprecated. Signed-off-by: BJ Hargrave --- .../src/aQute/bnd/deployer/http/HttpsUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/biz.aQute.repository/src/aQute/bnd/deployer/http/HttpsUtil.java b/biz.aQute.repository/src/aQute/bnd/deployer/http/HttpsUtil.java index 2e4980d9d5..6e751b6445 100644 --- a/biz.aQute.repository/src/aQute/bnd/deployer/http/HttpsUtil.java +++ b/biz.aQute.repository/src/aQute/bnd/deployer/http/HttpsUtil.java @@ -13,10 +13,13 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; +@Deprecated public class HttpsUtil { + @Deprecated public static final String PROP_DISABLE_SERVER_CERT_VERIFY = "disableServerVerify"; + @Deprecated static void disableServerVerification(URLConnection connection) throws GeneralSecurityException { if (!(connection instanceof HttpsURLConnection)) return;