xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r1543560 [2/2] - in /xmlgraphics/fop/trunk: ./ src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/ src/java/org/apache/fop/complexscripts/bidi/ src/java/org/apache/fop/complexscripts/fonts/ src/java/org/apache/fop/complexscripts/sc...
Date Tue, 19 Nov 2013 20:20:12 GMT
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubtable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubtable.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubtable.java
Tue Nov 19 20:20:11 2013
@@ -24,7 +24,6 @@ import java.lang.ref.WeakReference;
 import java.util.List;
 import java.util.Map;
 
-// CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
 
 /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java Tue
Nov 19 20:20:11 2013
@@ -37,12 +37,7 @@ import org.apache.commons.logging.LogFac
 import org.apache.fop.complexscripts.util.GlyphSequence;
 import org.apache.fop.complexscripts.util.ScriptContextTester;
 
-// CSOFF: EmptyForIteratorPadCheck
-// CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: ParameterNumberCheck
-// CSOFF: SimplifyBooleanReturnCheck
 
 /**
  * <p>Base class for all advanced typographic glyph tables.</p>
@@ -86,7 +81,7 @@ public class GlyphTable {
      * @param lookups map from lookup specs to lookup tables
      */
     public GlyphTable(GlyphTable gdef, Map/*<LookupSpec,List<String>>*/ lookups)
{
-        if ((gdef != null) && ! (gdef instanceof GlyphDefinitionTable)) {
+        if ((gdef != null) && !(gdef instanceof GlyphDefinitionTable)) {
             throw new AdvancedTypographicTableFormatException("bad glyph definition table");
         } else if (lookups == null) {
             throw new AdvancedTypographicTableFormatException("lookups must be non-null map");
@@ -166,7 +161,7 @@ public class GlyphTable {
      * create resulting cached state.
      */
     protected void freezeSubtables() {
-        if (! frozen) {
+        if (!frozen) {
             for (Iterator it = lookupTables.values().iterator(); it.hasNext(); ) {
                 LookupTable lt = (LookupTable) it.next();
                 lt.freezeSubtables(lookupTables);
@@ -188,18 +183,18 @@ public class GlyphTable {
         List/*<LookupSpec>*/ matches = new ArrayList/*<LookupSpec>*/();
         for (Iterator it = keys.iterator(); it.hasNext();) {
             LookupSpec ls = (LookupSpec) it.next();
-            if (! "*".equals(script)) {
-                if (! ls.getScript().equals(script)) {
+            if (!"*".equals(script)) {
+                if (!ls.getScript().equals(script)) {
                     continue;
                 }
             }
-            if (! "*".equals(language)) {
-                if (! ls.getLanguage().equals(language)) {
+            if (!"*".equals(language)) {
+                if (!ls.getLanguage().equals(language)) {
                     continue;
                 }
             }
-            if (! "*".equals(feature)) {
-                if (! ls.getFeature().equals(feature)) {
+            if (!"*".equals(feature)) {
+                if (!ls.getFeature().equals(feature)) {
                     continue;
                 }
             }
@@ -359,17 +354,17 @@ public class GlyphTable {
          * @param permitWildcard if true the permit wildcard script, language, or feature
          */
         LookupSpec(String script, String language, String feature, boolean permitEmpty, boolean
permitWildcard) {
-            if ((script == null) || (! permitEmpty && (script.length() == 0))) {
+            if ((script == null) || (!permitEmpty && (script.length() == 0))) {
                 throw new AdvancedTypographicTableFormatException("script must be non-empty
string");
-            } else if ((language == null) || (! permitEmpty && (language.length()
== 0))) {
+            } else if ((language == null) || (!permitEmpty && (language.length()
== 0))) {
                 throw new AdvancedTypographicTableFormatException("language must be non-empty
string");
-            } else if ((feature == null) || (! permitEmpty && (feature.length() ==
0))) {
+            } else if ((feature == null) || (!permitEmpty && (feature.length() ==
0))) {
                 throw new AdvancedTypographicTableFormatException("feature must be non-empty
string");
-            } else if (! permitWildcard && script.equals("*")) {
+            } else if (!permitWildcard && script.equals("*")) {
                 throw new AdvancedTypographicTableFormatException("script must not be wildcard");
-            } else if (! permitWildcard && language.equals("*")) {
+            } else if (!permitWildcard && language.equals("*")) {
                 throw new AdvancedTypographicTableFormatException("language must not be wildcard");
-            } else if (! permitWildcard && feature.equals("*")) {
+            } else if (!permitWildcard && feature.equals("*")) {
                 throw new AdvancedTypographicTableFormatException("feature must not be wildcard");
             }
             this.script = script.trim();
@@ -405,14 +400,12 @@ public class GlyphTable {
         public boolean equals(Object o) {
             if (o instanceof LookupSpec) {
                 LookupSpec l = (LookupSpec) o;
-                if (! l.script.equals(script)) {
+                if (!l.script.equals(script)) {
                     return false;
-                } else if (! l.language.equals(language)) {
-                    return false;
-                } else if (! l.feature.equals(feature)) {
+                } else if (!l.language.equals(language)) {
                     return false;
                 } else {
-                    return true;
+                    return l.feature.equals(feature);
                 }
             } else {
                 return false;
@@ -540,7 +533,7 @@ public class GlyphTable {
                 }
             }
             // append at end of list
-            if (! added && (subtable != null)) {
+            if (!added && (subtable != null)) {
                 subtables.add(subtable);
                 added = true;
             }
@@ -567,7 +560,7 @@ public class GlyphTable {
             }
             if (subtables.size() > 0) {
                 GlyphSubtable st = (GlyphSubtable) subtables.get(0);
-                if (! st.isCompatible(subtable)) {
+                if (!st.isCompatible(subtable)) {
                     throw new AdvancedTypographicTableFormatException("subtable " + subtable
+ " is not compatible with subtable " + st);
                 }
             }
@@ -580,7 +573,7 @@ public class GlyphTable {
          * @param lookupTables map from lookup table identifers, e.g. "lu4", to lookup tables
          */
         public void freezeSubtables(Map/*<String,LookupTable>*/ lookupTables) {
-            if (! frozen) {
+            if (!frozen) {
                 GlyphSubtable[] sta = getSubtables();
                 resolveLookupReferences(sta, lookupTables);
                 this.subtablesArray = sta;
@@ -1305,7 +1298,7 @@ public class GlyphTable {
                 Class c = r0.getClass();
                 for (int i = 1, n = rules.length; i < n; i++) {
                     Rule r = rules[i];
-                    if ((r != null) && ! c.isInstance(r)) {
+                    if ((r != null) && !c.isInstance(r)) {
                         throw new AdvancedTypographicTableFormatException("rules[" + i +
"] is not an instance of " + c.getName());
                     }
                 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
Tue Nov 19 20:20:11 2013
@@ -33,10 +33,6 @@ import org.apache.fop.fonts.truetype.OFD
 import org.apache.fop.fonts.truetype.OFTableName;
 import org.apache.fop.fonts.truetype.OpenFont;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
 // CSOFF: LineLengthCheck
 
 /**
@@ -3791,7 +3787,7 @@ public final class OTFAdvancedTypographi
         } else {
             boolean first = true;
             for (int i = 0; i < ia.length; i++) {
-                if (! first) {
+                if (!first) {
                     sb.append(' ');
                 } else {
                     first = false;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ArabicScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ArabicScriptProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ArabicScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ArabicScriptProcessor.java
Tue Nov 19 20:20:11 2013
@@ -33,10 +33,6 @@ import org.apache.fop.complexscripts.uti
 import org.apache.fop.complexscripts.util.GlyphSequence;
 import org.apache.fop.complexscripts.util.ScriptContextTester;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
 // CSOFF: LineLengthCheck
 
 /**
@@ -159,11 +155,11 @@ public class ArabicScriptProcessor exten
         } else {
             int s = a.getStart();
             int e = a.getEnd();
-            if (! hasFinalPrecedingContext(ca, nc, s, e)) {
+            if (!hasFinalPrecedingContext(ca, nc, s, e)) {
                 return false;
             } else if (forcesFinalThisContext(ca, nc, s, e)) {
                 return true;
-            } else if (! hasFinalFollowingContext(ca, nc, s, e)) {
+            } else if (!hasFinalFollowingContext(ca, nc, s, e)) {
                 return false;
             } else {
                 return true;
@@ -180,9 +176,9 @@ public class ArabicScriptProcessor exten
         } else {
             int s = a.getStart();
             int e = a.getEnd();
-            if (! hasInitialPrecedingContext(ca, nc, s, e)) {
+            if (!hasInitialPrecedingContext(ca, nc, s, e)) {
                 return false;
-            } else if (! hasInitialFollowingContext(ca, nc, s, e)) {
+            } else if (!hasInitialFollowingContext(ca, nc, s, e)) {
                 return false;
             } else {
                 return true;
@@ -211,9 +207,9 @@ public class ArabicScriptProcessor exten
         } else {
             int s = a.getStart();
             int e = a.getEnd();
-            if (! hasLigaturePrecedingContext(ca, nc, s, e)) {
+            if (!hasLigaturePrecedingContext(ca, nc, s, e)) {
                 return false;
-            } else if (! hasLigatureFollowingContext(ca, nc, s, e)) {
+            } else if (!hasLigatureFollowingContext(ca, nc, s, e)) {
                 return false;
             } else {
                 return true;
@@ -230,11 +226,11 @@ public class ArabicScriptProcessor exten
         } else {
             int s = a.getStart();
             int e = a.getEnd();
-            if (! hasMedialPrecedingContext(ca, nc, s, e)) {
+            if (!hasMedialPrecedingContext(ca, nc, s, e)) {
                 return false;
-            } else if (! hasMedialThisContext(ca, nc, s, e)) {
+            } else if (!hasMedialThisContext(ca, nc, s, e)) {
                 return false;
-            } else if (! hasMedialFollowingContext(ca, nc, s, e)) {
+            } else if (!hasMedialFollowingContext(ca, nc, s, e)) {
                 return false;
             } else {
                 return true;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
Tue Nov 19 20:20:11 2013
@@ -24,11 +24,6 @@ import org.apache.commons.logging.LogFac
 
 import org.apache.fop.complexscripts.util.GlyphSequence;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: WhitespaceAfter
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
 // CSOFF: LineLengthCheck
 
 /**
@@ -109,7 +104,7 @@ public class DevanagariScriptProcessor e
     }
 
     private static boolean containsHalfConsonant(GlyphSequence gs, int k) {
-        Boolean half = (Boolean) gs.getAssociation(k) . getPredication("half");
+        Boolean half = (Boolean) gs.getAssociation(k) .getPredication("half");
         return (half != null) ? half.booleanValue() : false;
     }
 
@@ -134,7 +129,7 @@ public class DevanagariScriptProcessor e
         // first candidate target is after first non-half consonant
         for (int i = 0; i < ng; i++) {
             if ((i != source) && containsConsonant(gs, i)) {
-                if (! containsHalfConsonant(gs, i)) {
+                if (!containsHalfConsonant(gs, i)) {
                     c1 = i + 1;
                     break;
                 }
@@ -142,7 +137,7 @@ public class DevanagariScriptProcessor e
         }
         // second candidate target is after last non-prebase matra after first candidate
or before first syllable or vedic mark
         for (int i = (c1 >= 0) ? c1 : 0; i < ng; i++) {
-            if (containsMatra(gs, i) && ! containsPreBaseMatra(gs, i)) {
+            if (containsMatra(gs, i) && !containsPreBaseMatra(gs, i)) {
                 c2 = i + 1;
             } else if (containsOtherMark(gs, i)) {
                 c2 = i;
@@ -159,7 +154,7 @@ public class DevanagariScriptProcessor e
     }
 
     private static boolean containsReph(GlyphSequence gs, int k) {
-        Boolean rphf = (Boolean) gs.getAssociation(k) . getPredication("rphf");
+        Boolean rphf = (Boolean) gs.getAssociation(k) .getPredication("rphf");
         return (rphf != null) ? rphf.booleanValue() : false;
     }
 
@@ -503,13 +498,13 @@ public class DevanagariScriptProcessor e
         }
     }
     static boolean isC(int c) {
-        return isType(c,C_C);
+        return isType(c, C_C);
     }
     static boolean isR(int c) {
-        return isType(c,C_C) && hasR(c);
+        return isType(c, C_C) && hasR(c);
     }
     static boolean isV(int c) {
-        return isType(c,C_V);
+        return isType(c, C_V);
     }
     static boolean isN(int c) {
         return c == 0x093C;
@@ -518,10 +513,10 @@ public class DevanagariScriptProcessor e
         return c == 0x094D;
     }
     static boolean isM(int c) {
-        return isType(c,C_M);
+        return isType(c, C_M);
     }
     static boolean isPreM(int c) {
-        return isType(c,C_M) && hasFlag(c,C_PRE);
+        return isType(c, C_M) && hasFlag(c, C_PRE);
     }
     static boolean isX(int c) {
         switch (typeOf(c)) {
@@ -535,10 +530,10 @@ public class DevanagariScriptProcessor e
         }
     }
     static boolean hasR(int c) {
-        return hasFlag(c,C_R);
+        return hasFlag(c, C_R);
     }
     static boolean hasN(int c) {
-        return hasFlag(c,C_N);
+        return hasFlag(c, C_N);
     }
 
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
Tue Nov 19 20:20:11 2013
@@ -24,11 +24,6 @@ import org.apache.commons.logging.LogFac
 
 import org.apache.fop.complexscripts.util.GlyphSequence;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: WhitespaceAfter
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
 // CSOFF: LineLengthCheck
 
 /**
@@ -109,7 +104,7 @@ public class GujaratiScriptProcessor ext
     }
 
     private static boolean containsHalfConsonant(GlyphSequence gs, int k) {
-        Boolean half = (Boolean) gs.getAssociation(k) . getPredication("half");
+        Boolean half = (Boolean) gs.getAssociation(k) .getPredication("half");
         return (half != null) ? half.booleanValue() : false;
     }
 
@@ -134,7 +129,7 @@ public class GujaratiScriptProcessor ext
         // first candidate target is after first non-half consonant
         for (int i = 0; i < ng; i++) {
             if ((i != source) && containsConsonant(gs, i)) {
-                if (! containsHalfConsonant(gs, i)) {
+                if (!containsHalfConsonant(gs, i)) {
                     c1 = i + 1;
                     break;
                 }
@@ -142,7 +137,7 @@ public class GujaratiScriptProcessor ext
         }
         // second candidate target is after last non-prebase matra after first candidate
or before first syllable or vedic mark
         for (int i = (c1 >= 0) ? c1 : 0; i < ng; i++) {
-            if (containsMatra(gs, i) && ! containsPreBaseMatra(gs, i)) {
+            if (containsMatra(gs, i) && !containsPreBaseMatra(gs, i)) {
                 c2 = i + 1;
             } else if (containsOtherMark(gs, i)) {
                 c2 = i;
@@ -159,7 +154,7 @@ public class GujaratiScriptProcessor ext
     }
 
     private static boolean containsReph(GlyphSequence gs, int k) {
-        Boolean rphf = (Boolean) gs.getAssociation(k) . getPredication("rphf");
+        Boolean rphf = (Boolean) gs.getAssociation(k) .getPredication("rphf");
         return (rphf != null) ? rphf.booleanValue() : false;
     }
 
@@ -503,13 +498,13 @@ public class GujaratiScriptProcessor ext
         }
     }
     static boolean isC(int c) {
-        return isType(c,C_C);
+        return isType(c, C_C);
     }
     static boolean isR(int c) {
-        return isType(c,C_C) && hasR(c);
+        return isType(c, C_C) && hasR(c);
     }
     static boolean isV(int c) {
-        return isType(c,C_V);
+        return isType(c, C_V);
     }
     static boolean isN(int c) {
         return c == 0x0ABC;
@@ -518,10 +513,10 @@ public class GujaratiScriptProcessor ext
         return c == 0x0ACD;
     }
     static boolean isM(int c) {
-        return isType(c,C_M);
+        return isType(c, C_M);
     }
     static boolean isPreM(int c) {
-        return isType(c,C_M) && hasFlag(c,C_PRE);
+        return isType(c, C_M) && hasFlag(c, C_PRE);
     }
     static boolean isX(int c) {
         switch (typeOf(c)) {
@@ -535,10 +530,10 @@ public class GujaratiScriptProcessor ext
         }
     }
     static boolean hasR(int c) {
-        return hasFlag(c,C_R);
+        return hasFlag(c, C_R);
     }
     static boolean hasN(int c) {
-        return hasFlag(c,C_N);
+        return hasFlag(c, C_N);
     }
 
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
Tue Nov 19 20:20:11 2013
@@ -25,11 +25,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.fop.complexscripts.fonts.GlyphDefinitionTable;
 import org.apache.fop.complexscripts.util.GlyphSequence;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: WhitespaceAfter
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
 // CSOFF: LineLengthCheck
 
 /**
@@ -110,7 +105,7 @@ public class GurmukhiScriptProcessor ext
     }
 
     private static boolean containsHalfConsonant(GlyphSequence gs, int k) {
-        Boolean half = (Boolean) gs.getAssociation(k) . getPredication("half");
+        Boolean half = (Boolean) gs.getAssociation(k) .getPredication("half");
         return (half != null) ? half.booleanValue() : false;
     }
 
@@ -135,7 +130,7 @@ public class GurmukhiScriptProcessor ext
         // first candidate target is after first non-half consonant
         for (int i = 0; i < ng; i++) {
             if ((i != source) && containsConsonant(gs, i)) {
-                if (! containsHalfConsonant(gs, i)) {
+                if (!containsHalfConsonant(gs, i)) {
                     c1 = i + 1;
                     break;
                 }
@@ -143,7 +138,7 @@ public class GurmukhiScriptProcessor ext
         }
         // second candidate target is after last non-prebase matra after first candidate
or before first syllable or vedic mark
         for (int i = (c1 >= 0) ? c1 : 0; i < ng; i++) {
-            if (containsMatra(gs, i) && ! containsPreBaseMatra(gs, i)) {
+            if (containsMatra(gs, i) && !containsPreBaseMatra(gs, i)) {
                 c2 = i + 1;
             } else if (containsOtherMark(gs, i)) {
                 c2 = i;
@@ -160,7 +155,7 @@ public class GurmukhiScriptProcessor ext
     }
 
     private static boolean containsReph(GlyphSequence gs, int k) {
-        Boolean rphf = (Boolean) gs.getAssociation(k) . getPredication("rphf");
+        Boolean rphf = (Boolean) gs.getAssociation(k) .getPredication("rphf");
         return (rphf != null) ? rphf.booleanValue() : false;
     }
 
@@ -504,13 +499,13 @@ public class GurmukhiScriptProcessor ext
         }
     }
     static boolean isC(int c) {
-        return isType(c,C_C);
+        return isType(c, C_C);
     }
     static boolean isR(int c) {
-        return isType(c,C_C) && hasR(c);
+        return isType(c, C_C) && hasR(c);
     }
     static boolean isV(int c) {
-        return isType(c,C_V);
+        return isType(c, C_V);
     }
     static boolean isN(int c) {
         return c == 0x0A3C;
@@ -519,10 +514,10 @@ public class GurmukhiScriptProcessor ext
         return c == 0x0A4D;
     }
     static boolean isM(int c) {
-        return isType(c,C_M);
+        return isType(c, C_M);
     }
     static boolean isPreM(int c) {
-        return isType(c,C_M) && hasFlag(c,C_PRE);
+        return isType(c, C_M) && hasFlag(c, C_PRE);
     }
     static boolean isX(int c) {
         switch (typeOf(c)) {
@@ -536,10 +531,10 @@ public class GurmukhiScriptProcessor ext
         }
     }
     static boolean hasR(int c) {
-        return hasFlag(c,C_R);
+        return hasFlag(c, C_R);
     }
     static boolean hasN(int c) {
-        return hasFlag(c,C_N);
+        return hasFlag(c, C_N);
     }
 
     @Override

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
Tue Nov 19 20:20:11 2013
@@ -36,13 +36,6 @@ import org.apache.fop.complexscripts.uti
 import org.apache.fop.complexscripts.util.GlyphSequence;
 import org.apache.fop.complexscripts.util.ScriptContextTester;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
-// CSOFF: EmptyForIteratorPadCheck
-// CSOFF: WhitespaceAfterCheck
-// CSOFF: ParameterNumberCheck
 // CSOFF: LineLengthCheck
 
 /**
@@ -222,7 +215,7 @@ public class IndicScriptProcessor extend
     }
 
     private GlyphSequence[] syllabize(GlyphSequence gs, String script, String language) {
-        return Syllabizer.getSyllabizer(script, language, getSyllabizerClass()) . syllabize(gs);
+        return Syllabizer.getSyllabizer(script, language, getSyllabizerClass()) .syllabize(gs);
     }
 
     private GlyphSequence unsyllabize(GlyphSequence gs, GlyphSequence[] sa) {
@@ -384,12 +377,10 @@ public class IndicScriptProcessor extend
         public boolean equals(Object o) {
             if (o instanceof Syllabizer) {
                 Syllabizer s = (Syllabizer) o;
-                if (! s.script.equals(script)) {
-                    return false;
-                } else if (! s.language.equals(language)) {
+                if (!s.script.equals(script)) {
                     return false;
                 } else {
-                    return true;
+                    return s.language.equals(language);
                 }
             } else {
                 return false;
@@ -408,7 +399,7 @@ public class IndicScriptProcessor extend
             }
             return d;
         }
-        private static Map<String,Syllabizer> syllabizers = new HashMap<String,Syllabizer>();
+        private static Map<String, Syllabizer> syllabizers = new HashMap<String,
Syllabizer>();
         static Syllabizer getSyllabizer(String script, String language, Class<? extends
Syllabizer> syllabizerClass) {
             String sid = makeSyllabizerId(script, language);
             Syllabizer s = syllabizers.get(sid);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
Tue Nov 19 20:20:11 2013
@@ -31,11 +31,7 @@ import org.apache.fop.complexscripts.uti
 import org.apache.fop.complexscripts.util.GlyphSequence;
 import org.apache.fop.complexscripts.util.ScriptContextTester;
 
-// CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: ParameterNumberCheck
-// CSOFF: SimplifyBooleanReturnCheck
 
 /**
  * <p>Abstract script processor base class for which an implementation of the substitution
and positioning methods
@@ -278,14 +274,12 @@ public abstract class ScriptProcessor {
         public boolean equals(Object o) {
             if (o instanceof AssembledLookupsKey) {
                 AssembledLookupsKey k = (AssembledLookupsKey) o;
-                if (! table.equals(k.table)) {
+                if (!table.equals(k.table)) {
                     return false;
-                } else if (! Arrays.equals(features, k.features)) {
-                    return false;
-                } else if (! lookups.equals(k.lookups)) {
+                } else if (!Arrays.equals(features, k.features)) {
                     return false;
                 } else {
-                    return true;
+                    return lookups.equals(k.lookups);
                 }
             } else {
                 return false;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java Tue
Nov 19 20:20:11 2013
@@ -28,12 +28,6 @@ import java.util.Set;
 
 import org.apache.fop.util.CharUtilities;
 
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: LineLengthCheck
-// CSOFF: SimplifyBooleanReturnCheck
-// CSOFF: WhitespaceAfterCheck
-
 /**
  * <p>Script related utilities.</p>
  *
@@ -754,16 +748,14 @@ public final class CharScript {
             case SCRIPT_UNCODED:
                 break;
             default:
-                {
-                    Integer v = (Integer) e.getValue();
-                    assert v != null;
-                    int c = v.intValue();
-                    if (c > cMax) {
-                        cMax = c;
-                        sMax = s;
-                    }
-                    break;
+                Integer v = (Integer) e.getValue();
+                assert v != null;
+                int c = v.intValue();
+                if (c > cMax) {
+                    cMax = c;
+                    sMax = s;
                 }
+                break;
             }
         }
         if (sMax < 0) {
@@ -823,7 +815,7 @@ public final class CharScript {
      * @return a  script tag
      */
     public static String scriptTagFromCode(int code) {
-        Map<Integer,String> m = getScriptTagsMap();
+        Map<Integer, String> m = getScriptTagsMap();
         if (m != null) {
             String tag;
             if ((tag = m.get(Integer.valueOf(code))) != null) {
@@ -842,7 +834,7 @@ public final class CharScript {
      * @return a script code
      */
     public static int scriptCodeFromTag(String tag) {
-        Map<String,Integer> m = getScriptCodeMap();
+        Map<String, Integer> m = getScriptCodeMap();
         if (m != null) {
             Integer c;
             if ((c = m.get(tag)) != null) {
@@ -855,8 +847,8 @@ public final class CharScript {
         }
     }
 
-    private static Map<Integer,String> scriptTagsMap = null;
-    private static Map<String,Integer> scriptCodeMap = null;
+    private static Map<Integer, String> scriptTagsMap = null;
+    private static Map<String, Integer> scriptCodeMap = null;
 
     private static void putScriptTag(Map tm, Map cm, int code, String tag) {
         assert tag != null;
@@ -868,8 +860,8 @@ public final class CharScript {
     }
 
     private static void makeScriptMaps() {
-        HashMap<Integer,String> tm = new HashMap<Integer,String>();
-        HashMap<String,Integer> cm = new HashMap<String,Integer>();
+        HashMap<Integer, String> tm = new HashMap<Integer, String>();
+        HashMap<String, Integer> cm = new HashMap<String, Integer>();
         putScriptTag(tm, cm, SCRIPT_HEBREW, "hebr");
         putScriptTag(tm, cm, SCRIPT_MONGOLIAN, "mong");
         putScriptTag(tm, cm, SCRIPT_ARABIC, "arab");
@@ -915,14 +907,14 @@ public final class CharScript {
         scriptCodeMap = cm;
     }
 
-    private static Map<Integer,String> getScriptTagsMap() {
+    private static Map<Integer, String> getScriptTagsMap() {
         if (scriptTagsMap == null) {
             makeScriptMaps();
         }
         return scriptTagsMap;
     }
 
-    private static Map<String,Integer> getScriptCodeMap() {
+    private static Map<String, Integer> getScriptCodeMap() {
         if (scriptCodeMap == null) {
             makeScriptMaps();
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java Tue
Nov 19 20:20:11 2013
@@ -26,10 +26,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-// CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
-// CSOFF: WhitespaceAfterCheck
-// CSOFF: NoWhitespaceAfterCheck
 
 /**
  * <p>A GlyphSequence encapsulates a sequence of character codes, a sequence of glyph
codes,
@@ -639,10 +636,10 @@ public class GlyphSequence implements Cl
         private final int offset;
         private final int count;
         private final int[] subIntervals;
-        private Map<String,Object> predications;
+        private Map<String, Object> predications;
 
         // class state
-        private static volatile Map<String,PredicationMerger> predicationMergers;
+        private static volatile Map<String, PredicationMerger> predicationMergers;
 
         interface PredicationMerger {
             Object merge(String key, Object v1, Object v2);
@@ -724,7 +721,7 @@ public class GlyphSequence implements Cl
         public boolean contained(int offset, int count) {
             int s = offset;
             int e = offset + count;
-            if (! isDisjoint()) {
+            if (!isDisjoint()) {
                 int s0 = getStart();
                 int e0 = getEnd();
                 return (s0 >= s) && (e0 <= e);
@@ -748,7 +745,7 @@ public class GlyphSequence implements Cl
          */
         public void setPredication(String key, Object value) {
             if (predications == null) {
-                predications = new HashMap<String,Object>();
+                predications = new HashMap<String, Object>();
             }
             if (predications != null) {
                 predications.put(key, value);
@@ -775,7 +772,7 @@ public class GlyphSequence implements Cl
          */
         public void mergePredication(String key, Object value) {
             if (predications == null) {
-                predications = new HashMap<String,Object>();
+                predications = new HashMap<String, Object>();
             }
             if (predications != null) {
                 if (predications.containsKey(key)) {
@@ -813,7 +810,7 @@ public class GlyphSequence implements Cl
          */
         public void mergePredications(CharAssociation ca) {
             if (ca.predications != null) {
-                for (Map.Entry<String,Object> e : ca.predications.entrySet()) {
+                for (Map.Entry<String, Object> e : ca.predications.entrySet()) {
                     mergePredication(e.getKey(), e.getValue());
                 }
             }
@@ -824,7 +821,7 @@ public class GlyphSequence implements Cl
             try {
                 CharAssociation ca = (CharAssociation) super.clone();
                 if (predications != null) {
-                    ca.predications = new HashMap<String,Object>(predications);
+                    ca.predications = new HashMap<String, Object>(predications);
                 }
                 return ca;
             } catch (CloneNotSupportedException e) {
@@ -839,7 +836,7 @@ public class GlyphSequence implements Cl
          */
         public static void setPredicationMerger(String key, PredicationMerger pm) {
             if (predicationMergers == null) {
-                predicationMergers = new HashMap<String,PredicationMerger>();
+                predicationMergers = new HashMap<String, PredicationMerger>();
             }
             if (predicationMergers != null) {
                 predicationMergers.put(key, pm);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/NumberConverter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/NumberConverter.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/NumberConverter.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/NumberConverter.java
Tue Nov 19 20:20:11 2013
@@ -23,9 +23,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 // CSOFF: LineLengthCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: AvoidNestedBlocksCheck
 
 /**
  * <p>Implementation of Number to String Conversion algorithm specified by
@@ -186,10 +183,10 @@ public class NumberConverter {
                 separators.add(token.toArray(new Integer [ token.size() ]));
             }
         }
-        if (! separators.isEmpty()) {
+        if (!separators.isEmpty()) {
             this.prefix = separators.remove(0);
         }
-        if (! separators.isEmpty()) {
+        if (!separators.isEmpty()) {
             this.suffix = separators.remove(separators.size() - 1);
         }
         this.separators = separators.toArray(new Integer [ separators.size() ] []);
@@ -260,33 +257,27 @@ public class NumberConverter {
             int s = token[0].intValue();
             switch (s) {
             case (int) '1':
-                {
-                    fn = formatNumberAsDecimal(number, (int) '1', 1);
-                    break;
-                }
+                fn = formatNumberAsDecimal(number, (int) '1', 1);
+            break;
             case (int) 'W':
             case (int) 'w':
-                {
-                    fn = formatNumberAsWord(number, (s == (int) 'W') ? Character.UPPERCASE_LETTER
: Character.LOWERCASE_LETTER);
-                    break;
-                }
+                fn = formatNumberAsWord(number, (s == (int) 'W') ? Character.UPPERCASE_LETTER
: Character.LOWERCASE_LETTER);
+            break;
             case (int) 'A': // handled as numeric sequence
             case (int) 'a': // handled as numeric sequence
             case (int) 'I': // handled as numeric special
             case (int) 'i': // handled as numeric special
             default:
-                {
-                    if (isStartOfDecimalSequence(s)) {
-                        fn = formatNumberAsDecimal(number, s, 1);
-                    } else if (isStartOfAlphabeticSequence(s)) {
-                        fn = formatNumberAsSequence(number, s, getSequenceBase(s), null);
-                    } else if (isStartOfNumericSpecial(s)) {
-                        fn = formatNumberAsSpecial(number, s);
-                    } else {
-                        fn = null;
-                    }
-                    break;
+                if (isStartOfDecimalSequence(s)) {
+                    fn = formatNumberAsDecimal(number, s, 1);
+                } else if (isStartOfAlphabeticSequence(s)) {
+                    fn = formatNumberAsSequence(number, s, getSequenceBase(s), null);
+                } else if (isStartOfNumericSpecial(s)) {
+                    fn = formatNumberAsSpecial(number, s);
+                } else {
+                    fn = null;
                 }
+                break;
             }
         } else if ((token.length == 2) && (token[0] == (int) 'W') && (token[1]
== (int) 'w')) {
             fn = formatNumberAsWord(number, Character.TITLECASE_LETTER);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/UTF32.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/UTF32.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/UTF32.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/UTF32.java Tue Nov 19
20:20:11 2013
@@ -21,7 +21,6 @@ package org.apache.fop.complexscripts.ut
 
 import org.apache.fop.util.CharUtilities;
 
-// CSOFF: InnerAssignmentCheck
 
 /**
  * <p>UTF32 related utilities.</p>

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java Tue Nov 19 20:20:11
2013
@@ -39,7 +39,6 @@ import org.apache.fop.fonts.truetype.Fon
 import org.apache.fop.fonts.truetype.OFFontLoader;
 import org.apache.fop.fonts.truetype.TTFFile;
 
-// CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
 
 /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java Tue Nov
19 20:20:11 2013
@@ -29,7 +29,6 @@ package org.apache.fop.text.linebreak;
  * - commit BOTH changed files
  */
 
-// CSOFF: WhitespaceAfterCheck
 // CSOFF: LineLengthCheck
 
 /** Line breaking utilities. */
@@ -694,11 +693,11 @@ public final class LineBreakUtils {
         "CP", "CR", "EX", "GL", "H2", "H3", "HY", "ID", "IN", "IS", "JL", "JT", "JV", "LF",
"NL", "NS", "NU", "OP",
         "PO", "PR", "QU", "SA", "SG", "SP", "SY", "WJ", "XX", "ZW"};
 
-    private static String[] lineBreakPropertyLongNames = {"Ambiguous","Alphabetic","Break_Both","Break_After","Break_Before",
-        "Mandatory_Break","Contingent_Break","Close_Punctuation","Combining_Mark","Close_Parenthesis","Carriage_Return",
-        "Exclamation","Glue","H2","H3","Hyphen","Ideographic","Inseparable","Infix_Numeric","JL","JT","JV","Line_Feed",
-        "Next_Line","Nonstarter","Numeric","Open_Punctuation","Postfix_Numeric","Prefix_Numeric","Quotation","Complex_Context",
-        "Surrogate","Space","Break_Symbols","Word_Joiner","Unknown","ZWSpace"};
+    private static String[] lineBreakPropertyLongNames = {"Ambiguous", "Alphabetic", "Break_Both",
"Break_After", "Break_Before",
+        "Mandatory_Break", "Contingent_Break", "Close_Punctuation", "Combining_Mark", "Close_Parenthesis",
"Carriage_Return",
+        "Exclamation", "Glue", "H2", "H3", "Hyphen", "Ideographic", "Inseparable", "Infix_Numeric",
"JL", "JT", "JV", "Line_Feed",
+        "Next_Line", "Nonstarter", "Numeric", "Open_Punctuation", "Postfix_Numeric", "Prefix_Numeric",
"Quotation", "Complex_Context",
+        "Surrogate", "Space", "Break_Symbols", "Word_Joiner", "Unknown", "ZWSpace"};
 
     /**
      * Return the short name for the linebreak property corresponding

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java Tue
Nov 19 20:20:11 2013
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.ObjectInputStream;
 
-// CSOFF: WhitespaceAfterCheck
 
 /*
  * !!! THIS IS A GENERATED FILE !!!

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java Tue
Nov 19 20:20:11 2013
@@ -72,9 +72,7 @@ import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
 
-// CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
 
 /**
  * This class supports a subset of the <code>TTX</code> file as produced by the
Adobe FLEX



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message