Truncating to 75 characters
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:56:16 +0200
changeset 13350bf1b976c0d
parent 132 3bc4c54f4bcc
child 134 df21e222a781
Truncating to 75 characters
samples/apifest1/boolcircuit/test/org/netbeans/apifest/boolcircuit/CircuitTest.java
samples/apifest1/day1/parsingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java
samples/apifest1/day2/RealTest.java
samples/apifest1/day2/stackbasedsolution/src/org/netbeans/apifest/boolcircuit/Circuit2.java
samples/apifest1/day2/welltestedsolution/test/org/netbeans/apifest/boolcircuit/RealTest.java
samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/test/apifest/CircuitTest.java
samples/aserverinfo/test/org/apidesign/aserverinfo/AServerInfoTest.java
samples/deadlock/src/org/apidesign/deadlock/startuplock/CLIHandler.java
samples/deadlock/src/org/apidesign/deadlock/startuplock/CLIHandlerBlocking.java
samples/deadlock/test/org/apidesign/deadlock/DeadlockTest.java
samples/deadlock/test/org/apidesign/deadlock/logs/ParallelSortedTest.java
samples/delegatingwriter/test/org/apidesign/delegatingwriter/CryptoWriter.java
samples/delegatingwriterfinal/src-api1.0/api/Writer.java
samples/friendpackage/src/apipkg/Item.java
samples/gc/test/org/apidesign/gc/SizeTest.java
samples/javabeans/src/org/apidesign/javabeans/with/HighlightsContainer.java
samples/javabeans/src/org/apidesign/javabeans/without/HighlightsContainer.java
samples/javabeans/test/org/apidesign/javabeans/use/toomany/MyHighlightsContainer.java
samples/messagedigest/src-bridge/org/apidesign/impl/security/extension/BridgeToOld.java
samples/preventcyclicdependencies/src-acyclic1/org/apidesign/cycles/array/MutableArray.java
samples/primitiveconstants/src-impl/impl/Impl.java
     1.1 --- a/samples/apifest1/boolcircuit/test/org/netbeans/apifest/boolcircuit/CircuitTest.java	Sat Jun 14 09:56:12 2008 +0200
     1.2 +++ b/samples/apifest1/boolcircuit/test/org/netbeans/apifest/boolcircuit/CircuitTest.java	Sat Jun 14 09:56:16 2008 +0200
     1.3 @@ -1,31 +1,5 @@
     1.4 -/*
     1.5 - * The contents of this file are subject to the terms of the Common Development
     1.6 - * and Distribution License (the License). You may not use this file except in
     1.7 - * compliance with the License.
     1.8 - *
     1.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
    1.10 - * or http://www.netbeans.org/cddl.txt.
    1.11 - *
    1.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
    1.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
    1.14 - * If applicable, add the following below the CDDL Header, with the fields
    1.15 - * enclosed by brackets [] replaced by your own identifying information:
    1.16 - * "Portions Copyrighted [year] [name of copyright owner]"
    1.17 - *
    1.18 - * The Original Software is NetBeans. The Initial Developer of the Original
    1.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    1.20 - * Microsystems, Inc. All Rights Reserved.
    1.21 - */
    1.22 -
    1.23  package org.netbeans.apifest.boolcircuit;
    1.24  
    1.25 -import java.security.CodeSource;
    1.26 -import java.security.Permission;
    1.27 -import java.security.PermissionCollection;
    1.28 -import java.security.Policy;
    1.29 -import java.util.Collection;
    1.30 -import java.util.Collections;
    1.31 -import java.util.Enumeration;
    1.32  import junit.framework.TestCase;
    1.33  import junit.framework.*;
    1.34  
    1.35 @@ -41,20 +15,24 @@
    1.36   *          on output 1 and 1 to 0
    1.37   *   <li>and - has two inputs and one output. The output is 1 only if both 
    1.38   *          inputs are 1, otherwise it is 0
    1.39 - *   <li>or - has two inputs and one output. The output is 1 always, except
    1.40 - *          in the case when both inputs are 0
    1.41 + *   <li>or - has two inputs and one output. The output is 1 always, 
    1.42 + *          except in the case when both inputs are 0
    1.43   * </ul>
    1.44   *
    1.45   * <p>
    1.46 - * The boolean circuit can be used to represent boolean formulas and compute
    1.47 - * the results for certain values of its inputs. The individual tasks described
    1.48 - * as tests bellow.
    1.49 + * The boolean circuit can be used to represent boolean formulas and 
    1.50 + * compute the results for certain values of its inputs. The individual
    1.51 + * tasks described as tests bellow.
    1.52   *
    1.53   * <p>
    1.54   * Links of interest:
    1.55   * <ul>
    1.56 - *   <li><a href="http://en.wikipedia.org/wiki/Truth_table">Truth table</a>
    1.57 - *   <li><a href="http://en.wikipedia.org/wiki/Tautology_(logic)">Taugology</a>
    1.58 + *   <li>
    1.59 + *      <a href="http://en.wikipedia.org/wiki/Truth_table">
    1.60 + *          Truth table</a>
    1.61 + *   <li>
    1.62 + *      <a href="http://en.wikipedia.org/wiki/Tautology_(logic)">
    1.63 + *          Taugology</a>
    1.64   * </ul>
    1.65   */
    1.66  public class CircuitTest extends TestCase {
     2.1 --- a/samples/apifest1/day1/parsingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java	Sat Jun 14 09:56:12 2008 +0200
     2.2 +++ b/samples/apifest1/day1/parsingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java	Sat Jun 14 09:56:16 2008 +0200
     2.3 @@ -22,10 +22,11 @@
     2.4  // BEGIN: apifest.day1.parsingsolution.Circuit
     2.5  /**
     2.6   * Usage:
     2.7 - * First method parse must be called with valid logical expression on input.
     2.8 - * If it returns zero then it is possible to call method evaluate with array
     2.9 - * of input values as parameter. Method evaluate can be invoked many time with
    2.10 - * different input values.
    2.11 + * First method parse must be called with valid logical expression on 
    2.12 + * input.
    2.13 + * If it returns zero then it is possible to call method evaluate with 
    2.14 + * array of input values as parameter. Method evaluate can be invoked 
    2.15 + * many time with different input values.
    2.16   * Method parse can be called anytime to change logical expression.
    2.17   */
    2.18  public class Circuit {
     3.1 --- a/samples/apifest1/day2/RealTest.java	Sat Jun 14 09:56:12 2008 +0200
     3.2 +++ b/samples/apifest1/day2/RealTest.java	Sat Jun 14 09:56:16 2008 +0200
     3.3 @@ -24,7 +24,7 @@
     3.4   *             and(false,true)=0*1=0=false
     3.5   *   <li>or - or(x,y) = 1 - (1 - x) * (1 - y) and this is also ok as
     3.6   *            or(false,false) = 1 - (1 - 0) * (1 - 0) = 1 - 1 = 0 = false
     3.7 - *            or(true,false) = 1 - (1 - 1) * (1 - 0) = 1 - 0 * 1 = 1 = true
     3.8 + *            or(true,false) = 1 - (1 - 1)*(1 - 0) = 1 - 0 * 1 = 1 = true
     3.9   * </ul>
    3.10   * <p>
    3.11   * However as the circuits with doubles are more rich than plain boolean 
    3.12 @@ -48,7 +48,8 @@
    3.13       *
    3.14       * Feed this circuit with x1=true, x2=false, assert result is false
    3.15       *
    3.16 -     * Feed the same circuit with x1=false, x2=true, assert result is true
    3.17 +     * Feed the same circuit with x1=false, x2=true, assert result is 
    3.18 +     * true
    3.19       *
    3.20       * Feed the same circuit with x1=0.0, x2=1.0, assert result is 1.0
    3.21       *
    3.22 @@ -61,12 +62,12 @@
    3.23          fail("testX1andX2orNotX1");
    3.24      }
    3.25      
    3.26 -    /** Ensure that one variable cannot be filled with two different values.
    3.27 -     * Create a circuit for x1 and x1. Make sure that for any usage of your
    3.28 -     * API that would not lead to x1 * x1 result, an exception is thrown.
    3.29 -     * For example if there was a way to feed the circuit with two different 
    3.30 -     * values 0.3 and 0.5 an exception is thrown indicating that this is 
    3.31 -     * improper use of the circuit.
    3.32 +    /** Ensure that one variable cannot be filled with two different 
    3.33 +     * values. Create a circuit for x1 and x1. Make sure that for any 
    3.34 +     * usage of your API that would not lead to x1 * x1 result, an 
    3.35 +     * exception is thrown. For example if there was a way to feed the 
    3.36 +     * circuit with two different values 0.3 and 0.5 an exception is 
    3.37 +     * thrown indicating that this is improper use of the circuit.
    3.38       */
    3.39      public void testImproperUseOfTheCircuit() {
    3.40          fail("testImproperUseOfTheCircuit");
     4.1 --- a/samples/apifest1/day2/stackbasedsolution/src/org/netbeans/apifest/boolcircuit/Circuit2.java	Sat Jun 14 09:56:12 2008 +0200
     4.2 +++ b/samples/apifest1/day2/stackbasedsolution/src/org/netbeans/apifest/boolcircuit/Circuit2.java	Sat Jun 14 09:56:16 2008 +0200
     4.3 @@ -1,22 +1,3 @@
     4.4 -/*
     4.5 - * The contents of this file are subject to the terms of the Common Development
     4.6 - * and Distribution License (the License). You may not use this file except in
     4.7 - * compliance with the License.
     4.8 - *
     4.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
    4.10 - * or http://www.netbeans.org/cddl.txt.
    4.11 - *
    4.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
    4.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
    4.14 - * If applicable, add the following below the CDDL Header, with the fields
    4.15 - * enclosed by brackets [] replaced by your own identifying information:
    4.16 - * "Portions Copyrighted [year] [name of copyright owner]"
    4.17 - *
    4.18 - * The Original Software is NetBeans. The Initial Developer of the Original
    4.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    4.20 - * Microsystems, Inc. All Rights Reserved.
    4.21 - */
    4.22 -
    4.23  package org.netbeans.apifest.boolcircuit;
    4.24  
    4.25  import java.util.Stack;
    4.26 @@ -25,6 +6,7 @@
    4.27   */ 
    4.28  //BEGIN: apifest.day2.stackbasedsolution.Circuit2
    4.29  public interface Circuit2 extends Circuit {
    4.30 -    public double evaluate (double ... input) throws IllegalArgumentException;
    4.31 +    public double evaluate (double ... input) 
    4.32 +    throws IllegalArgumentException;
    4.33  }
    4.34  //END: apifest.day2.stackbasedsolution.Circuit2
     5.1 --- a/samples/apifest1/day2/welltestedsolution/test/org/netbeans/apifest/boolcircuit/RealTest.java	Sat Jun 14 09:56:12 2008 +0200
     5.2 +++ b/samples/apifest1/day2/welltestedsolution/test/org/netbeans/apifest/boolcircuit/RealTest.java	Sat Jun 14 09:56:16 2008 +0200
     5.3 @@ -51,7 +51,8 @@
     5.4       *
     5.5       * Feed this circuit with x1=true, x2=false, assert result is false
     5.6       *
     5.7 -     * Feed the same circuit with x1=false, x2=true, assert result is true
     5.8 +     * Feed the same circuit with x1=false, x2=true, assert result is 
     5.9 +     * true
    5.10       *
    5.11       * Feed the same circuit with x1=0.0, x2=1.0, assert result is 1.0
    5.12       *
    5.13 @@ -71,12 +72,12 @@
    5.14          assertEquals("0.0, 1.0", 1.0, c.evaluateFuzzy(0.0, 1.0), 0.0);
    5.15      }
    5.16      
    5.17 -    /** Ensure that one variable cannot be filled with two different values.
    5.18 -     * Create a circuit for x1 and x1. Make sure that for any usage of your
    5.19 -     * API that would not lead to x1 * x1 result, an exception is thrown.
    5.20 -     * For example if there was a way to feed the circuit with two different 
    5.21 -     * values 0.3 and 0.5 an exception is thrown indicating that this is 
    5.22 -     * improper use of the circuit.
    5.23 +    /** Ensure that one variable cannot be filled with two different 
    5.24 +     * values. Create a circuit for x1 and x1. Make sure that for any 
    5.25 +     * usage of your API that would not lead to x1 * x1 result, an 
    5.26 +     * exception is thrown. For example if there was a way to feed the 
    5.27 +     * circuit with two different values 0.3 and 0.5 an exception is 
    5.28 +     * thrown indicating that this is improper use of the circuit.
    5.29       */
    5.30      public void testImproperUseOfTheCircuit() {
    5.31          // does not apply
     6.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/test/apifest/CircuitTest.java	Sat Jun 14 09:56:12 2008 +0200
     6.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/test/apifest/CircuitTest.java	Sat Jun 14 09:56:16 2008 +0200
     6.3 @@ -1,43 +1,3 @@
     6.4 -/*
     6.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.6 - *
     6.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     6.8 - *
     6.9 - * The contents of this file are subject to the terms of either the GNU
    6.10 - * General Public License Version 2 only ("GPL") or the Common
    6.11 - * Development and Distribution License("CDDL") (collectively, the
    6.12 - * "License"). You may not use this file except in compliance with the
    6.13 - * License. You can obtain a copy of the License at
    6.14 - * http://www.netbeans.org/cddl-gplv2.html
    6.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    6.16 - * specific language governing permissions and limitations under the
    6.17 - * License.  When distributing the software, include this License Header
    6.18 - * Notice in each file and include the License file at
    6.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    6.20 - * particular file as subject to the "Classpath" exception as provided
    6.21 - * by Sun in the GPL Version 2 section of the License file that
    6.22 - * accompanied this code. If applicable, add the following below the
    6.23 - * License Header, with the fields enclosed by brackets [] replaced by
    6.24 - * your own identifying information:
    6.25 - * "Portions Copyrighted [year] [name of copyright owner]"
    6.26 - *
    6.27 - * Contributor(s):
    6.28 - *
    6.29 - * The Original Software is NetBeans. The Initial Developer of the Original
    6.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    6.31 - * Microsystems, Inc. All Rights Reserved.
    6.32 - *
    6.33 - * If you wish your version of this file to be governed by only the CDDL
    6.34 - * or only the GPL Version 2, indicate your decision by adding
    6.35 - * "[Contributor] elects to include this software in this distribution
    6.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
    6.37 - * single choice of license, a recipient has the option to distribute
    6.38 - * your version of this file under either the CDDL, the GPL Version 2 or
    6.39 - * to extend the choice of license to its licensees as provided above.
    6.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
    6.41 - * Version 2 license, then the option applies only if the new code is
    6.42 - * made subject to such option by the copyright holder.
    6.43 - */
    6.44  package apifest;
    6.45  
    6.46  import junit.framework.TestCase;
    6.47 @@ -52,8 +12,8 @@
    6.48          super(n);
    6.49      }
    6.50      /**
    6.51 -     * OK, elementbasedsolution looked bulletproof. Every code path was exactly
    6.52 -     * the same as in the initial version. Except one.     
    6.53 +     * OK, elementbasedsolution looked bulletproof. Every code path 
    6.54 +     * was exactly the same as in the initial version. Except one.     
    6.55       */
    6.56      public void testEvaluateWithoutAssign() throws Exception {
    6.57          Circuit.Variable var = Circuit.var();
     7.1 --- a/samples/aserverinfo/test/org/apidesign/aserverinfo/AServerInfoTest.java	Sat Jun 14 09:56:12 2008 +0200
     7.2 +++ b/samples/aserverinfo/test/org/apidesign/aserverinfo/AServerInfoTest.java	Sat Jun 14 09:56:16 2008 +0200
     7.3 @@ -23,17 +23,17 @@
     7.4  
     7.5      @Test
     7.6      public void showUseOfCumulativeFactory() throws Exception {
     7.7 -        Prov prov = new Prov();
     7.8 -        AServerInfo info;
     7.9 +        Prov p = new Prov();
    7.10 +        AServerInfo inf;
    7.11          
    7.12          // BEGIN: aserverinfo.cumulative.creation
    7.13 -        info = AServerInfo.empty().nameProvider(prov).urlProvider(prov).reset(prov);
    7.14 +        inf = AServerInfo.empty().nameProvider(p).urlProvider(p).reset(p);
    7.15          // END: aserverinfo.cumulative.creation
    7.16          
    7.17 -        assertEquals("API Design Server", info.getName());
    7.18 -        assertEquals("http://www.apidesign.org", info.getURL().toExternalForm());
    7.19 -        info.reset();
    7.20 -        assertEquals("Once reset", 1, prov.resets);
    7.21 +        assertEquals("API Design Server", inf.getName());
    7.22 +        assertEquals("http://www.apidesign.org", inf.getURL().toExternalForm());
    7.23 +        inf.reset();
    7.24 +        assertEquals("Once reset", 1, p.resets);
    7.25          
    7.26      }
    7.27      
     8.1 --- a/samples/deadlock/src/org/apidesign/deadlock/startuplock/CLIHandler.java	Sat Jun 14 09:56:12 2008 +0200
     8.2 +++ b/samples/deadlock/src/org/apidesign/deadlock/startuplock/CLIHandler.java	Sat Jun 14 09:56:16 2008 +0200
     8.3 @@ -19,7 +19,9 @@
     8.4          }
     8.5          // otherwise try to create the file yourself
     8.6          lockFile.createNewFile();
     8.7 -        DataOutputStream os = new DataOutputStream(new FileOutputStream(lockFile));
     8.8 +        DataOutputStream os = new DataOutputStream(
     8.9 +            new FileOutputStream(lockFile)
    8.10 +        );
    8.11          ServerSocket server = new ServerSocket();
    8.12          int p = server.getLocalPort();
    8.13          os.writeInt(p);
     9.1 --- a/samples/deadlock/src/org/apidesign/deadlock/startuplock/CLIHandlerBlocking.java	Sat Jun 14 09:56:12 2008 +0200
     9.2 +++ b/samples/deadlock/src/org/apidesign/deadlock/startuplock/CLIHandlerBlocking.java	Sat Jun 14 09:56:16 2008 +0200
     9.3 @@ -24,7 +24,9 @@
     9.4          // otherwise try to create the file yourself
     9.5          enterState(20);
     9.6          lockFile.createNewFile();
     9.7 -        DataOutputStream os = new DataOutputStream(new FileOutputStream(lockFile));
     9.8 +        DataOutputStream os = new DataOutputStream(
     9.9 +            new FileOutputStream(lockFile)
    9.10 +        );
    9.11          ServerSocket server = new ServerSocket();
    9.12          enterState(21);
    9.13          int p = server.getLocalPort();
    10.1 --- a/samples/deadlock/test/org/apidesign/deadlock/DeadlockTest.java	Sat Jun 14 09:56:12 2008 +0200
    10.2 +++ b/samples/deadlock/test/org/apidesign/deadlock/DeadlockTest.java	Sat Jun 14 09:56:16 2008 +0200
    10.3 @@ -36,9 +36,10 @@
    10.4                  JLabel sampleLabel = createLabel();
    10.5                  return sampleLabel.getPreferredSize();
    10.6              } catch (InterruptedException ex) {
    10.7 -                Logger.getLogger(
    10.8 -                    DeadlockTest.class.getName()).log(Level.SEVERE, null, ex
    10.9 +                Logger l = Logger.getLogger(
   10.10 +                    DeadlockTest.class.getName()
   10.11                  );
   10.12 +                l.log(Level.SEVERE, null, ex);
   10.13                  return super.getPreferredSize();
   10.14              }
   10.15          }
    11.1 --- a/samples/deadlock/test/org/apidesign/deadlock/logs/ParallelSortedTest.java	Sat Jun 14 09:56:12 2008 +0200
    11.2 +++ b/samples/deadlock/test/org/apidesign/deadlock/logs/ParallelSortedTest.java	Sat Jun 14 09:56:16 2008 +0200
    11.3 @@ -37,7 +37,8 @@
    11.4              if (!record.getMessage().startsWith("cnt")) {
    11.5                  return;
    11.6              }
    11.7 -            if (runSecond == Thread.currentThread().getName().equals("2nd")) {
    11.8 +            boolean snd = Thread.currentThread().getName().equals("2nd");
    11.9 +            if (runSecond == snd) {
   11.10                  notify();
   11.11                  runSecond = !runSecond;
   11.12              }
    12.1 --- a/samples/delegatingwriter/test/org/apidesign/delegatingwriter/CryptoWriter.java	Sat Jun 14 09:56:12 2008 +0200
    12.2 +++ b/samples/delegatingwriter/test/org/apidesign/delegatingwriter/CryptoWriter.java	Sat Jun 14 09:56:16 2008 +0200
    12.3 @@ -13,7 +13,9 @@
    12.4      public CryptoWriter(Writer out) {
    12.5          super(out);
    12.6      }
    12.7 -    public CryptoWriter(Writer out, AltBufferedWriter.Behaviour behaviour) {
    12.8 +    public CryptoWriter(
    12.9 +        Writer out, AltBufferedWriter.Behaviour behaviour
   12.10 +    ) {
   12.11          super(out, behaviour);
   12.12      }
   12.13  /* The above code is here to let us simulate different behaviours of the append
   12.14 @@ -24,15 +26,15 @@
   12.15          super(out);
   12.16      }
   12.17      
   12.18 -    /* We need to override all known methods of BufferedWriter and do conversion
   12.19 -    * of the argument char, string or char array.
   12.20 +    /* We need to override all known methods of BufferedWriter 
   12.21 +    * and do conversion of the argument char, string or char array.
   12.22      */
   12.23      
   12.24      @Override
   12.25 -    public void write(char[] cbuf, int off, int len) throws IOException {
   12.26 +    public void write(char[] buf, int off, int len) throws IOException {
   12.27          char[] arr = new char[len];
   12.28          for (int i = 0; i < len; i++) {
   12.29 -            arr[i] = convertChar(cbuf[off + i]);
   12.30 +            arr[i] = convertChar(buf[off + i]);
   12.31          }
   12.32          super.write(arr, 0, len);
   12.33      }
    13.1 --- a/samples/delegatingwriterfinal/src-api1.0/api/Writer.java	Sat Jun 14 09:56:12 2008 +0200
    13.2 +++ b/samples/delegatingwriterfinal/src-api1.0/api/Writer.java	Sat Jun 14 09:56:16 2008 +0200
    13.3 @@ -22,13 +22,15 @@
    13.4      public final void write(char cbuf[]) throws IOException {
    13.5  	impl.write(cbuf, 0, cbuf.length);
    13.6      }
    13.7 -    public final void write(char cbuf[], int off, int len) throws IOException {
    13.8 +    public final void write(char cbuf[], int off, int len) 
    13.9 +    throws IOException {
   13.10          impl.write(cbuf, off, len);
   13.11      }
   13.12      public final void write(String str) throws IOException {
   13.13  	impl.write(str, 0, str.length());
   13.14      }
   13.15 -    public final void write(String str, int off, int len) throws IOException {
   13.16 +    public final void write(String str, int off, int len) 
   13.17 +    throws IOException {
   13.18          impl.write(str, off, len);
   13.19      }
   13.20      public final void flush() throws IOException {
   13.21 @@ -44,11 +46,13 @@
   13.22      
   13.23      public static Writer create(final java.io.Writer w) {
   13.24          return new Writer(new Impl() {
   13.25 -            public void write(String str, int off, int len) throws IOException {
   13.26 +            public void write(String str, int off, int len) 
   13.27 +            throws IOException {
   13.28                  w.write(str, off, len);
   13.29              }
   13.30  
   13.31 -            public void write(char[] arr, int off, int len) throws IOException {
   13.32 +            public void write(char[] arr, int off, int len) 
   13.33 +            throws IOException {
   13.34                  w.write(arr, off, len);
   13.35              }
   13.36  
   13.37 @@ -70,8 +74,8 @@
   13.38      public static interface Impl {
   13.39          public void close() throws IOException;
   13.40          public void flush() throws IOException;
   13.41 -        public void write(String str, int off, int len) throws IOException;
   13.42 -        public void write(char[] arr, int off, int len) throws IOException;
   13.43 +        public void write(String s, int off, int len) throws IOException;
   13.44 +        public void write(char[] a, int off, int len) throws IOException;
   13.45      }
   13.46  }
   13.47  // END: writer.final.1.0
    14.1 --- a/samples/friendpackage/src/apipkg/Item.java	Sat Jun 14 09:56:12 2008 +0200
    14.2 +++ b/samples/friendpackage/src/apipkg/Item.java	Sat Jun 14 09:56:16 2008 +0200
    14.3 @@ -1,16 +1,3 @@
    14.4 -/*
    14.5 - *                 Sun Public License Notice
    14.6 - * 
    14.7 - * The contents of this file are subject to the Sun Public License
    14.8 - * Version 1.0 (the "License"). You may not use this file except in
    14.9 - * compliance with the License. A copy of the License is available at
   14.10 - * http://www.sun.com/
   14.11 - * 
   14.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   14.13 - * Code is Jaroslav Tulach. Portions Copyright 2007 Jaroslav Tulach. 
   14.14 - * All Rights Reserved.
   14.15 - */
   14.16 -
   14.17  package apipkg;
   14.18  
   14.19  import implpkg.Accessor;
   14.20 @@ -36,7 +23,8 @@
   14.21      Item() {
   14.22      }
   14.23      
   14.24 -    /** Anyone can value of the item. At least if it can get a reference to it.
   14.25 +    /** Anyone can value of the item. At least if it 
   14.26 +     * can get a reference to it.
   14.27       */
   14.28      public void setValue(int x) {
   14.29          value = x;
    15.1 --- a/samples/gc/test/org/apidesign/gc/SizeTest.java	Sat Jun 14 09:56:12 2008 +0200
    15.2 +++ b/samples/gc/test/org/apidesign/gc/SizeTest.java	Sat Jun 14 09:56:16 2008 +0200
    15.3 @@ -12,14 +12,18 @@
    15.4      public void measureIsDataLowerThan8No() {
    15.5          Data d = new Data();
    15.6          
    15.7 -        NbTestCase.assertSize("The size of the data instance is higher than 8, fail", 8, d);
    15.8 +        NbTestCase.assertSize(
    15.9 +            "The size of the data instance is higher than 8, fail", 8, d
   15.10 +        );
   15.11      }
   15.12  
   15.13      @Test
   15.14      public void measureIsDataLowerThan16Yes() {
   15.15          // BEGIN: size.measure
   15.16          Data d = new Data();
   15.17 -        NbTestCase.assertSize("The size of the data instance is higher than 16", 16, d);
   15.18 +        NbTestCase.assertSize(
   15.19 +            "The size of the data instance is higher than 16", 16, d
   15.20 +        );
   15.21          // END: size.measure
   15.22      }
   15.23      
    16.1 --- a/samples/javabeans/src/org/apidesign/javabeans/with/HighlightsContainer.java	Sat Jun 14 09:56:12 2008 +0200
    16.2 +++ b/samples/javabeans/src/org/apidesign/javabeans/with/HighlightsContainer.java	Sat Jun 14 09:56:16 2008 +0200
    16.3 @@ -2,8 +2,8 @@
    16.4  
    16.5  // BEGIN: javabeans.with.HighlightsContainer
    16.6  public interface HighlightsContainer {        
    16.7 -  public void addHighlightsChangeListener(HighlightsChangeListener listener);
    16.8 -  public HighlightsSequence getHighlights(int startOffset, int endOffset);
    16.9 -  public void removeHighlightsChangeListener(HighlightsChangeListener listener);
   16.10 +  public void addHighlightsChangeListener(HighlightsChangeListener l);
   16.11 +  public HighlightsSequence getHighlights(int start, int end);
   16.12 +  public void removeHighlightsChangeListener(HighlightsChangeListener l);
   16.13  }
   16.14  // END: javabeans.with.HighlightsContainer
    17.1 --- a/samples/javabeans/src/org/apidesign/javabeans/without/HighlightsContainer.java	Sat Jun 14 09:56:12 2008 +0200
    17.2 +++ b/samples/javabeans/src/org/apidesign/javabeans/without/HighlightsContainer.java	Sat Jun 14 09:56:16 2008 +0200
    17.3 @@ -3,7 +3,7 @@
    17.4  // BEGIN: javabeans.without
    17.5  public interface HighlightsContainer {        
    17.6      public void initialize(Callback callback);
    17.7 -    public HighlightsSequence getHighlights(int startOffset, int endOffset);
    17.8 +    public HighlightsSequence getHighlights(int start, int end);
    17.9  
   17.10      public static final class Callback {
   17.11          Callback() { /* only for the infastructure */ }
    18.1 --- a/samples/javabeans/test/org/apidesign/javabeans/use/toomany/MyHighlightsContainer.java	Sat Jun 14 09:56:12 2008 +0200
    18.2 +++ b/samples/javabeans/test/org/apidesign/javabeans/use/toomany/MyHighlightsContainer.java	Sat Jun 14 09:56:16 2008 +0200
    18.3 @@ -22,7 +22,7 @@
    18.4      ) {
    18.5          if (listener == l) listener = null;
    18.6      }
    18.7 -    public HighlightsSequence getHighlights(int startOffset, int endOffset) {
    18.8 +    public HighlightsSequence getHighlights(int start, int end) {
    18.9          return null; // implement
   18.10      }
   18.11  // END: javabeans.with.MyHighlightsContainer
    19.1 --- a/samples/messagedigest/src-bridge/org/apidesign/impl/security/extension/BridgeToOld.java	Sat Jun 14 09:56:12 2008 +0200
    19.2 +++ b/samples/messagedigest/src-bridge/org/apidesign/impl/security/extension/BridgeToOld.java	Sat Jun 14 09:56:16 2008 +0200
    19.3 @@ -56,7 +56,9 @@
    19.4              String type, String algorithm, String className, 
    19.5              List<String> aliases, Map<String, String> attributes
    19.6          ) {
    19.7 -            super(provider, type, algorithm, className, aliases, attributes);
    19.8 +            super(
    19.9 +                provider, type, algorithm, className, aliases, attributes
   19.10 +            );
   19.11              this.dig = dig;
   19.12          }
   19.13  
    20.1 --- a/samples/preventcyclicdependencies/src-acyclic1/org/apidesign/cycles/array/MutableArray.java	Sat Jun 14 09:56:12 2008 +0200
    20.2 +++ b/samples/preventcyclicdependencies/src-acyclic1/org/apidesign/cycles/array/MutableArray.java	Sat Jun 14 09:56:16 2008 +0200
    20.3 @@ -17,7 +17,7 @@
    20.4  
    20.5      public void encrypt(OutputStream os) throws IOException {
    20.6          DoEncode en = Lookup.getDefault().lookup(DoEncode.class);
    20.7 -        assert en != null : "We need org.netbeans.example.crypt to be enabled!";
    20.8 +        assert en != null : "org.netbeans.example.crypt missing!";
    20.9          byte[] clone = (byte[]) arr.clone();
   20.10          en.encode(clone);
   20.11          os.write(clone);
    21.1 --- a/samples/primitiveconstants/src-impl/impl/Impl.java	Sat Jun 14 09:56:12 2008 +0200
    21.2 +++ b/samples/primitiveconstants/src-impl/impl/Impl.java	Sat Jun 14 09:56:16 2008 +0200
    21.3 @@ -5,7 +5,7 @@
    21.4  public class Impl extends API {
    21.5      protected void init(int version) throws IllegalStateException {
    21.6          if (version != API.VERSION) {
    21.7 -          throw new IllegalStateException("Not the right API version error!");
    21.8 +          throw new IllegalStateException("Wrong API version error!");
    21.9          }
   21.10      }
   21.11  // END: theory.binary.constants.impl