commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trei...@apache.org
Subject cvs commit: jakarta-commons-sandbox/id/src/test/org/apache/commons/id/uuid/state StateHelperTest.java
Date Mon, 31 May 2004 07:11:17 GMT
treilly     2004/05/31 00:11:17

  Modified:    id/src/test/org/apache/commons/id/uuid/state
                        StateHelperTest.java
  Log:
  testEncodeMAC throws Exception comments and reformats (makes my ide not point out checkstyle
issue)
  
  Revision  Changes    Path
  1.2       +14 -16    jakarta-commons-sandbox/id/src/test/org/apache/commons/id/uuid/state/StateHelperTest.java
  
  Index: StateHelperTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/id/src/test/org/apache/commons/id/uuid/state/StateHelperTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StateHelperTest.java	4 Mar 2004 03:17:45 -0000	1.1
  +++ StateHelperTest.java	31 May 2004 07:11:17 -0000	1.2
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -104,8 +104,7 @@
                   boolean runTest = true;
                   try {
                       System.loadLibrary("JNativeWin32Clock");
  -                }
  -                catch (UnsatisfiedLinkError usle) {
  +                } catch (UnsatisfiedLinkError usle) {
                       runTest = false;
                   }
                   if (runTest) {
  @@ -116,11 +115,9 @@
                       assertTrue(ck instanceof SystemClockImpl);
                   }
               }
  -        }
  -        catch (Exception e) {
  +        } catch (Exception e) {
               fail(e.getMessage());
  -        }
  -        finally {
  +        } finally {
               // Make sure to put it back.
               if (currentClockImpl != null) {
                   System.setProperty(StateHelper.UUID_CLOCK_IMPL_PROPERTY_KEY, currentClockImpl);
  @@ -144,11 +141,9 @@
               System.setProperty(StateHelper.UUID_STATE_IMPL_PROPERTY_KEY, "org.apache.commons.id.uuid.state.ReadWriteFileStateImpl");
               st = StateHelper.getStateImpl();
               assertTrue(st instanceof ReadWriteFileStateImpl);
  -        }
  -        catch (Exception e) {
  +        } catch (Exception e) {
               fail(e.getMessage());
  -        }
  -        finally {
  +        } finally {
               // Make sure to put it back.
               if (currentStateImpl != null) {
                   System.setProperty(StateHelper.UUID_CLOCK_IMPL_PROPERTY_KEY, currentStateImpl);
  @@ -163,8 +158,11 @@
           assertTrue(Arrays.equals(macAsBytes, StateHelper.decodeMACAddress("02-00-4C-4F-4F-50")));
       }
   
  -    /** Test the encodeMACAddress method. */
  -    public void testEncodeMACAddress() {
  +    /**
  +     * <p>Test the encodeMACAddress method.</p>
  +     * @throws Exception a test Exception.
  +     */
  +    public void testEncodeMACAddress() throws Exception {
           // Test MAC address 02-00-4C-4F-4F-50
           byte[] macAsBytes = {0x02, 0x00, 0x4C, 0x4F, 0x4F, 0x50};
           assertEquals("02-00-4C-4F-4F-50", StateHelper.encodeMACAddress(macAsBytes));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message