suggest extends&super in wildcards (IDEA-97765, IDEA-57321)

This commit is contained in:
peter
2012-12-18 18:25:31 +01:00
parent ea73902b92
commit 3e0d7a41c9
6 changed files with 17 additions and 46 deletions
@@ -1,19 +1,3 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public class Main {
public static void main() {
@@ -0,0 +1,9 @@
public class Main {
public int compare(Object value1, Object value2) {
if (value1 instanceof Comparable && value2 instanceof Comparable) {
return ((Comparable<? <caret>>) value1).compareTo(value2);
}
throw new IllegalArgumentException();
}
}
@@ -1,19 +1,3 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public class Main {
public static void main() {