Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ee81bb

Browse filesBrowse files
author
Christoph Läubrich
committed
Store Objects in the DefaultContext in a map
Fix #48
1 parent f28ab02 commit 8ee81bb
Copy full SHA for 8ee81bb

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎src/main/java/org/codehaus/plexus/build/DefaultBuildContext.java

Copy file name to clipboardExpand all lines: src/main/java/org/codehaus/plexus/build/DefaultBuildContext.java
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import java.io.OutputStream;
2222
import java.nio.file.Files;
2323
import java.util.List;
24+
import java.util.Map;
25+
import java.util.concurrent.ConcurrentHashMap;
2426

2527
import org.codehaus.plexus.util.DirectoryScanner;
2628
import org.codehaus.plexus.util.Scanner;
@@ -41,6 +43,7 @@
4143
@Singleton
4244
public class DefaultBuildContext implements BuildContext {
4345

46+
private final Map<String, Object> contextMap = new ConcurrentHashMap<>();
4447
private final Logger logger = LoggerFactory.getLogger(DefaultBuildContext.class);
4548
/** {@inheritDoc} */
4649
public boolean hasDelta(String relpath) {
@@ -105,11 +108,12 @@ public boolean isIncremental() {
105108

106109
/** {@inheritDoc} */
107110
public Object getValue(String key) {
108-
return null;
111+
return contextMap.get(key);
109112
}
110113

111114
/** {@inheritDoc} */
112115
public void setValue(String key, Object value) {
116+
contextMap.put(key, value);
113117
}
114118

115119
private String getMessage(File file, int line, int column, String message) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.