You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2013/11/19 21:20:12 UTC
svn commit: r1543560 [1/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...
Author: vhennebert
Date: Tue Nov 19 20:20:11 2013
New Revision: 1543560
URL: http://svn.apache.org/r1543560
Log:
Restricted CSOFF filter to LineLength and fixed resulting Checkstyle issues
Modified:
xmlgraphics/fop/trunk/checkstyle-5.5.xml
xmlgraphics/fop/trunk/checkstyle-suppressions.xml
xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java
xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiClass.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiResolver.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/DelimitedTextRange.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/TextInterval.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnflattenProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnicodeBidiAlgorithm.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionSubtable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningState.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningSubtable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionState.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionSubtable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubtable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ArabicScriptProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/IndicScriptProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/NumberConverter.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/UTF32.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java
Modified: xmlgraphics/fop/trunk/checkstyle-5.5.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/checkstyle-5.5.xml?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/checkstyle-5.5.xml (original)
+++ xmlgraphics/fop/trunk/checkstyle-5.5.xml Tue Nov 19 20:20:11 2013
@@ -37,12 +37,16 @@
<!-- ===================================================================================================== -->
<module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CSOFF\: ([\w\|]+)"/>
+ <property name="offCommentFormat" value="CSOFF\: (LineLength)"/>
<property name="onCommentFormat" value="CSON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<!-- ===================================================================================================== -->
+ <module name="SuppressionFilter">
+ <property name="file" value="${samedir}/checkstyle-suppressions.xml"/>
+ </module>
+
<!-- ===================================================================================================== -->
<module name="TreeWalker">
@@ -172,10 +176,6 @@
<property name="allowLineBreaks" value="false"/>
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
- <module name="NoWhitespaceAfter">
- <property name="allowLineBreaks" value="true"/>
- <property name="tokens" value="ARRAY_INIT"/>
- </module>
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
Modified: xmlgraphics/fop/trunk/checkstyle-suppressions.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/checkstyle-suppressions.xml?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/checkstyle-suppressions.xml (original)
+++ xmlgraphics/fop/trunk/checkstyle-suppressions.xml Tue Nov 19 20:20:11 2013
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
- <suppress files="org/apache/fop/fo/FOPropertyMapping.java" checks="FileLengthCheck"/>
- <suppress files="org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java" checks="FileLengthCheck"/>
- <suppress files="org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java" checks="FileLengthCheck"/>
- <suppress files="org/apache/fop/Version.java" lines="40-50" checks="LineLengthCheck"/>
+ <suppress files="org/apache/fop/afp/fonts/CharactersetEncoder.java" checks="FinalClass"/>
+ <suppress files="org/apache/fop/complexscripts/bidi/BidiClass.java" checks="WhitespaceAfter"/>
+ <suppress files="org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java" checks="SimplifyBooleanReturn"/>
+ <suppress files="org/apache/fop/complexscripts/scripts/ArabicScriptProcessor.java" checks="SimplifyBooleanReturn"/>
+ <suppress files="org/apache/fop/complexscripts/util/CharScript.java" checks="SimplifyBooleanReturn"/>
</suppressions>
Modified: xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java (original)
+++ xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java Tue Nov 19 20:20:11 2013
@@ -32,7 +32,6 @@ import java.util.TreeSet;
import org.apache.fop.util.License;
// CSOFF: LineLength
-// CSOFF: NoWhitespaceAfter
/**
* <p>Utility for generating a Java class representing bidirectional
@@ -303,7 +302,7 @@ public final class GenerateBidiClass {
sb.setLength(0);
out.println("private static byte[] bcL1 = {");
for (int i = 0; i < bcL1.length; i++) {
- if (! first) {
+ if (!first) {
sb.append(",");
} else {
first = false;
@@ -327,7 +326,7 @@ public final class GenerateBidiClass {
sb.setLength(0);
out.println("private static byte[] bcR1 = {");
for (int i = 0; i < bcR1.length; i++) {
- if (! first) {
+ if (!first) {
sb.append(",");
} else {
first = false;
@@ -351,7 +350,7 @@ public final class GenerateBidiClass {
sb.setLength(0);
out.println("private static int[] bcS1 = {");
for (int i = 0; i < bcS1.length; i++) {
- if (! first) {
+ if (!first) {
sb.append(",");
} else {
first = false;
@@ -375,7 +374,7 @@ public final class GenerateBidiClass {
sb.setLength(0);
out.println("private static int[] bcE1 = {");
for (int i = 0; i < bcE1.length; i++) {
- if (! first) {
+ if (!first) {
sb.append(",");
} else {
first = false;
@@ -399,7 +398,7 @@ public final class GenerateBidiClass {
sb.setLength(0);
out.println("private static byte[] bcC1 = {");
for (int i = 0; i < bcC1.length; i++) {
- if (! first) {
+ if (!first) {
sb.append(",");
} else {
first = false;
@@ -434,7 +433,7 @@ public final class GenerateBidiClass {
if (k >= 0) {
return ca [ k ];
} else {
- k = - (k + 1);
+ k = -(k + 1);
if (k == 0) {
return BidiConstants.L;
} else if (ch <= ea [ k - 1 ]) {
Modified: xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java (original)
+++ xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java Tue Nov 19 20:20:11 2013
@@ -40,10 +40,6 @@ import java.util.TreeMap;
import org.apache.fop.util.License;
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: SimplifyBooleanReturnCheck
-// CSOFF: EmptyForIteratorPadCheck
/**
* <p>Utility for generating a Java class and associated data files representing
@@ -202,7 +198,7 @@ public final class GenerateBidiTestData
String ucName = sa[1];
if (isBlockStart(ucName)) {
String ucBlock = getBlockName(ucName);
- if (! im.containsKey(ucBlock)) {
+ if (!im.containsKey(ucBlock)) {
im.put(ucBlock, new int[] { uc, -1, bc });
} else {
throw new IllegalArgumentException("duplicate start of block '" + ucBlock + "' at entry: " + line);
@@ -223,7 +219,7 @@ public final class GenerateBidiTestData
} else {
Integer k = Integer.valueOf(bc);
List sl;
- if (! sm.containsKey(k)) {
+ if (!sm.containsKey(k)) {
sl = new ArrayList();
sm.put(k, sl);
} else {
@@ -267,7 +263,7 @@ public final class GenerateBidiTestData
}
}
// populate intervals from (block) interval map
- if (! im.isEmpty()) {
+ if (!im.isEmpty()) {
for (Iterator it = im.values().iterator(); it.hasNext(); ) {
int[] ba = (int[]) it.next();
assert (ba != null) && (ba.length > 2);
@@ -335,7 +331,7 @@ public final class GenerateBidiTestData
continue;
} else if (line.startsWith("#")) {
continue;
- } else if (line.startsWith(PFX_TYPE) && ! ignoreDeprecatedTypeData) {
+ } else if (line.startsWith(PFX_TYPE) && !ignoreDeprecatedTypeData) {
List lines = new ArrayList();
if ((n = readType(line, b, lines)) < 0) {
break;
@@ -356,14 +352,14 @@ public final class GenerateBidiTestData
// dump instrumentation
if (verbose) {
System.out.println();
- if (! ignoreDeprecatedTypeData) {
+ if (!ignoreDeprecatedTypeData) {
System.out.println("Read type ranges : " + numTypeRanges);
}
System.out.println("Read level specs : " + numLevelSpecs);
System.out.println("Read test specs : " + numTestSpecs);
System.out.println("Read lines : " + lineNumber);
}
- if (! ignoreDeprecatedTypeData) {
+ if (!ignoreDeprecatedTypeData) {
td = (int[][]) tdl.toArray(new int [ tdl.size() ] []);
}
ld = (int[][]) ldl.toArray(new int [ ldl.size() ] []);
@@ -378,12 +374,12 @@ public final class GenerateBidiTestData
boolean done = false;
int n = 0;
lines.add(line);
- while (! done) {
+ while (!done) {
switch (testPrefix(b, PFX_LEVELS)) {
case 0: // within current levels
if ((line = b.readLine()) != null) {
n++;
- if ((line.length() > 0) && ! line.startsWith("#")) {
+ if ((line.length() > 0) && !line.startsWith("#")) {
lines.add(line);
}
} else {
@@ -509,7 +505,7 @@ public final class GenerateBidiTestData
CharacterIterator ci = new StringCharacterIterator(charRanges);
// read initial list delimiter
skipSpace(ci);
- if (! readStartOfList(ci)) {
+ if (!readStartOfList(ci)) {
badRangeSpec("missing initial list delimiter", charRanges);
}
// read negation token if present
@@ -538,7 +534,7 @@ public final class GenerateBidiTestData
String s;
skipSpace(ci);
if ((s = maybeReadSeparator(ci)) != null) {
- if ((s.length() != 0) && ! s.equals("||")) {
+ if ((s.length() != 0) && !s.equals("||")) {
badRangeSpec("invalid item separator \"" + s + "\"", charRanges);
}
}
@@ -557,10 +553,10 @@ public final class GenerateBidiTestData
}
// read terminating list delimiter
skipSpace(ci);
- if (! readEndOfList(ci)) {
+ if (!readEndOfList(ci)) {
badRangeSpec("missing terminating list delimiter", charRanges);
}
- if (! atEnd(ci)) {
+ if (!atEnd(ci)) {
badRangeSpec("extraneous content prior to end of line", ci);
}
if (negated) {
@@ -578,9 +574,9 @@ public final class GenerateBidiTestData
}
private static void skipSpace(CharacterIterator ci) {
- while (! atEnd(ci)) {
+ while (!atEnd(ci)) {
char c = ci.current();
- if (! Character.isWhitespace(c)) {
+ if (!Character.isWhitespace(c)) {
break;
} else {
ci.next();
@@ -589,7 +585,7 @@ public final class GenerateBidiTestData
}
private static boolean maybeReadNext(CharacterIterator ci, char next) {
- while (! atEnd(ci)) {
+ while (!atEnd(ci)) {
char c = ci.current();
if (c == next) {
ci.next();
@@ -906,7 +902,7 @@ public final class GenerateBidiTestData
List ll = new ArrayList();
// read prefix
skipSpace(ci);
- if (! maybeReadToken(ci, PFX_LEVELS)) {
+ if (!maybeReadToken(ci, PFX_LEVELS)) {
badLevelSpec("missing prefix \"" + PFX_LEVELS + "\"", ci);
}
// read level values
@@ -924,7 +920,7 @@ public final class GenerateBidiTestData
}
// read to end of line
skipSpace(ci);
- if (! atEnd(ci)) {
+ if (!atEnd(ci)) {
badLevelSpec("extraneous content prior to end of line", ci);
}
if (ll.size() == 0) {
@@ -1007,7 +1003,7 @@ public final class GenerateBidiTestData
List rl = new ArrayList();
// read prefix
skipSpace(ci);
- if (! maybeReadToken(ci, PFX_REORDER)) {
+ if (!maybeReadToken(ci, PFX_REORDER)) {
badReorderSpec("missing prefix \"" + PFX_REORDER + "\"", ci);
}
// read reorder values
@@ -1023,7 +1019,7 @@ public final class GenerateBidiTestData
}
// read to end of line
skipSpace(ci);
- if (! atEnd(ci)) {
+ if (!atEnd(ci)) {
badReorderSpec("extraneous content prior to end of line", ci);
}
return createReorderArray(rl, levels);
@@ -1066,7 +1062,7 @@ public final class GenerateBidiTestData
CharacterIterator ci = new StringCharacterIterator(line);
List cl = new ArrayList();
// read bidi class identifier sequence
- while (! atEnd(ci) && ! maybeReadNext(ci, ';')) {
+ while (!atEnd(ci) && !maybeReadNext(ci, ';')) {
skipSpace(ci);
int bc;
if ((bc = maybeReadBidiClass(ci)) >= 0) {
@@ -1086,7 +1082,7 @@ public final class GenerateBidiTestData
}
// read to end of line
skipSpace(ci);
- if (! atEnd(ci)) {
+ if (!atEnd(ci)) {
badTestSpec("extraneous content prior to end of line", ci);
}
return createTestArray(cl, bs, levels);
@@ -1244,7 +1240,7 @@ public final class GenerateBidiTestData
ok = false;
}
}
- if (! ok) {
+ if (!ok) {
System.out.println("Usage: GenerateBidiTestData [-v] [-i] [-d <ucdFile>] [-b <bidiFile>] [-o <outputFile>]");
System.out.println(" defaults:");
if (ignoreDeprecatedTypeData) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiClass.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiClass.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiClass.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiClass.java Tue Nov 19 20:20:11 2013
@@ -21,7 +21,6 @@ package org.apache.fop.complexscripts.bi
import java.util.Arrays;
-// CSOFF: WhitespaceAfterCheck
// CSOFF: LineLengthCheck
/*
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiResolver.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiResolver.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/BidiResolver.java Tue Nov 19 20:20:11 2013
@@ -32,11 +32,7 @@ import org.apache.fop.area.LineArea;
import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.fo.pagination.PageSequence;
-// CSOFF: EmptyForIteratorPadCheck
-// CSOFF: InnerAssignmentCheck
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: SimplifyBooleanReturnCheck
/**
* <p>A utility class for performing bidirectional resolution processing.</p>
@@ -140,7 +136,7 @@ public final class BidiResolver {
runsNew.addAll(ir.split());
}
}
- if (! runsNew.equals(runs)) {
+ if (!runsNew.equals(runs)) {
runs = runsNew;
}
return runs;
@@ -180,7 +176,7 @@ public final class BidiResolver {
i = e - 1;
}
}
- if (! runsNew.equals(runs)) {
+ if (!runsNew.equals(runs)) {
runs = runsNew;
}
return runs;
@@ -232,7 +228,7 @@ public final class BidiResolver {
Vector rv = new Vector();
for (Iterator it = ranges.iterator(); it.hasNext(); ) {
DelimitedTextRange r = (DelimitedTextRange) it.next();
- if (! r.isEmpty()) {
+ if (!r.isEmpty()) {
rv.add(r);
}
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/DelimitedTextRange.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/DelimitedTextRange.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/DelimitedTextRange.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/DelimitedTextRange.java Tue Nov 19 20:20:11 2013
@@ -34,10 +34,7 @@ import org.apache.fop.traits.WritingMode
import org.apache.fop.traits.WritingModeTraitsGetter;
import org.apache.fop.util.CharUtilities;
-// CSOFF: EmptyForIteratorPadCheck
-// CSOFF: InnerAssignmentCheck
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* The <code>DelimitedTextRange</code> class implements the "delimited text range" as described
@@ -151,7 +148,7 @@ public class DelimitedTextRange {
TextInterval ti = (TextInterval) it.next();
intervalsNew.addAll(assignLevels(ti, levels));
}
- if (! intervalsNew.equals(intervals)) {
+ if (!intervalsNew.equals(intervals)) {
intervals = intervalsNew;
}
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/InlineRun.java Tue Nov 19 20:20:11 2013
@@ -35,11 +35,6 @@ import org.apache.fop.area.inline.Unreso
import org.apache.fop.area.inline.WordArea;
import org.apache.fop.util.CharUtilities;
-// CSOFF: EmptyForIteratorPadCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: SimplifyBooleanReturnCheck
-
/**
* The <code>InlineRun</code> class is a utility class, the instances of which are used
* to capture a sequence of reordering levels associated with an inline area.
@@ -179,7 +174,7 @@ public class InlineRun {
if (inline instanceof WordArea) {
WordArea w = (WordArea) inline;
// if not already reversed, then reverse now
- if (! w.isReversed()) {
+ if (!w.isReversed()) {
if ((reversals & 1) != 0) {
w.reverse(mirror);
} else if (mirror && maybeNeedsMirroring()) {
@@ -209,10 +204,8 @@ public class InlineRun {
}
return true;
}
- } else if ((ir.levels == null) && (levels == null)) {
- return true;
} else {
- return false;
+ return (ir.levels == null) && (levels == null);
}
} else {
return false;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/TextInterval.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/TextInterval.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/TextInterval.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/TextInterval.java Tue Nov 19 20:20:11 2013
@@ -28,7 +28,6 @@ import org.apache.fop.fo.flow.Character;
import org.apache.fop.fo.flow.Leader;
// CSOFF: LineLengthCheck
-// CSOFF: SimplifyBooleanReturnCheck
/**
* <p>The <code>TextInterval</code> class is a utility class, the instances of which are used
@@ -102,10 +101,8 @@ class TextInterval {
return false;
} else if (ti.getStart() != start) {
return false;
- } else if (ti.getEnd() != end) {
- return false;
} else {
- return true;
+ return ti.getEnd() == end;
}
} else {
return false;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnflattenProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnflattenProcessor.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnflattenProcessor.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnflattenProcessor.java Tue Nov 19 20:20:11 2013
@@ -35,10 +35,7 @@ import org.apache.fop.area.inline.SpaceA
import org.apache.fop.area.inline.TextArea;
import org.apache.fop.area.inline.UnresolvedPageNumber;
-// CSOFF: EmptyForIteratorPadCheck
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: SimplifyBooleanReturnCheck
/**
* <p>The <code>UnflattenProcessor</code> class is used to reconstruct (by unflattening) a line
@@ -86,10 +83,8 @@ class UnflattenProcessor {
private boolean shouldFinishTextContainer(TextArea tc, InlineArea ia) {
if ((tcOrig != null) && (tc != tcOrig)) {
return true;
- } else if ((iaLevelLast != -1) && (ia.getBidiLevel() != iaLevelLast)) {
- return true;
} else {
- return false;
+ return (iaLevelLast != -1) && (ia.getBidiLevel() != iaLevelLast);
}
}
private void finishTextContainer() {
@@ -98,7 +93,7 @@ class UnflattenProcessor {
private void finishTextContainer(TextArea tc, InlineArea ia) {
if (tcNew != null) {
updateIPD(tcNew);
- if (! icNew.empty()) {
+ if (!icNew.empty()) {
icNew.peek().addChildArea(tcNew);
} else {
ilNew.add(tcNew);
@@ -113,12 +108,12 @@ class UnflattenProcessor {
}
private boolean shouldFinishInlineContainer(List<InlineParent> ich, TextArea tc, InlineArea ia) {
if ((ich == null) || ich.isEmpty()) {
- return ! icOrig.empty();
+ return !icOrig.empty();
} else {
- if (! icOrig.empty()) {
+ if (!icOrig.empty()) {
InlineParent ic = ich.get(0);
InlineParent ic0 = icOrig.peek();
- return (ic != ic0) && ! isInlineParentOf(ic, ic0);
+ return (ic != ic0) && !isInlineParentOf(ic, ic0);
} else {
return false;
}
@@ -128,14 +123,14 @@ class UnflattenProcessor {
finishInlineContainer(null, null, null);
}
private void finishInlineContainer(List<InlineParent> ich, TextArea tc, InlineArea ia) {
- if ((ich != null) && ! ich.isEmpty()) { // finish non-matching inner inline container(s)
+ if ((ich != null) && !ich.isEmpty()) { // finish non-matching inner inline container(s)
for (Iterator<InlineParent> it = ich.iterator(); it.hasNext(); ) {
InlineParent ic = it.next();
InlineParent ic0 = icOrig.empty() ? null : icOrig.peek();
if (ic0 == null) {
assert icNew.empty();
} else if (ic != ic0) {
- assert ! icNew.empty();
+ assert !icNew.empty();
InlineParent icO0 = icOrig.pop();
InlineParent icN0 = icNew.pop();
assert icO0 != null;
@@ -145,7 +140,7 @@ class UnflattenProcessor {
} else {
icNew.peek().addChildArea(icN0);
}
- if (! icOrig.empty() && (icOrig.peek() == ic)) {
+ if (!icOrig.empty() && (icOrig.peek() == ic)) {
break;
}
} else {
@@ -153,7 +148,7 @@ class UnflattenProcessor {
}
}
} else { // finish all inline containers
- while (! icNew.empty()) {
+ while (!icNew.empty()) {
InlineParent icO0 = icOrig.pop();
InlineParent icN0 = icNew.pop();
assert icO0 != null;
@@ -176,8 +171,8 @@ class UnflattenProcessor {
finishInlineContainer();
}
private void update(List<InlineParent> ich, TextArea tc, InlineArea ia) {
- if (! alreadyUnflattened(ia)) {
- if ((ich != null) && ! ich.isEmpty()) {
+ if (!alreadyUnflattened(ia)) {
+ if ((ich != null) && !ich.isEmpty()) {
pushInlineContainers(ich);
}
if (tc != null) {
@@ -345,7 +340,7 @@ class UnflattenProcessor {
Area a = ia.getParentArea();
while (a != null) {
if (a instanceof InlineArea) {
- if ((a instanceof InlineParent) && ! (a instanceof TextArea)) {
+ if ((a instanceof InlineParent) && !(a instanceof TextArea)) {
ich.add((InlineParent) a);
}
a = ((InlineArea) a) .getParentArea();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnicodeBidiAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnicodeBidiAlgorithm.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnicodeBidiAlgorithm.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/bidi/UnicodeBidiAlgorithm.java Tue Nov 19 20:20:11 2013
@@ -25,12 +25,7 @@ import org.apache.commons.logging.LogFac
import org.apache.fop.traits.Direction;
import org.apache.fop.util.CharUtilities;
-// CSOFF: AvoidNestedBlocksCheck
-// CSOFF: EmptyForIteratorPadCheck
-// CSOFF: InnerAssignmentCheck
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: ParameterNumberCheck
/**
* <p>The <code>UnicodeBidiAlgorithm</code> class implements functionality prescribed by
@@ -125,47 +120,39 @@ public final class UnicodeBidiAlgorithm
case RLE: // start right-to-left embedding
case LRO: // start left-to-right override
case RLO: // start right-to-left override
- {
- int en; /* new embedding level */
- if ((bc == RLE) || (bc == RLO)) {
- en = ((ec & ~OVERRIDE) + 1) | 1;
- } else {
- en = ((ec & ~OVERRIDE) + 2) & ~1;
- }
- if (en < (MAX_LEVELS + 1)) {
- es [ ei++ ] = ec;
- if ((bc == LRO) || (bc == RLO)) {
- ec = en | OVERRIDE;
- } else {
- ec = en & ~OVERRIDE;
- }
+ int en; /* new embedding level */
+ if ((bc == RLE) || (bc == RLO)) {
+ en = ((ec & ~OVERRIDE) + 1) | 1;
+ } else {
+ en = ((ec & ~OVERRIDE) + 2) & ~1;
+ }
+ if (en < (MAX_LEVELS + 1)) {
+ es [ ei++ ] = ec;
+ if ((bc == LRO) || (bc == RLO)) {
+ ec = en | OVERRIDE;
} else {
- // max levels exceeded, so don't change level or override
+ ec = en & ~OVERRIDE;
}
- el = ec;
- break;
+ } else {
+ // max levels exceeded, so don't change level or override
}
+ el = ec;
+ break;
case PDF: // pop directional formatting
- {
- el = ec;
- if (ei > 0) {
- ec = es [ --ei ];
- } else {
- // ignore isolated PDF
- }
- break;
+ el = ec;
+ if (ei > 0) {
+ ec = es [ --ei ];
+ } else {
+ // ignore isolated PDF
}
+ break;
case B: // paragraph separator
- {
- el = ec = defaultLevel;
- ei = 0;
- break;
- }
+ el = ec = defaultLevel;
+ ei = 0;
+ break;
default:
- {
- el = ec;
- break;
- }
+ el = ec;
+ break;
}
switch (bc) {
case BN:
@@ -608,7 +595,7 @@ public final class UnicodeBidiAlgorithm
private static boolean isRetainedFormatting(int[] ca, int s, int e) {
for (int i = s; i < e; i++) {
- if (! isRetainedFormatting(ca[i])) {
+ if (!isRetainedFormatting(ca[i])) {
return false;
}
}
@@ -680,7 +667,7 @@ public final class UnicodeBidiAlgorithm
} else {
chOut = chIn;
}
- if (! triggered && triggersBidi(chOut)) {
+ if (!triggered && triggersBidi(chOut)) {
triggered = true;
}
if ((chOut & 0xFF0000) == 0) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java Tue Nov 19 20:20:11 2013
@@ -23,7 +23,6 @@ import java.util.Iterator;
import java.util.List;
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* <p>Base class implementation of glyph class table.</p>
@@ -100,7 +99,7 @@ public final class GlyphClassTable exten
} else {
for (Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
- if (! (o instanceof Integer)) {
+ if (!(o instanceof Integer)) {
return false;
}
}
@@ -114,7 +113,7 @@ public final class GlyphClassTable exten
} else {
for (Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
- if (! (o instanceof MappingRange)) {
+ if (!(o instanceof MappingRange)) {
return false;
}
}
@@ -128,7 +127,7 @@ public final class GlyphClassTable exten
} else {
for (Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
- if (! (o instanceof GlyphCoverageTable)) {
+ if (!(o instanceof GlyphCoverageTable)) {
return false;
}
}
@@ -197,7 +196,7 @@ public final class GlyphClassTable exten
if (it.hasNext()) {
Object o = it.next();
if (o instanceof Integer) {
- firstGlyph = ((Integer) o) . intValue();
+ firstGlyph = ((Integer) o) .intValue();
} else {
throw new AdvancedTypographicTableFormatException("illegal entry, first entry must be Integer denoting first glyph value, but is: " + o);
}
@@ -210,7 +209,7 @@ public final class GlyphClassTable exten
while (it.hasNext()) {
Object o = it.next();
if (o instanceof Integer) {
- int gc = ((Integer) o) . intValue();
+ int gc = ((Integer) o) .intValue();
gca [ i++ ] = gc;
if (gc > gcMax) {
gcMax = gc;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java Tue Nov 19 20:20:11 2013
@@ -27,8 +27,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
// CSOFF: LineLengthCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* <p>.Base class implementation of glyph coverage table.</p>
@@ -103,7 +101,7 @@ public final class GlyphCoverageTable ex
} else {
for (Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
- if (! (o instanceof Integer)) {
+ if (!(o instanceof Integer)) {
return false;
}
}
@@ -117,7 +115,7 @@ public final class GlyphCoverageTable ex
} else {
for (Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
- if (! (o instanceof MappingRange)) {
+ if (!(o instanceof MappingRange)) {
return false;
}
}
@@ -183,7 +181,7 @@ public final class GlyphCoverageTable ex
for (Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
if (o instanceof Integer) {
- int gid = ((Integer) o) . intValue();
+ int gid = ((Integer) o) .intValue();
if ((gid >= 0) && (gid < 65536)) {
if (gid > gidMax) {
map [ i++ ] = gidMax = gid;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionSubtable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionSubtable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionSubtable.java Tue Nov 19 20:20:11 2013
@@ -20,7 +20,6 @@
package org.apache.fop.complexscripts.fonts;
// CSOFF: LineLengthCheck
-// CSOFF: InnerAssignmentCheck
/**
* <p>The <code>GlyphDefinitionSubtable</code> implements an abstract base of a glyph definition subtable,
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphDefinitionTable.java Tue Nov 19 20:20:11 2013
@@ -29,7 +29,6 @@ import org.apache.commons.logging.LogFac
import org.apache.fop.complexscripts.scripts.ScriptProcessor;
import org.apache.fop.complexscripts.util.GlyphSequence;
-// CSOFF: InnerAssignmentCheck
// CSOFF: LineLengthCheck
/**
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java Tue Nov 19 20:20:11 2013
@@ -23,8 +23,6 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: InnerAssignmentCheck
// CSOFF: LineLengthCheck
/**
@@ -162,7 +160,7 @@ public class GlyphMappingTable {
int mi;
if ((i = Arrays.binarySearch(sa, gid)) >= 0) {
mi = getMappedIndex(gid, sa [ i ], ma [ i ]); // matches start of (some) range
- } else if ((i = - (i + 1)) == 0) {
+ } else if ((i = -(i + 1)) == 0) {
mi = -1; // precedes first range
} else if (gid > ea [ --i ]) {
mi = -1; // follows preceding (or last) range
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningState.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningState.java Tue Nov 19 20:20:11 2013
@@ -23,7 +23,6 @@ import org.apache.fop.complexscripts.uti
import org.apache.fop.complexscripts.util.ScriptContextTester;
// CSOFF: LineLengthCheck
-// CSOFF: ParameterNumberCheck
/**
* <p>The <code>GlyphPositioningState</code> implements an state object used during glyph positioning
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningSubtable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningSubtable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningSubtable.java Tue Nov 19 20:20:11 2013
@@ -23,8 +23,6 @@ import org.apache.fop.complexscripts.uti
import org.apache.fop.complexscripts.util.ScriptContextTester;
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: ParameterNumberCheck
/**
* <p>The <code>GlyphPositioningSubtable</code> implements an abstract base of a glyph subtable,
@@ -90,8 +88,8 @@ public abstract class GlyphPositioningSu
boolean appliedOneShot = false;
while (ps.hasNext()) {
boolean applied = false;
- if (! appliedOneShot && ps.maybeApplicable()) {
- for (int i = 0, n = sta.length; ! applied && (i < n); i++) {
+ if (!appliedOneShot && ps.maybeApplicable()) {
+ for (int i = 0, n = sta.length; !applied && (i < n); i++) {
if (sequenceIndex < 0) {
applied = ps.apply(sta [ i ]);
} else if (ps.getPosition() == (sequenceStart + sequenceIndex)) {
@@ -102,7 +100,7 @@ public abstract class GlyphPositioningSu
}
}
}
- if (! applied || ! ps.didConsume()) {
+ if (!applied || !ps.didConsume()) {
ps.applyDefault();
}
ps.next();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java Tue Nov 19 20:20:11 2013
@@ -33,9 +33,6 @@ import org.apache.fop.complexscripts.uti
import org.apache.fop.complexscripts.util.GlyphTester;
// CSOFF: LineLengthCheck
-// CSOFF: InnerAssignmentCheck
-// CSOFF: NoWhitespaceAfterCheck
-// CSOFF: ParameterNumberCheck
/**
* <p>The <code>GlyphPositioningTable</code> class is a glyph table that implements
@@ -368,7 +365,7 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof Value[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof Value[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, single entry must be a Value[], but is: " + ((o != null) ? o.getClass() : null));
} else {
Value[] va = (Value[]) o;
@@ -412,7 +409,7 @@ public class GlyphPositioningTable exten
int offsetLast = counts[0] + counts[1];
// skip any ignored glyphs prior to first non-ignored glyph
for ( ; offset < offsetLast; ++offset) {
- if (! ps.isIgnoredGlyph(offset)) {
+ if (!ps.isIgnoredGlyph(offset)) {
break;
} else {
ps.consume(1);
@@ -429,7 +426,7 @@ public class GlyphPositioningTable exten
}
// skip any ignored glyphs prior to second non-ignored glyph
for ( ; offset < offsetLast; ++offset) {
- if (! ps.isIgnoredGlyph(offset)) {
+ if (!ps.isIgnoredGlyph(offset)) {
break;
} else {
ps.consume(1);
@@ -513,7 +510,7 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof PairValues[][])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof PairValues[][])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first (and only) entry must be a PairValues[][], but is: " + ((o != null) ? o.getClass() : null));
} else {
pvm = (PairValues[][]) o;
@@ -569,27 +566,27 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 5 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
cdt1 = (GlyphClassTable) o;
}
- if (((o = entries.get(1)) == null) || ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(1)) == null) || !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
cdt2 = (GlyphClassTable) o;
}
- if (((o = entries.get(2)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(2)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
nc1 = ((Integer)(o)).intValue();
}
- if (((o = entries.get(3)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(3)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
nc2 = ((Integer)(o)).intValue();
}
- if (((o = entries.get(4)) == null) || ! (o instanceof PairValues[][])) {
+ if (((o = entries.get(4)) == null) || !(o instanceof PairValues[][])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fifth entry must be a PairValues[][], but is: " + ((o != null) ? o.getClass() : null));
} else {
pvm = (PairValues[][]) o;
@@ -633,7 +630,7 @@ public class GlyphPositioningTable exten
int enw = ps.getWidth(gi2);
if ((exa != null) && (ena != null)) {
Value v = ena.getAlignmentAdjustment(exa);
- v.adjust(- enw, 0, 0, 0);
+ v.adjust(-enw, 0, 0, 0);
if (ps.adjust(v)) {
ps.setAdjusted(true);
}
@@ -704,10 +701,10 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof Anchor[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof Anchor[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first (and only) entry must be a Anchor[], but is: " + ((o != null) ? o.getClass() : null));
- } else if ((((Anchor[]) o) . length % 2) != 0) {
- throw new AdvancedTypographicTableFormatException("illegal entries, Anchor[] array must have an even number of entries, but has: " + ((Anchor[]) o) . length);
+ } else if ((((Anchor[]) o) .length % 2) != 0) {
+ throw new AdvancedTypographicTableFormatException("illegal entries, Anchor[] array must have an even number of entries, but has: " + ((Anchor[]) o) .length);
} else {
aa = (Anchor[]) o;
}
@@ -736,7 +733,7 @@ public class GlyphPositioningTable exten
MarkAnchor ma = getMarkAnchor(ciMark, giMark);
if (ma != null) {
for (int i = 0, n = ps.getPosition(); i < n; i++) {
- int gi = ps.getGlyph(- (i + 1));
+ int gi = ps.getGlyph(-(i + 1));
if (ps.isMark(gi)) {
continue;
} else {
@@ -746,7 +743,7 @@ public class GlyphPositioningTable exten
// start experimental fix for END OF AYAH in Lateef/Scheherazade
int[] aa = ps.getAdjustment();
if (aa[2] == 0) {
- v.adjust(0, 0, - ps.getWidth(giMark), 0);
+ v.adjust(0, 0, -ps.getWidth(giMark), 0);
}
// end experimental fix for END OF AYAH in Lateef/Scheherazade
if (ps.adjust(v)) {
@@ -835,22 +832,22 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 4 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphCoverageTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphCoverageTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphCoverageTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
bct = (GlyphCoverageTable) o;
}
- if (((o = entries.get(1)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(1)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
nmc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(2)) == null) || ! (o instanceof MarkAnchor[])) {
+ if (((o = entries.get(2)) == null) || !(o instanceof MarkAnchor[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be a MarkAnchor[], but is: " + ((o != null) ? o.getClass() : null));
} else {
maa = (MarkAnchor[]) o;
}
- if (((o = entries.get(3)) == null) || ! (o instanceof Anchor[][])) {
+ if (((o = entries.get(3)) == null) || !(o instanceof Anchor[][])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be a Anchor[][], but is: " + ((o != null) ? o.getClass() : null));
} else {
bam = (Anchor[][]) o;
@@ -881,7 +878,7 @@ public class GlyphPositioningTable exten
int mxc = getMaxComponentCount();
if (ma != null) {
for (int i = 0, n = ps.getPosition(); i < n; i++) {
- int gi = ps.getGlyph(- (i + 1));
+ int gi = ps.getGlyph(-(i + 1));
if (ps.isMark(gi)) {
continue;
} else {
@@ -989,27 +986,27 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 5 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphCoverageTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphCoverageTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphCoverageTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
lct = (GlyphCoverageTable) o;
}
- if (((o = entries.get(1)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(1)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
nmc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(2)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(2)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
mxc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(3)) == null) || ! (o instanceof MarkAnchor[])) {
+ if (((o = entries.get(3)) == null) || !(o instanceof MarkAnchor[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be a MarkAnchor[], but is: " + ((o != null) ? o.getClass() : null));
} else {
maa = (MarkAnchor[]) o;
}
- if (((o = entries.get(4)) == null) || ! (o instanceof Anchor[][][])) {
+ if (((o = entries.get(4)) == null) || !(o instanceof Anchor[][][])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fifth entry must be a Anchor[][][], but is: " + ((o != null) ? o.getClass() : null));
} else {
lam = (Anchor[][][]) o;
@@ -1125,22 +1122,22 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 4 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphCoverageTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphCoverageTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphCoverageTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
mct2 = (GlyphCoverageTable) o;
}
- if (((o = entries.get(1)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(1)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
nmc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(2)) == null) || ! (o instanceof MarkAnchor[])) {
+ if (((o = entries.get(2)) == null) || !(o instanceof MarkAnchor[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be a MarkAnchor[], but is: " + ((o != null) ? o.getClass() : null));
} else {
maa = (MarkAnchor[]) o;
}
- if (((o = entries.get(3)) == null) || ! (o instanceof Anchor[][])) {
+ if (((o = entries.get(3)) == null) || !(o instanceof Anchor[][])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be a Anchor[][], but is: " + ((o != null) ? o.getClass() : null));
} else {
mam = (Anchor[][]) o;
@@ -1274,7 +1271,7 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1367,17 +1364,17 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 3 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
cdt = (GlyphClassTable) o;
}
- if (((o = entries.get(1)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(1)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
ngc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(2)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(2)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1467,7 +1464,7 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1585,7 +1582,7 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1661,27 +1658,27 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 5 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
icdt = (GlyphClassTable) o;
}
- if (((o = entries.get(1)) != null) && ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(1)) != null) && !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass());
} else {
bcdt = (GlyphClassTable) o;
}
- if (((o = entries.get(2)) != null) && ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(2)) != null) && !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass());
} else {
lcdt = (GlyphClassTable) o;
}
- if (((o = entries.get(3)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(3)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
ngc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(4)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(4)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fifth entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1752,7 +1749,7 @@ public class GlyphPositioningTable exten
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -2005,7 +2002,7 @@ public class GlyphPositioningTable exten
boolean first = true;
sb.append("{ ");
if (xPlacement != 0) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2013,7 +2010,7 @@ public class GlyphPositioningTable exten
sb.append("xPlacement = " + xPlacement);
}
if (yPlacement != 0) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2021,7 +2018,7 @@ public class GlyphPositioningTable exten
sb.append("yPlacement = " + yPlacement);
}
if (xAdvance != 0) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2029,7 +2026,7 @@ public class GlyphPositioningTable exten
sb.append("xAdvance = " + xAdvance);
}
if (yAdvance != 0) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2037,7 +2034,7 @@ public class GlyphPositioningTable exten
sb.append("yAdvance = " + yAdvance);
}
if (xPlaDevice != null) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2045,7 +2042,7 @@ public class GlyphPositioningTable exten
sb.append("xPlaDevice = " + xPlaDevice);
}
if (yPlaDevice != null) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2053,7 +2050,7 @@ public class GlyphPositioningTable exten
sb.append("xPlaDevice = " + yPlaDevice);
}
if (xAdvDevice != null) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2061,7 +2058,7 @@ public class GlyphPositioningTable exten
sb.append("xAdvDevice = " + xAdvDevice);
}
if (yAdvDevice != null) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2118,7 +2115,7 @@ public class GlyphPositioningTable exten
boolean first = true;
sb.append("{ ");
if (glyph != 0) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2126,7 +2123,7 @@ public class GlyphPositioningTable exten
sb.append("glyph = " + glyph);
}
if (value1 != null) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
@@ -2134,7 +2131,7 @@ public class GlyphPositioningTable exten
sb.append("value1 = " + value1);
}
if (value2 != null) {
- if (! first) {
+ if (!first) {
sb.append(", ");
} else {
first = false;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java Tue Nov 19 20:20:11 2013
@@ -29,7 +29,6 @@ import org.apache.fop.complexscripts.uti
import org.apache.fop.complexscripts.util.ScriptContextTester;
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* <p>The <code>GlyphProcessingState</code> implements a common, base state object used during glyph substitution
@@ -459,7 +458,7 @@ public class GlyphProcessingState {
int start = index + offset;
if (start < 0) {
throw new IndexOutOfBoundsException("will attempt index at " + start);
- } else if (! reverseOrder && ((start + count) > indexLast)) {
+ } else if (!reverseOrder && ((start + count) > indexLast)) {
throw new IndexOutOfBoundsException("will attempt index at " + (start + count));
} else if (reverseOrder && ((start + 1) < count)) {
throw new IndexOutOfBoundsException("will attempt index at " + (start - count));
@@ -469,7 +468,7 @@ public class GlyphProcessingState {
} else if (glyphs.length != count) {
throw new IllegalArgumentException("glyphs array is non-null, but its length (" + glyphs.length + "), is not equal to count (" + count + ")");
}
- if (! reverseOrder) {
+ if (!reverseOrder) {
return getGlyphsForward(start, count, ignoreTester, glyphs, counts);
} else {
return getGlyphsReverse(start, count, ignoreTester, glyphs, counts);
@@ -484,7 +483,7 @@ public class GlyphProcessingState {
if (gi == 65535) {
ignored++;
} else {
- if ((ignoreTester == null) || ! ignoreTester.test(gi, getLookupFlags())) {
+ if ((ignoreTester == null) || !ignoreTester.test(gi, getLookupFlags())) {
glyphs [ counted++ ] = gi;
} else {
ignored++;
@@ -506,7 +505,7 @@ public class GlyphProcessingState {
if (gi == 65535) {
ignored++;
} else {
- if ((ignoreTester == null) || ! ignoreTester.test(gi, getLookupFlags())) {
+ if ((ignoreTester == null) || !ignoreTester.test(gi, getLookupFlags())) {
glyphs [ counted++ ] = gi;
} else {
ignored++;
@@ -629,7 +628,7 @@ public class GlyphProcessingState {
int start = index + offset;
if ((start < 0) || (start > indexLast)) {
return new int[] { 0, 0 };
- } else if (! reverseOrder) {
+ } else if (!reverseOrder) {
return getGlyphsAvailableForward(start, ignoreTester);
} else {
return getGlyphsAvailableReverse(start, ignoreTester);
@@ -731,7 +730,7 @@ public class GlyphProcessingState {
int start = index + offset;
if (start < 0) {
throw new IndexOutOfBoundsException("will attempt index at " + start);
- } else if (! reverseOrder && ((start + count) > indexLast)) {
+ } else if (!reverseOrder && ((start + count) > indexLast)) {
throw new IndexOutOfBoundsException("will attempt index at " + (start + count));
} else if (reverseOrder && ((start + 1) < count)) {
throw new IndexOutOfBoundsException("will attempt index at " + (start - count));
@@ -741,7 +740,7 @@ public class GlyphProcessingState {
} else if (associations.length != count) {
throw new IllegalArgumentException("associations array is non-null, but its length (" + associations.length + "), is not equal to count (" + count + ")");
}
- if (! reverseOrder) {
+ if (!reverseOrder) {
return getAssociationsForward(start, count, ignoreTester, associations, counts);
} else {
return getAssociationsReverse(start, count, ignoreTester, associations, counts);
@@ -757,7 +756,7 @@ public class GlyphProcessingState {
if (gi == 65535) {
ignored++;
} else {
- if ((ignoreTester == null) || ! ignoreTester.test(gi, getLookupFlags())) {
+ if ((ignoreTester == null) || !ignoreTester.test(gi, getLookupFlags())) {
if (k < count) {
associations [ k++ ] = getAssociation(i - index);
counted++;
@@ -785,7 +784,7 @@ public class GlyphProcessingState {
if (gi == 65535) {
ignored++;
} else {
- if ((ignoreTester == null) || ! ignoreTester.test(gi, getLookupFlags())) {
+ if ((ignoreTester == null) || !ignoreTester.test(gi, getLookupFlags())) {
if (k < count) {
associations [ k++ ] = getAssociation(i - index);
counted++;
@@ -1169,7 +1168,7 @@ public class GlyphProcessingState {
for (int i = 0, n = ngt; i < n; i++) {
GlyphTester gt = gta [ i ];
if (gt != null) {
- if (! gt.test(gi, flags)) {
+ if (!gt.test(gi, flags)) {
return false;
}
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionState.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionState.java Tue Nov 19 20:20:11 2013
@@ -27,7 +27,6 @@ import org.apache.fop.complexscripts.uti
import org.apache.fop.complexscripts.util.ScriptContextTester;
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* <p>The <code>GlyphSubstitutionState</code> implements an state object used during glyph substitution
@@ -130,7 +129,7 @@ public class GlyphSubstitutionState exte
* @param predication a predication value to add to association A if predications enabled
*/
public void putGlyph(int glyph, GlyphSequence.CharAssociation a, Object predication) {
- if (! ogb.hasRemaining()) {
+ if (!ogb.hasRemaining()) {
ogb = growBuffer(ogb);
}
ogb.put(glyph);
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionSubtable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionSubtable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionSubtable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionSubtable.java Tue Nov 19 20:20:11 2013
@@ -23,7 +23,6 @@ import org.apache.fop.complexscripts.uti
import org.apache.fop.complexscripts.util.ScriptContextTester;
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* <p>The <code>GlyphSubstitutionSubtable</code> implements an abstract base of a glyph substitution subtable,
@@ -90,8 +89,8 @@ public abstract class GlyphSubstitutionS
boolean appliedOneShot = false;
while (ss.hasNext()) {
boolean applied = false;
- if (! appliedOneShot && ss.maybeApplicable()) {
- for (int i = 0, n = sta.length; ! applied && (i < n); i++) {
+ if (!appliedOneShot && ss.maybeApplicable()) {
+ for (int i = 0, n = sta.length; !applied && (i < n); i++) {
if (sequenceIndex < 0) {
applied = ss.apply(sta [ i ]);
} else if (ss.getPosition() == (sequenceStart + sequenceIndex)) {
@@ -102,7 +101,7 @@ public abstract class GlyphSubstitutionS
}
}
}
- if (! applied || ! ss.didConsume()) {
+ if (!applied || !ss.didConsume()) {
ss.applyDefault();
}
ss.next();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java?rev=1543560&r1=1543559&r2=1543560&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java Tue Nov 19 20:20:11 2013
@@ -31,9 +31,7 @@ import org.apache.fop.complexscripts.scr
import org.apache.fop.complexscripts.util.GlyphSequence;
import org.apache.fop.complexscripts.util.GlyphTester;
-// CSOFF: InnerAssignmentCheck
// CSOFF: LineLengthCheck
-// CSOFF: NoWhitespaceAfterCheck
/**
* <p>The <code>GlyphSubstitutionTable</code> class is a glyph table that implements
@@ -306,7 +304,7 @@ public class GlyphSubstitutionTable exte
Object o = entries.get(0);
int delta = 0;
if (o instanceof Integer) {
- delta = ((Integer) o) . intValue();
+ delta = ((Integer) o) .intValue();
} else {
throw new AdvancedTypographicTableFormatException("illegal entries entry, must be Integer, but is: " + o);
}
@@ -440,7 +438,7 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof int[][])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof int[][])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an int[][], but is: " + ((o != null) ? o.getClass() : null));
} else {
gsa = (int[][]) o;
@@ -801,7 +799,7 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -894,17 +892,17 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 3 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
cdt = (GlyphClassTable) o;
}
- if (((o = entries.get(1)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(1)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
ngc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(2)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(2)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -994,7 +992,7 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1113,7 +1111,7 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1189,27 +1187,27 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 5 entries");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
} else {
icdt = (GlyphClassTable) o;
}
- if (((o = entries.get(1)) != null) && ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(1)) != null) && !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass());
} else {
bcdt = (GlyphClassTable) o;
}
- if (((o = entries.get(2)) != null) && ! (o instanceof GlyphClassTable)) {
+ if (((o = entries.get(2)) != null) && !(o instanceof GlyphClassTable)) {
throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass());
} else {
lcdt = (GlyphClassTable) o;
}
- if (((o = entries.get(3)) == null) || ! (o instanceof Integer)) {
+ if (((o = entries.get(3)) == null) || !(o instanceof Integer)) {
throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
} else {
ngc = ((Integer)(o)).intValue();
}
- if (((o = entries.get(4)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(4)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, fifth entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
@@ -1280,7 +1278,7 @@ public class GlyphSubstitutionTable exte
throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 1 entry");
} else {
Object o;
- if (((o = entries.get(0)) == null) || ! (o instanceof RuleSet[])) {
+ if (((o = entries.get(0)) == null) || !(o instanceof RuleSet[])) {
throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
} else {
rsa = (RuleSet[]) o;
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org