Skip to content

Fix Java 1.6 support. #161

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

Merged
merged 1 commit into from
Feb 12, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public String generate(Iterable<Map> optionsList) {

@Override
public String generate(Map options) {
List<String> eager = new ArrayList<>();
List<String> eager = new ArrayList<String>();
eager.add(super.generate(options));

if (StringUtils.isNotBlank(format)){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ public String generate(Map options) {
components.add(variables);
}

Map<String, String> params = new HashMap<>(64);
Map<String, String> params = new HashMap<String, String>(64);

params.put("a", Expression.normalize(angle));
params.put("ar", Expression.normalize(options.get("aspect_ratio")));
Expand Down Expand Up @@ -707,7 +707,7 @@ public String generate(Map options) {
params.put(SIMPLE_PARAMS[i], ObjectUtils.asString(options.get(SIMPLE_PARAMS[i + 1])));
}

params = new TreeMap<>(params);
params = new TreeMap<String, String>(params);

for (Map.Entry<String, String> param : params.entrySet()) {
if (StringUtils.isNotBlank(param.getValue())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void testResourcesListingStartAt() throws Exception {
public void testTransformationsWithCursor() throws Exception {
String name = "testTransformation" + SDK_TEST_TAG + System.currentTimeMillis();
api.createTransformation(name, "c_scale,w_100", null);
final List<Map> transformations = new ArrayList<>();
final List<Map> transformations = new ArrayList<Map>();
String next_cursor = null;
do {
Map result = api.transformations(ObjectUtils.asMap("max_results", 500, "next_cursor", next_cursor));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract public class AbstractUploaderTest extends MockableTest {
private static final String UPLOADER_TAG = SDK_TEST_TAG + "_uploader";
public static final int SRC_TEST_IMAGE_W = 241;
public static final int SRC_TEST_IMAGE_H = 51;
private static Map<String, Set<String>> toDelete = new HashMap<>();
private static Map<String, Set<String>> toDelete = new HashMap<String, Set<String>>();

@BeforeClass
public static void setUpClass() throws IOException {
Expand Down Expand Up @@ -546,7 +546,7 @@ public void testResponsiveBreakpoints() throws Exception {

@Test
public void testCreateArchive() throws Exception {
List<String> toDelete = new ArrayList<>(2);
List<String> toDelete = new ArrayList<String>(2);
Map result = cloudinary.uploader().createArchive(new ArchiveParams().tags(new String[]{ARCHIVE_TAG}));
toDelete.add(result.get("public_id").toString());
assertEquals(2, result.get("file_count"));
Expand Down Expand Up @@ -658,7 +658,7 @@ public void testQualityAnalysis() throws IOException {
private void addToDeleteList(String type, String id) {
Set<String> ids = toDelete.get(type);
if (ids == null) {
ids = new HashSet<>();
ids = new HashSet<String>();
toDelete.put(type, ids);
}

Expand Down
4 changes: 2 additions & 2 deletions java_shared.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java'

sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.6
targetCompatibility = 1.6
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
Expand Down