Removing unused code 38/91738/1
authorefiacor <fiachra.corcoran@est.tech>
Fri, 19 Jul 2019 11:48:13 +0000 (11:48 +0000)
committerefiacor <fiachra.corcoran@est.tech>
Fri, 19 Jul 2019 11:48:13 +0000 (11:48 +0000)
Change-Id: Ic200975ad20525789c37cc16f3aeeb9e26808ffd
Issue-ID: DMAAP-1226
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
15 files changed:
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/eelf/JettyFilter.java
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/eelf/MetricsFilter.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/GroupServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryExtraRecord.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Feed.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedEndpointID.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/IngressRoute.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/NetworkRoute.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Parameters.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PubFailRecord.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/SubDelivery.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LOGJSONObject.java

index 9ffc8ae..786befc 100644 (file)
@@ -496,13 +496,6 @@ public class NodeConfigManager implements DeliveryQueueHelper {
         return (purl + "/" + fileid);
     }
 
         return (purl + "/" + fileid);
     }
 
-    /**
-     * Is a destination redirected.
-     */
-    public boolean isDestRedirected(DestInfo destinfo) {
-        return (followredirects && rdmgr.isRedirected(destinfo.getSubId()));
-    }
-
     /**
      * Set up redirection on receipt of a 3XX from a target URL.
      */
     /**
      * Set up redirection on receipt of a 3XX from a target URL.
      */
@@ -520,23 +513,6 @@ public class NodeConfigManager implements DeliveryQueueHelper {
         return (false);
     }
 
         return (false);
     }
 
-    /**
-     * Set up redirection on receipt of a 3XX from a target URL.
-     */
-    public boolean handleRedirectionSubLevel(DeliveryTask task, DestInfo destinfo, String redirto, String fileid) {
-        fileid = "/" + fileid;
-        String subid = destinfo.getSubId();
-        String purl = destinfo.getURL();
-        if (task.getFollowRedirects() && subid != null && redirto.endsWith(fileid)) {
-            redirto = redirto.substring(0, redirto.length() - fileid.length());
-            if (!redirto.equals(purl)) {
-                rdmgr.redirect(subid, purl, redirto);
-                return true;
-            }
-        }
-        return false;
-    }
-
     /**
      * Handle unreachable target URL.
      */
     /**
      * Handle unreachable target URL.
      */
@@ -606,16 +582,6 @@ public class NodeConfigManager implements DeliveryQueueHelper {
         return (config.getTargets(feedid));
     }
 
         return (config.getTargets(feedid));
     }
 
-    /**
-     * Get the creation date for a feed.
-     *
-     * @param feedid The feed ID
-     * @return the timestamp of creation date of feed id passed
-     */
-    public String getCreatedDate(String feedid) {
-        return (config.getCreatedDate(feedid));
-    }
-
     /**
      * Get the spool directory for temporary files.
      */
     /**
      * Get the spool directory for temporary files.
      */
@@ -811,30 +777,14 @@ public class NodeConfigManager implements DeliveryQueueHelper {
         return enabledprotocols;
     }
 
         return enabledprotocols;
     }
 
-    public void setEnabledprotocols(String[] enabledprotocols) {
-        this.enabledprotocols = enabledprotocols.clone();
-    }
-
     public String getAafType() {
         return aafType;
     }
 
     public String getAafType() {
         return aafType;
     }
 
-    public void setAafType(String aafType) {
-        this.aafType = aafType;
-    }
-
-    public void setAafInstance(String aafInstance) {
-        this.aafInstance = aafInstance;
-    }
-
     public String getAafAction() {
         return aafAction;
     }
 
     public String getAafAction() {
         return aafAction;
     }
 
-    public void setAafAction(String aafAction) {
-        this.aafAction = aafAction;
-    }
-
     /*
      * Get aafURL from SWM variable
      * */
     /*
      * Get aafURL from SWM variable
      * */
@@ -842,18 +792,10 @@ public class NodeConfigManager implements DeliveryQueueHelper {
         return aafURL;
     }
 
         return aafURL;
     }
 
-    public void setAafURL(String aafURL) {
-        this.aafURL = aafURL;
-    }
-
     public boolean getCadiEnabled() {
         return cadiEnabled;
     }
 
     public boolean getCadiEnabled() {
         return cadiEnabled;
     }
 
-    public void setCadiEnabled(boolean cadiEnabled) {
-        this.cadiEnabled = cadiEnabled;
-    }
-
     /**
      * Builds the permissions string to be verified.
      *
     /**
      * Builds the permissions string to be verified.
      *
index 39b7d8e..69f51d8 100644 (file)
@@ -17,6 +17,7 @@
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.dmaap.datarouter.node.eelf;
 
 import ch.qos.logback.classic.spi.ILoggingEvent;
 package org.onap.dmaap.datarouter.node.eelf;
 
 import ch.qos.logback.classic.spi.ILoggingEvent;
index 235dcb2..0fa57d4 100644 (file)
@@ -17,6 +17,7 @@
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.dmaap.datarouter.node.eelf;
 
 import ch.qos.logback.classic.Level;
 package org.onap.dmaap.datarouter.node.eelf;
 
 import ch.qos.logback.classic.Level;
index 3993b4d..c6b1cde 100755 (executable)
@@ -621,16 +621,6 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider {
         return nodes;
     }
 
         return nodes;
     }
 
-    /**
-     * [DATARTR-27] Poke all the DR nodes
-     * Get an array of all node names in the DR network.
-     *
-     * @return an array of Strings
-     */
-    public static String[] getDRNodes() {
-        return drnodes;
-    }
-
     /**
      * Get an array of all node InetAddresses in the DR network.
      *
     /**
      * Get an array of all node InetAddresses in the DR network.
      *
index 544a480..4432913 100644 (file)
@@ -88,31 +88,6 @@ public class GroupServlet extends ProxyServlet {
             return;
         }
 
             return;
         }
 
-        // Check with the Authorizer
-        /*AuthorizationResponse aresp = authz.decide(req);
-        if (! aresp.isAuthorized()) {
-            message = POLICY_ENGINE;
-            elr.setMessage(message);
-            elr.setResult(HttpServletResponse.SC_FORBIDDEN);
-            eventlogger.error(elr.toString());
-            resp.sendError(HttpServletResponse.SC_FORBIDDEN, message);
-            return;
-        }*/
-
-
-        /*ContentHeader ch = getContentHeader(req);
-        String ver = ch.getAttribute("version");
-        if (!ch.getType().equals(GROUPLIST_CONTENT_TYPE) || !(ver.equals("1.0") || ver.equals("2.0"))) {
-            intlogger.debug("Content-type is: "+req.getHeader("Content-Type"));
-            message = "Incorrect content-type";
-            elr.setMessage(message);
-            elr.setResult(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE);
-            eventlogger.error(elr.toString());
-            resp.sendError(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE, message);
-            return;
-        }*/
-
-
         int groupid = getIdFromPath(req);
         if (groupid < 0) {
             message = "Missing or bad group number.";
         int groupid = getIdFromPath(req);
         if (groupid < 0) {
             message = "Missing or bad group number.";
index 2a959f3..0e5342a 100644 (file)
@@ -44,12 +44,7 @@ public class DeliveryExtraRecord extends BaseLogRecord {
         this.subid = Integer.parseInt(pp[4]);\r
         this.contentLength2 = Long.parseLong(pp[6]);\r
     }\r
         this.subid = Integer.parseInt(pp[4]);\r
         this.contentLength2 = Long.parseLong(pp[6]);\r
     }\r
-    public DeliveryExtraRecord(ResultSet rs) throws SQLException {\r
-        super(rs);\r
-        // Note: because this record should be "rare" these fields are mapped to unconventional fields in the DB\r
-        this.subid  = rs.getInt("DELIVERY_SUBID");\r
-        this.contentLength2 = rs.getInt("CONTENT_LENGTH_2");\r
-    }\r
+\r
     @Override\r
     public void load(PreparedStatement ps) throws SQLException {\r
         ps.setString(1, "dlx");        // field 1: type\r
     @Override\r
     public void load(PreparedStatement ps) throws SQLException {\r
         ps.setString(1, "dlx");        // field 1: type\r
index cab4d3d..1cfd0f6 100644 (file)
@@ -497,14 +497,6 @@ public class Feed extends Syncable {
         this.suspended = suspended;\r
     }\r
 \r
         this.suspended = suspended;\r
     }\r
 \r
-    public Date getLast_mod() {\r
-        return last_mod;\r
-    }\r
-\r
-    public Date getCreated_date() {\r
-        return created_date;\r
-    }\r
-\r
     @Override\r
     public JSONObject asJSONObject() {\r
         JSONObject jo = new JSONObject();\r
     @Override\r
     public JSONObject asJSONObject() {\r
         JSONObject jo = new JSONObject();\r
index cd482c6..384d9f6 100644 (file)
@@ -39,10 +39,6 @@ public class FeedEndpointID implements JSONable {
     private String id;\r
     private String password;\r
 \r
     private String id;\r
     private String password;\r
 \r
-    public FeedEndpointID() {\r
-        this("", "");\r
-    }\r
-\r
     public FeedEndpointID(String id, String password) {\r
         this.id = id;\r
         this.password = password;\r
     public FeedEndpointID(String id, String password) {\r
         this.id = id;\r
         this.password = password;\r
index be4c640..da682d7 100644 (file)
@@ -133,54 +133,6 @@ public class Group extends Syncable {
         return max;\r
     }\r
 \r
         return max;\r
     }\r
 \r
-    public static Collection<String> getGroupsByClassfication(String classfication) {\r
-        List<String> list = new ArrayList<>();\r
-        String sql = "select * from GROUPS where classification = ?";\r
-        try {\r
-            DB db = new DB();\r
-            @SuppressWarnings("resource")\r
-            Connection conn = db.getConnection();\r
-            try (PreparedStatement stmt = conn.prepareStatement(sql)) {\r
-                stmt.setString(1, classfication);\r
-                try (ResultSet rs = stmt.executeQuery()) {\r
-                    while (rs.next()) {\r
-                        int groupid = rs.getInt("groupid");\r
-\r
-                    }\r
-                }\r
-            }\r
-            db.release(conn);\r
-        } catch (SQLException e) {\r
-            intlogger.error("PROV0002 getGroupsByClassfication: " + e.getMessage(), e);\r
-        }\r
-        return list;\r
-    }\r
-\r
-    /**\r
-     * Return a count of the number of active subscriptions in the DB.\r
-     *\r
-     * @return the count\r
-     */\r
-    public static int countActiveSubscriptions() {\r
-        int count = 0;\r
-        try {\r
-            DB db = new DB();\r
-            @SuppressWarnings("resource")\r
-            Connection conn = db.getConnection();\r
-            try (Statement stmt = conn.createStatement()) {\r
-                try (ResultSet rs = stmt.executeQuery("select count(*) from SUBSCRIPTIONS")) {\r
-                    if (rs.next()) {\r
-                        count = rs.getInt(1);\r
-                    }\r
-                }\r
-            }\r
-            db.release(conn);\r
-        } catch (SQLException e) {\r
-            intlogger.warn("PROV0008 countActiveSubscriptions: " + e.getMessage(), e);\r
-        }\r
-        return count;\r
-    }\r
-\r
     public Group() {\r
         this("", "", "");\r
     }\r
     public Group() {\r
         this("", "", "");\r
     }\r
@@ -251,14 +203,6 @@ public class Group extends Syncable {
         Group.intlogger = intlogger;\r
     }\r
 \r
         Group.intlogger = intlogger;\r
     }\r
 \r
-    public static int getNext_groupid() {\r
-        return next_groupid;\r
-    }\r
-\r
-    public static void setNext_groupid(int next_groupid) {\r
-        Group.next_groupid = next_groupid;\r
-    }\r
-\r
     public String getAuthid() {\r
         return authid;\r
     }\r
     public String getAuthid() {\r
         return authid;\r
     }\r
@@ -295,19 +239,6 @@ public class Group extends Syncable {
         return members;\r
     }\r
 \r
         return members;\r
     }\r
 \r
-    public void setMembers(String members) {\r
-        this.members = members;\r
-    }\r
-\r
-    public Date getLast_mod() {\r
-        return last_mod;\r
-    }\r
-\r
-    public void setLast_mod(Date last_mod) {\r
-        this.last_mod = last_mod;\r
-    }\r
-\r
-\r
     @Override\r
     public JSONObject asJSONObject() {\r
         JSONObject jo = new JSONObject();\r
     @Override\r
     public JSONObject asJSONObject() {\r
         JSONObject jo = new JSONObject();\r
index 4332d7d..329e77f 100644 (file)
@@ -189,38 +189,6 @@ public class IngressRoute extends NodeClass implements Comparable<IngressRoute>
         return v;\r
     }\r
 \r
         return v;\r
     }\r
 \r
-    /**\r
-     * Get a collection of all Ingress Routes with a particular sequence number.\r
-     *\r
-     * @param seq the sequence number to look for\r
-     * @return the collection (may be empty).\r
-     */\r
-    public static Collection<IngressRoute> getIngressRoute(int seq) {\r
-        Collection<IngressRoute> rv = new ArrayList<IngressRoute>();\r
-        try {\r
-            DB db = new DB();\r
-            @SuppressWarnings("resource")\r
-            Connection conn = db.getConnection();\r
-            String sql = "select FEEDID, USERID, SUBNET, NODESET from INGRESS_ROUTES where SEQUENCE = ?";\r
-            try (PreparedStatement ps = conn.prepareStatement(sql)) {\r
-                ps.setInt(1, seq);\r
-                try (ResultSet rs = ps.executeQuery()) {\r
-                    while (rs.next()) {\r
-                        int feedid = rs.getInt("FEEDID");\r
-                        String user = rs.getString("USERID");\r
-                        String subnet = rs.getString("SUBNET");\r
-                        int nodeset = rs.getInt("NODESET");\r
-                        rv.add(new IngressRoute(seq, feedid, user, subnet, nodeset));\r
-                    }\r
-                }\r
-            }\r
-            db.release(conn);\r
-        } catch (SQLException e) {\r
-            intlogger.error("PROV0004 getIngressRoute: " + e.getMessage(), e);\r
-        }\r
-        return rv;\r
-    }\r
-\r
     public IngressRoute(int seq, int feedid, String user, String subnet, Collection<String> nodes)\r
             throws IllegalArgumentException {\r
         this(seq, feedid, user, subnet);\r
     public IngressRoute(int seq, int feedid, String user, String subnet, Collection<String> nodes)\r
             throws IllegalArgumentException {\r
         this(seq, feedid, user, subnet);\r
index eeca090..6ac0544 100644 (file)
@@ -113,10 +113,6 @@ public class NetworkRoute extends NodeClass implements Comparable<NetworkRoute>
         return tonode;\r
     }\r
 \r
         return tonode;\r
     }\r
 \r
-    public int getVianode() {\r
-        return vianode;\r
-    }\r
-\r
     @Override\r
     public boolean doDelete(Connection c) {\r
         boolean rv = true;\r
     @Override\r
     public boolean doDelete(Connection c) {\r
         boolean rv = true;\r
index 357444e..9e7071b 100644 (file)
@@ -156,10 +156,6 @@ public class Parameters extends Syncable {
         return keyname;\r
     }\r
 \r
         return keyname;\r
     }\r
 \r
-    public void setKeyname(String keyname) {\r
-        this.keyname = keyname;\r
-    }\r
-\r
     public String getValue() {\r
         return value;\r
     }\r
     public String getValue() {\r
         return value;\r
     }\r
index 88d4882..a38d8bd 100644 (file)
@@ -24,7 +24,6 @@
 package org.onap.dmaap.datarouter.provisioning.beans;\r
 \r
 import java.sql.PreparedStatement;\r
 package org.onap.dmaap.datarouter.provisioning.beans;\r
 \r
 import java.sql.PreparedStatement;\r
-import java.sql.ResultSet;\r
 import java.sql.SQLException;\r
 import java.sql.Types;\r
 import java.text.ParseException;\r
 import java.sql.SQLException;\r
 import java.sql.Types;\r
 import java.text.ParseException;\r
@@ -49,15 +48,6 @@ public class PubFailRecord extends BaseLogRecord {
         this.error = pp[11];\r
     }\r
 \r
         this.error = pp[11];\r
     }\r
 \r
-    public PubFailRecord(ResultSet rs) throws SQLException {\r
-        super(rs);\r
-        // Note: because this record should be "rare" these fields are mapped to unconventional fields in the DB\r
-        this.contentLengthReceived = rs.getLong("CONTENT_LENGTH_2");\r
-        this.sourceIP = rs.getString("REMOTE_ADDR");\r
-        this.user = rs.getString("USER");\r
-        this.error = rs.getString("FEED_FILEID");\r
-    }\r
-\r
     public long getContentLengthReceived() {\r
         return contentLengthReceived;\r
     }\r
     public long getContentLengthReceived() {\r
         return contentLengthReceived;\r
     }\r
index 98981a3..5a3457b 100644 (file)
@@ -43,10 +43,6 @@ public class SubDelivery implements JSONable {
     private String password;\r
     private boolean use100;\r
 \r
     private String password;\r
     private boolean use100;\r
 \r
-    public SubDelivery() {\r
-        this("", "", "", false);\r
-    }\r
-\r
     public SubDelivery(String url, String user, String password, boolean use100) {\r
         this.url = url;\r
         this.user = user;\r
     public SubDelivery(String url, String user, String password, boolean use100) {\r
         this.url = url;\r
         this.user = user;\r
@@ -90,10 +86,6 @@ public class SubDelivery implements JSONable {
         return use100;\r
     }\r
 \r
         return use100;\r
     }\r
 \r
-    public void setUse100(boolean use100) {\r
-        this.use100 = use100;\r
-    }\r
-\r
     @Override\r
     public JSONObject asJSONObject() {\r
         JSONObject jo = new JSONObject();\r
     @Override\r
     public JSONObject asJSONObject() {\r
         JSONObject jo = new JSONObject();\r
index f7e0874..1140a1c 100644 (file)
@@ -186,13 +186,11 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * The map where the JSONObject's properties are kept.
      */
     private final Map<String, Object> map;
 
     /**
      * The map where the JSONObject's properties are kept.
      */
     private final Map<String, Object> map;
 
-
     /**
      * It is sometimes more convenient and less ambiguous to have a
      * <code>NULL</code> object than to use Java's <code>null</code> value.
     /**
      * It is sometimes more convenient and less ambiguous to have a
      * <code>NULL</code> object than to use Java's <code>null</code> value.
@@ -201,7 +199,6 @@ public class LOGJSONObject {
      */
     public static final Object NULL = new Null();
 
      */
     public static final Object NULL = new Null();
 
-
     /**
      * Construct an empty JSONObject.
      */
     /**
      * Construct an empty JSONObject.
      */
@@ -209,7 +206,6 @@ public class LOGJSONObject {
         this.map = new LinkedHashMap<>();
     }
 
         this.map = new LinkedHashMap<>();
     }
 
-
     /**
      * Construct a JSONObject from a subset of another JSONObject.
      * An array of strings is used to identify the keys that should be copied.
     /**
      * Construct a JSONObject from a subset of another JSONObject.
      * An array of strings is used to identify the keys that should be copied.
@@ -229,7 +225,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Construct a JSONObject from a JSONTokener.
      *
     /**
      * Construct a JSONObject from a JSONTokener.
      *
@@ -287,7 +282,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Construct a JSONObject from a Map.
      *
     /**
      * Construct a JSONObject from a Map.
      *
@@ -309,7 +303,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Construct a JSONObject from an Object using bean getters.
      * It reflects on all of the public methods of the object.
     /**
      * Construct a JSONObject from an Object using bean getters.
      * It reflects on all of the public methods of the object.
@@ -334,7 +327,6 @@ public class LOGJSONObject {
         this.populateMap(bean);
     }
 
         this.populateMap(bean);
     }
 
-
     /**
      * Construct a JSONObject from an Object, using reflection to find the
      * public members. The resulting JSONObject's keys will be the strings
     /**
      * Construct a JSONObject from an Object, using reflection to find the
      * public members. The resulting JSONObject's keys will be the strings
@@ -359,7 +351,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Construct a JSONObject from a source JSON text string.
      * This is the most commonly used JSONObject constructor.
     /**
      * Construct a JSONObject from a source JSON text string.
      * This is the most commonly used JSONObject constructor.
@@ -374,7 +365,6 @@ public class LOGJSONObject {
         this(new JSONTokener(source));
     }
 
         this(new JSONTokener(source));
     }
 
-
     /**
      * Construct a JSONObject from a ResourceBundle.
      *
     /**
      * Construct a JSONObject from a ResourceBundle.
      *
@@ -415,7 +405,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Accumulate values under a key. It is similar to the put method except
      * that if there is already an object stored under the key then a
     /**
      * Accumulate values under a key. It is similar to the put method except
      * that if there is already an object stored under the key then a
@@ -451,7 +440,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Append values to the array under a key. If the key does not exist in the
      * JSONObject, then the key is put in the JSONObject with its value being a
     /**
      * Append values to the array under a key. If the key does not exist in the
      * JSONObject, then the key is put in the JSONObject with its value being a
@@ -478,7 +466,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Produce a string from a double. The string "null" will be returned if
      * the number is not finite.
     /**
      * Produce a string from a double. The string "null" will be returned if
      * the number is not finite.
@@ -506,7 +493,6 @@ public class LOGJSONObject {
         return string;
     }
 
         return string;
     }
 
-
     /**
      * Get the value object associated with a key.
      *
     /**
      * Get the value object associated with a key.
      *
@@ -526,7 +512,6 @@ public class LOGJSONObject {
         return object;
     }
 
         return object;
     }
 
-
     /**
      * Get the boolean value associated with a key.
      *
     /**
      * Get the boolean value associated with a key.
      *
@@ -549,7 +534,6 @@ public class LOGJSONObject {
                 "] is not a Boolean.");
     }
 
                 "] is not a Boolean.");
     }
 
-
     /**
      * Get the double value associated with a key.
      *
     /**
      * Get the double value associated with a key.
      *
@@ -570,7 +554,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Get the int value associated with a key.
      *
     /**
      * Get the int value associated with a key.
      *
@@ -591,7 +574,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Get the JSONArray value associated with a key.
      *
     /**
      * Get the JSONArray value associated with a key.
      *
@@ -609,7 +591,6 @@ public class LOGJSONObject {
                 "] is not a JSONArray.");
     }
 
                 "] is not a JSONArray.");
     }
 
-
     /**
      * Get the JSONObject value associated with a key.
      *
     /**
      * Get the JSONObject value associated with a key.
      *
@@ -627,7 +608,6 @@ public class LOGJSONObject {
                 "] is not a JSONObject.");
     }
 
                 "] is not a JSONObject.");
     }
 
-
     /**
      * Get the long value associated with a key.
      *
     /**
      * Get the long value associated with a key.
      *
@@ -648,7 +628,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Get an array of field names from a JSONObject.
      *
     /**
      * Get an array of field names from a JSONObject.
      *
@@ -669,30 +648,6 @@ public class LOGJSONObject {
         return names;
     }
 
         return names;
     }
 
-
-    /**
-     * Get an array of field names from an Object.
-     *
-     * @return An array of field names, or null if there are no names.
-     */
-    public static String[] getNames(Object object) {
-        if (object == null) {
-            return null;
-        }
-        Class<? extends Object> klass = object.getClass();
-        Field[] fields = klass.getFields();
-        int length = fields.length;
-        if (length == 0) {
-            return null;
-        }
-        String[] names = new String[length];
-        for (int i = 0; i < length; i += 1) {
-            names[i] = fields[i].getName();
-        }
-        return names;
-    }
-
-
     /**
      * Get the string associated with a key.
      *
     /**
      * Get the string associated with a key.
      *
@@ -709,7 +664,6 @@ public class LOGJSONObject {
                 "] not a string.");
     }
 
                 "] not a string.");
     }
 
-
     /**
      * Determine if the JSONObject contains a specific key.
      *
     /**
      * Determine if the JSONObject contains a specific key.
      *
@@ -720,7 +674,6 @@ public class LOGJSONObject {
         return this.map.containsKey(key);
     }
 
         return this.map.containsKey(key);
     }
 
-
     /**
      * Increment a property of a JSONObject. If there is no such property,
      * create one with a value of 1. If there is such a property, and if
     /**
      * Increment a property of a JSONObject. If there is no such property,
      * create one with a value of 1. If there is such a property, and if
@@ -749,20 +702,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
-    /**
-     * Determine if the value associated with the key is null or if there is
-     * no value.
-     *
-     * @param key A key string.
-     * @return true if there is no value associated with the key or if
-     * the value is the JSONObject.NULL object.
-     */
-    public boolean isNull(String key) {
-        return LOGJSONObject.NULL.equals(this.opt(key));
-    }
-
-
     /**
      * Get an enumeration of the keys of the JSONObject.
      *
     /**
      * Get an enumeration of the keys of the JSONObject.
      *
@@ -772,7 +711,6 @@ public class LOGJSONObject {
         return this.keySet().iterator();
     }
 
         return this.keySet().iterator();
     }
 
-
     /**
      * Get a set of keys of the JSONObject.
      *
     /**
      * Get a set of keys of the JSONObject.
      *
@@ -782,7 +720,6 @@ public class LOGJSONObject {
         return this.map.keySet();
     }
 
         return this.map.keySet();
     }
 
-
     /**
      * Get the number of keys stored in the JSONObject.
      *
     /**
      * Get the number of keys stored in the JSONObject.
      *
@@ -792,7 +729,6 @@ public class LOGJSONObject {
         return this.map.size();
     }
 
         return this.map.size();
     }
 
-
     /**
      * Produce a JSONArray containing the names of the elements of this
      * JSONObject.
     /**
      * Produce a JSONArray containing the names of the elements of this
      * JSONObject.
@@ -838,7 +774,6 @@ public class LOGJSONObject {
         return string;
     }
 
         return string;
     }
 
-
     /**
      * Get an optional value associated with a key.
      *
     /**
      * Get an optional value associated with a key.
      *
@@ -849,20 +784,6 @@ public class LOGJSONObject {
         return key == null ? null : this.map.get(key);
     }
 
         return key == null ? null : this.map.get(key);
     }
 
-
-    /**
-     * Get an optional boolean associated with a key.
-     * It returns false if there is no such key, or if the value is not
-     * Boolean.TRUE or the String "true".
-     *
-     * @param key A key string.
-     * @return The truth.
-     */
-    public boolean optBoolean(String key) {
-        return this.optBoolean(key, false);
-    }
-
-
     /**
      * Get an optional boolean associated with a key.
      * It returns the defaultValue if there is no such key, or if it is not
     /**
      * Get an optional boolean associated with a key.
      * It returns the defaultValue if there is no such key, or if it is not
@@ -881,21 +802,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
-    /**
-     * Get an optional double associated with a key,
-     * or NaN if there is no such key or if its value is not a number.
-     * If the value is a string, an attempt will be made to evaluate it as
-     * a number.
-     *
-     * @param key A string which is the key.
-     * @return An object which is the value.
-     */
-    public double optDouble(String key) {
-        return this.optDouble(key, Double.NaN);
-    }
-
-
     /**
      * Get an optional double associated with a key, or the
      * defaultValue if there is no such key or if its value is not a number.
     /**
      * Get an optional double associated with a key, or the
      * defaultValue if there is no such key or if its value is not a number.
@@ -915,21 +821,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
-    /**
-     * Get an optional int value associated with a key,
-     * or zero if there is no such key or if the value is not a number.
-     * If the value is a string, an attempt will be made to evaluate it as
-     * a number.
-     *
-     * @param key A key string.
-     * @return An object which is the value.
-     */
-    public int optInt(String key) {
-        return this.optInt(key, 0);
-    }
-
-
     /**
      * Get an optional int value associated with a key,
      * or the default if there is no such key or if the value is not a number.
     /**
      * Get an optional int value associated with a key,
      * or the default if there is no such key or if the value is not a number.
@@ -949,21 +840,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
-    /**
-     * Get an optional JSONArray associated with a key.
-     * It returns null if there is no such key, or if its value is not a
-     * JSONArray.
-     *
-     * @param key A key string.
-     * @return A JSONArray which is the value.
-     */
-    public JSONArray optJSONArray(String key) {
-        Object o = this.opt(key);
-        return o instanceof JSONArray ? (JSONArray) o : null;
-    }
-
-
     /**
      * Get an optional JSONObject associated with a key.
      * It returns null if there is no such key, or if its value is not a
     /**
      * Get an optional JSONObject associated with a key.
      * It returns null if there is no such key, or if its value is not a
@@ -977,21 +853,6 @@ public class LOGJSONObject {
         return object instanceof LOGJSONObject ? (LOGJSONObject) object : null;
     }
 
         return object instanceof LOGJSONObject ? (LOGJSONObject) object : null;
     }
 
-
-    /**
-     * Get an optional long value associated with a key,
-     * or zero if there is no such key or if the value is not a number.
-     * If the value is a string, an attempt will be made to evaluate it as
-     * a number.
-     *
-     * @param key A key string.
-     * @return An object which is the value.
-     */
-    public long optLong(String key) {
-        return this.optLong(key, 0);
-    }
-
-
     /**
      * Get an optional long value associated with a key,
      * or the default if there is no such key or if the value is not a number.
     /**
      * Get an optional long value associated with a key,
      * or the default if there is no such key or if the value is not a number.
@@ -1010,20 +871,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
-    /**
-     * Get an optional string associated with a key.
-     * It returns an empty string if there is no such key. If the value is not
-     * a string and is not null, then it is converted to a string.
-     *
-     * @param key A key string.
-     * @return A string which is the value.
-     */
-    public String optString(String key) {
-        return this.optString(key, "");
-    }
-
-
     /**
      * Get an optional string associated with a key.
      * It returns the defaultValue if there is no such key.
     /**
      * Get an optional string associated with a key.
      * It returns the defaultValue if there is no such key.
@@ -1037,7 +884,6 @@ public class LOGJSONObject {
         return NULL.equals(object) ? defaultValue : object.toString();
     }
 
         return NULL.equals(object) ? defaultValue : object.toString();
     }
 
-
     private void populateMap(Object bean) {
         Class<? extends Object> klass = bean.getClass();
 
     private void populateMap(Object bean) {
         Class<? extends Object> klass = bean.getClass();
 
@@ -1086,7 +932,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Put a key/boolean pair in the JSONObject.
      *
     /**
      * Put a key/boolean pair in the JSONObject.
      *
@@ -1100,7 +945,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/value pair in the JSONObject, where the value will be a
      * JSONArray which is produced from a Collection.
     /**
      * Put a key/value pair in the JSONObject, where the value will be a
      * JSONArray which is produced from a Collection.
@@ -1115,7 +959,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/double pair in the JSONObject.
      *
     /**
      * Put a key/double pair in the JSONObject.
      *
@@ -1129,7 +972,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/int pair in the JSONObject.
      *
     /**
      * Put a key/int pair in the JSONObject.
      *
@@ -1143,7 +985,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/long pair in the JSONObject.
      *
     /**
      * Put a key/long pair in the JSONObject.
      *
@@ -1157,7 +998,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/value pair in the JSONObject, where the value will be a
      * JSONObject which is produced from a Map.
     /**
      * Put a key/value pair in the JSONObject, where the value will be a
      * JSONObject which is produced from a Map.
@@ -1172,7 +1012,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/value pair in the JSONObject. If the value is null,
      * then the key will be removed from the JSONObject if it is present.
     /**
      * Put a key/value pair in the JSONObject. If the value is null,
      * then the key will be removed from the JSONObject if it is present.
@@ -1208,7 +1047,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/value pair in the JSONObject, but only if the key and the
      * value are both non-null, and only if there is not already a member
     /**
      * Put a key/value pair in the JSONObject, but only if the key and the
      * value are both non-null, and only if there is not already a member
@@ -1229,7 +1067,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Put a key/value pair in the JSONObject, but only if the
      * key and the value are both non-null.
     /**
      * Put a key/value pair in the JSONObject, but only if the
      * key and the value are both non-null.
@@ -1248,7 +1085,6 @@ public class LOGJSONObject {
         return this;
     }
 
         return this;
     }
 
-
     /**
      * Produce a string in double quotes with backslash sequences in all the
      * right places. A backslash will be inserted within </, producing <\/,
     /**
      * Produce a string in double quotes with backslash sequences in all the
      * right places. A backslash will be inserted within </, producing <\/,
@@ -1394,7 +1230,6 @@ public class LOGJSONObject {
         return string;
     }
 
         return string;
     }
 
-
     /**
      * Throw an exception if the object is a NaN or infinite number.
      *
     /**
      * Throw an exception if the object is a NaN or infinite number.
      *
@@ -1417,7 +1252,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Produce a JSONArray containing the values of the members of this
      * JSONObject.
     /**
      * Produce a JSONArray containing the values of the members of this
      * JSONObject.
@@ -1459,7 +1293,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
     /**
      * Make a prettyprinted JSON text of this JSONObject.
      * <p>
     /**
      * Make a prettyprinted JSON text of this JSONObject.
      * <p>
@@ -1593,21 +1426,6 @@ public class LOGJSONObject {
         }
     }
 
         }
     }
 
-
-    /**
-     * Write the contents of the JSONObject as JSON text to a writer.
-     * For compactness, no whitespace is added.
-     * <p>
-     * Warning: This method assumes that the data structure is acyclical.
-     *
-     * @return The writer.
-     * @throws JSONException
-     */
-    public Writer write(Writer writer) throws JSONException {
-        return this.write(writer, 0, 0);
-    }
-
-
     @SuppressWarnings("unchecked")
     static final Writer writeValue(Writer writer, Object value,
                                    int indentFactor, int indent) throws JSONException, IOException {
     @SuppressWarnings("unchecked")
     static final Writer writeValue(Writer writer, Object value,
                                    int indentFactor, int indent) throws JSONException, IOException {