From 1b9c8d3c789003033b47e2649b3b24b134bf5ab0 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 01 Oct 2012 12:54:15 +0000
Subject: [PATCH] Fix compiler warnings in IDE.

---
 opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFEntryReaderTestCase.java        |    6 +++---
 opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFChangeRecordReaderTestCase.java |   21 ++++++++++-----------
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFChangeRecordReaderTestCase.java b/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFChangeRecordReaderTestCase.java
index 040a7c0..1028cf5 100644
--- a/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFChangeRecordReaderTestCase.java
+++ b/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFChangeRecordReaderTestCase.java
@@ -66,6 +66,7 @@
 /**
  * This class tests the LDIFChangeRecordReader functionality.
  */
+@SuppressWarnings("javadoc")
 public final class LDIFChangeRecordReaderTestCase extends LDIFTestCase {
 
     /**
@@ -1502,7 +1503,7 @@
     @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
     public void testLDIFCRRParseModifyChangeRecordEntryWithWrongChangetype() {
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
             "version: 1",
             "dn: uid=scarter,ou=People,dc=example,dc=com",
             "changetype: modify",
@@ -1519,7 +1520,7 @@
     @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
     public void testLDIFCRRParseModifyChangeRecordEntryWithNullPairKey() {
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
             "version: 1",
             "dn: uid=scarter,ou=People,dc=example,dc=com",
             "changetype: modify",
@@ -1926,7 +1927,7 @@
     public void testChangeRecordReaderHasNoChange() throws Exception {
 
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
             "version: 1",
             "# Add a new entry without changes !",
             "dn: dc=example,dc=com"
@@ -1974,9 +1975,7 @@
      */
     @Test(expectedExceptions = NullPointerException.class)
     public void testChangeRecordReaderInpuStreamDoesntAllowNull() throws Exception {
-        final InputStream is = null;
-        @SuppressWarnings({ "unused", "resource" })
-        LDIFChangeRecordReader reader = new LDIFChangeRecordReader(is);
+        new LDIFChangeRecordReader((InputStream) null);
     }
 
     /**
@@ -1987,7 +1986,7 @@
      */
     @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
     public void testValueOfLDIFChangeRecordDoesntAllowNull() throws Exception {
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord("");
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord("");
     }
 
     /**
@@ -1999,7 +1998,7 @@
     @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
     public void testValueOfLDIFChangeRecordDoesntAllowMultipleChangeRecords() throws Exception {
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
             "version: 1",
             "# Add a new entry",
             "dn: cn=Fiona Jensen, ou=Marketing, dc=airius, dc=com",
@@ -2029,7 +2028,7 @@
     @Test(expectedExceptions = LocalizedIllegalArgumentException.class)
     public void testValueOfLDIFChangeRecordMalformedLDIFDNIsMissing() throws Exception {
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
             "version: 1",
             "# Add a new entry",
             "changetype: add",
@@ -2056,7 +2055,7 @@
     public void testValueOfLDIFChangeRecordMalformedLDIFContainingOnlyVersion() throws Exception {
 
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
                 "version: 1"
         );
         // @formatter:on
@@ -2074,7 +2073,7 @@
             throws Exception {
 
         // @formatter:off
-        final ChangeRecord cr = LDIFChangeRecordReader.valueOfLDIFChangeRecord(
+        LDIFChangeRecordReader.valueOfLDIFChangeRecord(
                 "version: 1",
                 ":wrong"
         );
diff --git a/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFEntryReaderTestCase.java b/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFEntryReaderTestCase.java
index 9049135..6fc4e5c 100644
--- a/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFEntryReaderTestCase.java
+++ b/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldif/LDIFEntryReaderTestCase.java
@@ -60,6 +60,7 @@
 /**
  * This class tests the LDIFEntryReader functionality.
  */
+@SuppressWarnings("javadoc")
 public final class LDIFEntryReaderTestCase extends LDIFTestCase {
     /**
      * Provide a standard entry for the tests below.
@@ -1514,8 +1515,7 @@
      */
     @Test(expectedExceptions = NullPointerException.class)
     public void testLDIFEntryReaderInpuStreamDoesntAllowNull() throws Exception {
-        final InputStream is = null;
-        LDIFEntryReader reader = new LDIFEntryReader(is);
+        new LDIFEntryReader((InputStream) null);
     }
 
     /**
@@ -1548,7 +1548,7 @@
     public void testValueOfLDIFEntryMultipleChangeRecordFound() throws Exception {
 
         // @formatter:off
-        final Entry entry = LDIFEntryReader.valueOfLDIFEntry(
+        LDIFEntryReader.valueOfLDIFEntry(
             "#This is an example test",
             "dn: CN=John Smith,OU=Legal,DC=example,DC=com",
             "changetype: modify",

--
Gitblit v1.10.0