Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 534252

Summary: [Tips] Api break in Google gson cause compile failure
Product: [Eclipse Project] Platform Reporter: Wim Jongman <wim.jongman>
Component: User AssistanceAssignee: Wim Jongman <wim.jongman>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.8   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/122012
https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=4cc458e26f2358e0cd2287277f570b93210ab9fa
Whiteboard:
Bug Depends on:    
Bug Blocks: 531784    

Description Wim Jongman CLA 2018-05-02 06:26:58 EDT
I am using JsonObject.keySet()

In one Eclipse I have com.google.gson 2.8.2 which has this method.
In another Eclipse I have com.google.gson 2.7.0 which does not have this method.

It looks like an API violation on googles part which would break Tips using any (2.0.0 2.8.2] installation of the gson library.

I am replacing:

	private static String doReplace(JsonObject object, String input) {
		String result = input;
		for (String key : object.keySet()) {
			JsonElement jsonElement = object.get(key);
					
With:

	private static String doReplace(JsonObject object, String input) {
		String result = input;
		for (Entry<String, JsonElement> key : object.entrySet()) {
			JsonElement jsonElement = object.get(key.getKey());
Comment 1 Eclipse Genie CLA 2018-05-02 06:30:08 EDT
New Gerrit change created: https://git.eclipse.org/r/122012