Skip to content

Commit b0cbdc0

Browse files
authored
Merge pull request #3908 from adamretter/small-fixes
Very Small fixes
2 parents 3219e9e + a223121 commit b0cbdc0

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

exist-core/src/main/java/org/exist/repo/ExistRepository.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
public class ExistRepository extends Observable implements BrokerPoolService {
6262

6363
private final static Logger LOG = LogManager.getLogger(ExistRepository.class);
64-
public final static String EXPATH_REPO_DIR = "expathrepo";
65-
public final static String EXPATH_REPO_DEFAULT = "webapp/WEB-INF/" + EXPATH_REPO_DIR;
64+
private static final String EXPATH_REPO_DIR_NAME = "expathrepo";
65+
private static final String LEGACY_DEFAULT_EXPATH_REPO_DIR = "webapp/WEB-INF/" + EXPATH_REPO_DIR_NAME;
6666

6767
/** The wrapped EXPath repository. */
6868
private Path expathDir;
@@ -72,7 +72,7 @@ public class ExistRepository extends Observable implements BrokerPoolService {
7272
public void configure(final Configuration configuration) throws BrokerPoolServiceException {
7373
final Path dataDir = Optional.ofNullable((Path) configuration.getProperty(BrokerPool.PROPERTY_DATA_DIR))
7474
.orElse(Paths.get(NativeBroker.DEFAULT_DATA_DIR));
75-
this.expathDir = dataDir.resolve(EXPATH_REPO_DIR);
75+
this.expathDir = dataDir.resolve(EXPATH_REPO_DIR_NAME);
7676
}
7777

7878
@Override
@@ -274,7 +274,7 @@ public List<URI> getJavaModules() {
274274
public static Path getRepositoryDir(final Configuration config) throws IOException {
275275
final Path dataDir = Optional.ofNullable((Path) config.getProperty(BrokerPool.PROPERTY_DATA_DIR))
276276
.orElse(Paths.get(NativeBroker.DEFAULT_DATA_DIR));
277-
final Path expathDir = dataDir.resolve(EXPATH_REPO_DIR);
277+
final Path expathDir = dataDir.resolve(EXPATH_REPO_DIR_NAME);
278278

279279
if(!Files.exists(expathDir)) {
280280
moveOldRepo(config.getExistHome(), expathDir);
@@ -286,11 +286,11 @@ public static Path getRepositoryDir(final Configuration config) throws IOExcepti
286286
private static void moveOldRepo(final Optional<Path> home, final Path newRepo) {
287287
final Path repo_dir = home.map(h -> {
288288
if(FileUtils.fileName(h).equals("WEB-INF")) {
289-
return h.resolve(EXPATH_REPO_DIR);
289+
return h.resolve(EXPATH_REPO_DIR_NAME);
290290
} else {
291-
return h.resolve( EXPATH_REPO_DEFAULT);
291+
return h.resolve(LEGACY_DEFAULT_EXPATH_REPO_DIR);
292292
}
293-
}).orElse(Paths.get(System.getProperty("java.io.tmpdir")).resolve(EXPATH_REPO_DIR));
293+
}).orElse(Paths.get(System.getProperty("java.io.tmpdir")).resolve(EXPATH_REPO_DIR_NAME));
294294

295295
if (Files.isReadable(repo_dir)) {
296296
LOG.info("Found old expathrepo directory. Moving to new default location: {}", newRepo.toAbsolutePath().toString());

extensions/modules/xmldiff/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@
5252
<version>${project.version}</version>
5353
</dependency>
5454

55-
<dependency>
56-
<groupId>org.apache.logging.log4j</groupId>
57-
<artifactId>log4j-api</artifactId>
58-
</dependency>
59-
6055
<dependency>
6156
<groupId>org.xmlunit</groupId>
6257
<artifactId>xmlunit-core</artifactId>

extensions/modules/xmldiff/src/main/java/org/exist/xquery/modules/xmldiff/Compare.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
*/
2222
package org.exist.xquery.modules.xmldiff;
2323

24-
import org.apache.logging.log4j.LogManager;
25-
import org.apache.logging.log4j.Logger;
26-
2724
import org.xmlunit.builder.DiffBuilder;
2825
import org.xmlunit.builder.Input;
2926
import org.xmlunit.diff.Diff;
@@ -42,8 +39,6 @@
4239
* @author <a href="mailto:[email protected]">Pierrick Brihaye</a>
4340
*/
4441
public class Compare extends Function {
45-
46-
private static final Logger logger = LogManager.getLogger(Compare.class);
4742
private final static Properties OUTPUT_PROPERTIES = new Properties();
4843

4944
static {
@@ -126,9 +121,6 @@ else if (s2.isEmpty()) {
126121
.checkForIdentical()
127122
.build();
128123
boolean identical = !diff.hasDifferences();
129-
if (!identical) {
130-
logger.warn("Diff result: {}", diff.toString());
131-
}
132124
result = new BooleanValue(identical);
133125
} catch (Exception e) {
134126
throw new XPathException(this, "An exception occurred while serializing node " +

0 commit comments

Comments
 (0)