Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Aug 13, 2024
1 parent c758be6 commit aa37980
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
6 changes: 0 additions & 6 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@
<version>3.2.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.citygml4j</groupId>
<artifactId>citygml4j-core</artifactId>
<version>3.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONWriter;
import com.alibaba.fastjson2.annotation.JSONField;
import org.citygml4j.core.model.CityGMLVersion;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -25,6 +24,7 @@ public void test() {

assertEquals(CityGMLVersion.v2_0, foo.getVersion());
}

public class FOO {
@JSONField(serializeFeatures = JSONWriter.Feature.WriteEnumUsingToString)
private CityGMLVersion version;
Expand All @@ -43,4 +43,33 @@ public FOO setVersion(String version) {
return this;
}
}

public enum CityGMLVersion {
v3_0("3.0"),
v2_0("2.0"),
v1_0("1.0");

private final String value;

CityGMLVersion(String value) {
this.value = value;
}

public String toValue() {
return this.value;
}

public static CityGMLVersion fromValue(String value) {
for (CityGMLVersion v : values()) {
if (v.value.equals(value)) {
return v;
}
}
return null;
}

public String toString() {
return this.value;
}
}
}

0 comments on commit aa37980

Please sign in to comment.