Skip to content
Snippets Groups Projects
Commit d7780973 authored by Vipin Sharma's avatar Vipin Sharma Committed by Christoph Langer
Browse files

8240524: Remove explicit type argument in test jdk/java/lang/Boolean/MakeBooleanComparable.java

Reviewed-by: clanger, vtewari
parent 661c0735
Branches
Tags
No related merge requests found
/* /*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
*/ */
public class GetBoolean { public class GetBoolean {
public static void main(String[] args) throws Exception { public static void main(String[] args) {
Boolean.getBoolean(""); Boolean.getBoolean("");
Boolean.getBoolean(null); Boolean.getBoolean(null);
} }
... ...
......
/* /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
import java.util.*; import java.util.*;
public class MakeBooleanComparable { public class MakeBooleanComparable {
public static void main(String args[]) { public static void main(String[] args) {
Random rnd = new Random(); Random rnd = new Random();
List<Boolean> list = new ArrayList<Boolean>(); List<Boolean> list = new ArrayList<>();
int numFalse = 0; int numFalse = 0;
for (int i = 0; i < 1000; i++) { for (int i = 0; i < 1000; i++) {
boolean element = rnd.nextBoolean(); boolean element = rnd.nextBoolean();
... ...
......
/* /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
*/ */
public class ParseBoolean { public class ParseBoolean {
public static void main(String[] args) throws Exception { public static void main(String[] args) {
checkTrue(Boolean.parseBoolean("TRUE")); checkTrue(Boolean.parseBoolean("TRUE"));
checkTrue(Boolean.parseBoolean("true")); checkTrue(Boolean.parseBoolean("true"));
checkTrue(Boolean.parseBoolean("TrUe")); checkTrue(Boolean.parseBoolean("TrUe"));
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment