aboutsummaryrefslogtreecommitdiff
path: root/src/api/java
diff options
context:
space:
mode:
authorAmadornes <amadornes@gmail.com>2018-08-19 00:16:19 +0200
committerAmadornes <amadornes@gmail.com>2018-08-19 00:16:19 +0200
commitc266c1320597fb1385547a4ad8384b74231b96ca (patch)
treed204385f2f1112187c97295671acd340f718ab24 /src/api/java
parent6fd0997b5ddcea041d488c7e02f165cf06b2a375 (diff)
downloadArtifactural-c266c1320597fb1385547a4ad8384b74231b96ca.tar.gz
Artifactural-c266c1320597fb1385547a4ad8384b74231b96ca.tar.bz2
Artifactural-c266c1320597fb1385547a4ad8384b74231b96ca.zip
Remove empty() method in ArtifactMetadata
Diffstat (limited to 'src/api/java')
-rw-r--r--src/api/java/com/amadornes/artifactural/api/artifact/ArtifactMetadata.java4
-rw-r--r--src/api/java/com/amadornes/artifactural/api/artifact/Internal.java12
2 files changed, 11 insertions, 5 deletions
diff --git a/src/api/java/com/amadornes/artifactural/api/artifact/ArtifactMetadata.java b/src/api/java/com/amadornes/artifactural/api/artifact/ArtifactMetadata.java
index 1dcd838..36fb1a5 100644
--- a/src/api/java/com/amadornes/artifactural/api/artifact/ArtifactMetadata.java
+++ b/src/api/java/com/amadornes/artifactural/api/artifact/ArtifactMetadata.java
@@ -2,10 +2,6 @@ package com.amadornes.artifactural.api.artifact;
public interface ArtifactMetadata {
- static ArtifactMetadata empty() {
- return (ArtifactMetadata) null;
- }
-
ArtifactMetadata with(String key, String value);
String getHash();
diff --git a/src/api/java/com/amadornes/artifactural/api/artifact/Internal.java b/src/api/java/com/amadornes/artifactural/api/artifact/Internal.java
index 9401b00..c7fd883 100644
--- a/src/api/java/com/amadornes/artifactural/api/artifact/Internal.java
+++ b/src/api/java/com/amadornes/artifactural/api/artifact/Internal.java
@@ -46,7 +46,17 @@ final class Internal {
@Override
public ArtifactMetadata getMetadata() {
- return ArtifactMetadata.empty();
+ return new ArtifactMetadata() {
+ @Override
+ public ArtifactMetadata with(String key, String value) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getHash() {
+ return "ERROR";
+ }
+ };
}
@Override