From: Sasa M. <sa...@us...> - 2004-08-19 10:54:05
|
Update of /cvsroot/jrobin/src/org/jrobin/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7066/org/jrobin/core Modified Files: DsDef.java Log Message: Minor changes. DsDef throws an exception if too long datasource name is supplied. Index: DsDef.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/core/DsDef.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DsDef.java 20 Jul 2004 08:21:02 -0000 1.6 --- DsDef.java 19 Aug 2004 10:53:52 -0000 1.7 *************** *** 117,122 **** private void validate() throws RrdException { ! if(dsName == null || dsName.length() == 0) { ! throw new RrdException("Invalid datasource name specified"); } if(!isValidDsType(dsType)) { --- 117,129 ---- private void validate() throws RrdException { ! if(dsName == null) { ! throw new RrdException("Null datasource name specified"); ! } ! if(dsName.length() == 0) { ! throw new RrdException("Datasource name length equal to zero"); ! } ! if(dsName.length() > RrdPrimitive.STRING_LENGTH) { ! throw new RrdException("Datasource name [" + dsName + "] to long (" + ! dsName.length() + " chars found, only " + RrdPrimitive.STRING_LENGTH + " allowed"); } if(!isValidDsType(dsType)) { |