Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json.createObjectBuilder(Map) has impractical type bounds #33

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ jobs:
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
cache: 'maven'
- name: Verify
run: mvn -B -V -U -C -Poss-release clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Dgpg.skip=true
run: mvn -B -V -U -C -Poss-release,staging clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Dgpg.skip=true
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ class JsonObjectBuilderImpl implements JsonObjectBuilder {
this.rejectDuplicateKeys = rejectDuplicateKeys;
}

JsonObjectBuilderImpl(Map<String, Object> map, BufferPool bufferPool) {
JsonObjectBuilderImpl(Map<String, ?> map, BufferPool bufferPool) {
this.bufferPool = bufferPool;
valueMap = new LinkedHashMap<>();
populate(map);
rejectDuplicateKeys = false;
}

JsonObjectBuilderImpl(Map<String, Object> map, BufferPool bufferPool, boolean rejectDuplicateKeys) {
JsonObjectBuilderImpl(Map<String, ?> map, BufferPool bufferPool, boolean rejectDuplicateKeys) {
this.bufferPool = bufferPool;
valueMap = new LinkedHashMap<>();
populate(map);
Expand Down Expand Up @@ -189,7 +189,7 @@ public JsonObject build() {
return new JsonObjectImpl(snapshot, bufferPool);
}

private void populate(Map<String, Object> map) {
private void populate(Map<String, ?> map) {
final Set<String> fields = map.keySet();
for (String field : fields) {
Object value = map.get(field);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public JsonObjectBuilder createObjectBuilder(JsonObject object) {
}

@Override
public JsonObjectBuilder createObjectBuilder(Map<String, Object> map) {
public JsonObjectBuilder createObjectBuilder(Map<String, ?> map) {
return new JsonObjectBuilderImpl(map, bufferPool);
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<spotbugs.threshold>Low</spotbugs.threshold>
<spotbugs.version>4.2.2</spotbugs.version>

<jakarta.json-api.version>2.0.1</jakarta.json-api.version>
<jakarta.json-api.version>2.1.0-RC1</jakarta.json-api.version>

<jakarta.annotation-api.version>2.0.0</jakarta.annotation-api.version>
<jakarta.xml.bind-api.version>3.0.1</jakarta.xml.bind-api.version>
Expand Down