All pastes #256711 Raw Edit

Mine

public text v1 · immutable
#256711 ·published 2006-11-24 15:18 UTC
rendered paste body
====> cleanup1.diff <====
Index: opennms-webapp/src/test/java/org/opennms/web/svclayer/support/DefaultDistributedStatusServiceTest.java
===================================================================
--- opennms-webapp/src/test/java/org/opennms/web/svclayer/support/DefaultDistributedStatusServiceTest.java	(revision 5181)
+++ opennms-webapp/src/test/java/org/opennms/web/svclayer/support/DefaultDistributedStatusServiceTest.java	(working copy)
@@ -209,8 +209,6 @@
         
         verifyEverything();
         
-        //System.out.print(table.toString());
-        
         SimpleWebTable expectedTable = new SimpleWebTable();
         expectedTable.setTitle("Distributed poller view for Application 1 from Raleigh location");
         


====> cleanup2.diff <====
Index: opennms-webapp/src/main/java/org/opennms/web/graph/GraphModelAbstract.java
===================================================================
--- opennms-webapp/src/main/java/org/opennms/web/graph/GraphModelAbstract.java	(revision 5181)
+++ opennms-webapp/src/main/java/org/opennms/web/graph/GraphModelAbstract.java	(working copy)
@@ -27,6 +27,7 @@
 import org.opennms.web.performance.GraphResource;
 import org.opennms.web.performance.GraphResourceType;
 import org.springframework.orm.ObjectRetrievalFailureException;
+import org.springframework.util.StringUtils;
 
 public abstract class GraphModelAbstract implements GraphModel {
     private GraphDao m_dao;
@@ -98,10 +99,17 @@
                 continue;
             }
             
-            List requiredList = Arrays.asList(query.getColumns());
+            List<String> requiredList = Arrays.asList(query.getColumns());
 
             if (availDataSourceList.containsAll(requiredList)) {
+                if (log().isDebugEnabled()) {
+                    log().debug("adding " + query.getName() + " to query list");
+                }
                 returnList.add(query);
+            } else {
+                if (log().isDebugEnabled()) {
+                    log().debug("not adding " + query.getName() + " to query list because required list of attributes (" + StringUtils.collectionToDelimitedString(requiredList, ", ") + ") is not in the list of attributes on the resource (" + StringUtils.collectionToDelimitedString(availDataSourceList, ", ")+ ")");
+                }
             }
         }
 


====> cleanup3.diff <====
Index: opennms-webapp/src/main/webapp/WEB-INF/jsp/graph/results.jsp
===================================================================
--- opennms-webapp/src/main/webapp/WEB-INF/jsp/graph/results.jsp	(revision 5181)
+++ opennms-webapp/src/main/webapp/WEB-INF/jsp/graph/results.jsp	(working copy)
@@ -215,7 +215,9 @@
     </c:when>
 
     <c:otherwise>
-      There is no data for this resource.
+      <p>
+        There is no data for this resource.
+      </p>
     </c:otherwise>
   </c:choose>
     


====> discovery.diff <====
Index: opennms-services/src/main/java/org/opennms/netmgt/discovery/Discovery.java
===================================================================
--- opennms-services/src/main/java/org/opennms/netmgt/discovery/Discovery.java	(revision 5181)
+++ opennms-services/src/main/java/org/opennms/netmgt/discovery/Discovery.java	(working copy)
@@ -41,10 +41,10 @@
 
 import java.beans.PropertyVetoException;
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -162,11 +162,11 @@
             // open the file indicated by the url
             URL fileURL = new URL(url);
 
-            File file = new File(fileURL.getFile());
+            InputStream is = fileURL.openStream();
 
             // check to see if the file exists
-            if (file.exists()) {
-                BufferedReader buffer = new BufferedReader(new FileReader(file));
+            if (is != null) {
+                BufferedReader buffer = new BufferedReader(new InputStreamReader(is));
 
                 String ipLine = null;
                 String specIP = null;


====> iplike-undef.diff <====
Index: opennms-iplike/src/main/native/iplike.c
===================================================================
--- opennms-iplike/src/main/native/iplike.c	(revision 5192)
+++ opennms-iplike/src/main/native/iplike.c	(working copy)
@@ -39,6 +39,10 @@
 #endif
 
 #include <ctype.h>		/* used for isdigit() & isspace() */
+
+#ifdef UNDEF_FILE_OFFSET_BITS
+# undef _FILE_OFFSET_BITS
+#endif /* UNDEF_FILE_OFFSET_BITS */
 #include <postgres.h>		/* PostgreSQL types */
 
 #ifdef DEBUG


====> maybe-needed-for-resultsArray.diff <====
Index: opennms-rrd/opennms-rrd-rrdtool/opennms-rrdtool-jni/src/main/native/rrd_jinterface.c
===================================================================
--- opennms-rrd/opennms-rrd-rrdtool/opennms-rrdtool-jni/src/main/native/rrd_jinterface.c	(revision 5181)
+++ opennms-rrd/opennms-rrd-rrdtool/opennms-rrdtool-jni/src/main/native/rrd_jinterface.c	(working copy)
@@ -297,7 +297,7 @@
 
 	jstring utf_str;
 	jclass  clazz;
-	jobjectArray resultsArray;
+	jobjectArray resultsArray = NULL;
 	int bytesWritten;
 	jclass	clazzOutOfMem;
 


====> opennms-properties-80-char.diff <====
Index: opennms-daemon/src/main/filtered/etc/opennms.properties
===================================================================
--- opennms-daemon/src/main/filtered/etc/opennms.properties	(revision 5193)
+++ opennms-daemon/src/main/filtered/etc/opennms.properties	(working copy)
@@ -1,41 +1,52 @@
 #
-# This properties file allows you to set global properties for the opennms application
-# These properties will be set as system properties at the beginning of java startup.  
+# This properties file allows you to set global properties for the opennms
+# application.  These properties will be set as system properties at the
+# beginning of Java startup.  Any properties set on the Java command-line
+# with -Dproperty=value will be overridden by these values.
 #
 
 #
-#  OpenNMS provides two different SNMP implementations.  JoeSNMP is the original OpenNMS
-#  SNMP Library and provides SNMP v1 and v2 support.  SNMP4J is a new 100% Java SNMP library
-#  that provides support for SNMP v1, v2 and v3.  
+# OpenNMS provides two different SNMP implementations.  JoeSNMP is the
+# original OpenNMS # SNMP Library and provides SNMP v1 and v2 support.
+# SNMP4J is a new 100% Java SNMP library # that provides support for SNMP
+# v1, v2 and v3.  
 #
-# To enable the JoeSnmp library uncomment the following line
+# To enable the JoeSnmp library uncomment the following line.
 #org.opennms.snmp.strategyClass=org.opennms.netmgt.snmp.joesnmp.JoeSnmpStrategy
 #
-# The SNMP4J library is currently the default.  But can also be set with the following
+# The SNMP4J library is currently the default.  But can also be set with
+# the following line.
+#
 # Default:
 #org.opennms.snmp.strategyClass=org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy
 
 #
-# On very large systems the OpenNMS default mechanism of storing one dataSource per file can
-# be very I/O Intensive.  Many I/O subsystems fail to keep up with the vast amounts of data 
-# that opennms can collect in this situation.  We have found that in those situations having
-# fewer large files with more dataSources in each performs better than many smaller files with 
-# just a little data.  So we have added an option that enables all of the dataSource belonging
-# to a single collection group to be stored together in a single file.  To enable this setting
-# uncomment the below line and change it to 'true'.  Also note that the snmp-graph.properties will
-# need to change as it indicates which files need to exist for each graph.  Look in 
-# ${opennms.home}/etc/examples/store-by-group-snmp-graph.properties for an example of the changes
-#
+# On very large systems the OpenNMS default mechanism of storing one data
+# source per RRD file can be very I/O Intensive.  Many I/O subsystems fail
+# to keep up with the vast amounts of data that OpenNMS can collect in this
+# situation.  We have found that in those situations having fewer large files
+# with multiple data sources in each performs better than many smaller files,
+# each with a single data source.  This option enables all of the data sources
+# belonging to a single collection group to be stored together in a single
+# file.  To enable this setting uncomment the below line and change it to
+# 'true'.  Also note that the snmp-graph.properties will need to change as
+# it indicates which files need to exist for each graph.  Look in 
+# ${opennms.home}/etc/examples/store-by-group-snmp-graph.properties for an
+# example of the changes.
 # 
 # Default:
 #org.opennms.rrd.storeByGroup=false
 
 #
-# Though this is not strictly an opennms property this is a setting that you may need to set if you
-# are using the Distributed Monitor either via webstart or the opennms-remote-poller.  In that case
-# all of the remote monitors need a hostname or ip address that they can resolve to locate the opennms
-# server.  This code uses java's RMI protocol to communicate and needs to know the name the client will
-# use to connect.  This will be especially true if the client must connect to the server thru a firewall
+# Though this is not strictly an OpenNMS property this is a setting that you
+# may need to set if you are using the distributed monitor either via webstart
+# or the command-line remote poller.  In these cases, all of the remote
+# monitors need a hostname or IP address they can resolve to locate the
+# central OpenNMS server.  This code uses Java's RMI protocol to communicate
+# and needs to know the name the client will use to connect.  This will be
+# especially true if the client must connect to the server thru a firewall.
 #
-# The default behavior is for it to pick one of the ip addresses of the server host.
+# The default behavior is for it to pick one of the IP addresses of the server
+# host.
+#
 #java.rmi.server.hostname=<some server ip address>


====> solaris-blastwave-postgresql.diff <====
Index: pom.xml
===================================================================
--- pom.xml	(revision 5190)
+++ pom.xml	(working copy)
@@ -703,6 +703,25 @@
       </properties>
     </profile>
 
+    <!--
+         This is for the postgresql package from Blastwave.org.
+         See this for more information:
+
+         http://www.blastwave.org/packages.php/postgresql
+      -->
+    <profile>
+      <id>solaris-blastwave-postgresql</id>
+      <activation>
+      	<file>
+	  <exists>/var/sadm/pkg/CSWpostgresql/pkginfo</exists>
+	</file>
+      </activation>
+
+      <properties>
+	<build.postgresql.include.dir>/opt/csw/postgresql/include/server</build.postgresql.include.dir>
+      </properties>
+    </profile>
+
 <!--
    The activation for this profile is broken as is activates on NON FreeBSD systems.
    Commonly activation is done by the existence of a file that is specific to the OS.