[jboss-cvs] jbosside/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs ...

Robert Stryker rob.stryker at jboss.com
Wed Mar 7 17:15:10 EST 2007


  User: rawb    
  Date: 07/03/07 17:15:10

  Modified:    as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs 
                        XPathDialogs.java
  Log:
  recursive error and null check
  
  Revision  Changes    Path
  1.13      +3 -1      jbosside/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: XPathDialogs.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosside/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- XPathDialogs.java	12 Jan 2007 19:48:41 -0000	1.12
  +++ XPathDialogs.java	7 Mar 2007 22:15:09 -0000	1.13
  @@ -672,7 +672,7 @@
   				String[] strings = getAttributeNameProposalStrings(elementText.getText(), contents);
   				return convertProposals(strings);
   			}
  -			return null;
  +			return new IContentProposal[0];
   		}
   		public String[] getAttributeNameProposalStrings(String parentPath, String remainder) {
   			ArrayList names = new ArrayList();
  @@ -725,6 +725,7 @@
   				return new IContentProposal[] { new XPathContentProposal("/server/", "/server/".length(), null, null)};
   			}
   			
  +			try {
   			int type = getType(contents);
   			if( type == NEW_ELEMENT ) return getElementProposals(contents, "");
   			if( type == IN_ELEMENT ) return getElementProposals(contents);
  @@ -732,6 +733,7 @@
   			if( type == IN_ATTRIBUTE ) return getAttributeNameProposals(contents);
   			if( type == NEW_ATTRIBUTE_VALUE ) return getAttributeValueProposals(contents, "");
   			if( type == IN_ATTRIBUTE_VALUE ) return getAttributeValueProposals(contents);
  +			} catch( Exception e) {e.printStackTrace();}
   			return new IContentProposal[]{};
   		}
   		
  
  
  



More information about the jboss-cvs-commits mailing list