mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-106381 GUI Designer: JComboBoxes list does not populated under JDK7 and works fine under JDK6
This commit is contained in:
@@ -923,6 +923,10 @@ public class StringUtil extends StringUtilRt {
|
||||
}
|
||||
}
|
||||
|
||||
public static String defaultIfEmpty(@Nullable String value, String defaultValue) {
|
||||
return isEmpty(value) ? defaultValue : value;
|
||||
}
|
||||
|
||||
@Contract("null -> false")
|
||||
public static boolean isNotEmpty(@Nullable String s) {
|
||||
return s != null && !s.isEmpty();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.uiDesigner;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.util.ClassUtil;
|
||||
@@ -74,7 +75,8 @@ public final class PsiPropertiesProvider implements PropertiesProvider {
|
||||
}
|
||||
|
||||
final PsiType type = getter.getReturnType();
|
||||
final String propertyClassName = type.getCanonicalText();
|
||||
String propertyClassName =
|
||||
StringUtil.defaultIfEmpty(StringUtil.substringBefore(type.getCanonicalText(), "<"), type.getCanonicalText());
|
||||
|
||||
LwIntrospectedProperty property = CompiledClassPropertiesProvider.propertyFromClassName(propertyClassName, name);
|
||||
if (property == null) {
|
||||
|
||||
Reference in New Issue
Block a user