8072433: copy/paste duplicated tests in some condition statements
authorprr
Wed, 04 Feb 2015 10:29:51 -0800
changeset 29008 e368342daf04
parent 29007 4dd0e891af6d
child 29009 ae6b1fecea51
8072433: copy/paste duplicated tests in some condition statements Reviewed-by: bae, serb
jdk/src/java.desktop/share/classes/sun/font/FontFamily.java
jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java
--- a/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java	Wed Feb 04 10:28:40 2015 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java	Wed Feb 04 10:29:51 2015 -0800
@@ -78,7 +78,7 @@
             family.bolditalic = null;
         }
         if (family.plain == null && family.bold == null &&
-            family.plain == null && family.bold == null) {
+            family.italic == null && family.bolditalic == null) {
             familyNameMap.remove(name);
         }
     }
--- a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Wed Feb 04 10:28:40 2015 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Wed Feb 04 10:29:51 2015 -0800
@@ -1564,7 +1564,7 @@
                 bmObj = bmTmpObj;
             } else {
                 if (lmObj == null || rmObj == null ||
-                    tmObj == null || rmObj == null) {
+                    tmObj == null || bmObj == null) {
                     return;
                 } else {
                     leftMargin.setValue(lmObj);