Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Namespace fix #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,14 @@ private static String[] fetchApexClassesBasedOnRegex(PartnerConnection connectio
String regex, Boolean includeTriggers) {
if (regex != null && !regex.equals(" ")) {
LOG.info("Using regex: \"" + regex + "\" to fetch apex classes");
// construct the query
String namespace = null;
// split out the namespace if present
String[] splits = regex.split("\\.", 2);
if (splits.length == 2) {
namespace = splits[0];
regex = splits[1];
}
// construct the query
String soql = QueryConstructor.generateQueryToFetchApexClassesBasedOnRegex(namespace, regex);
// fire the query using WSC and fetch the results
String[] classesAsArrayUsingWSC = constructClassIdArrayUsingWSC(connection, soql);
Expand Down