Author: d.plentz
Date: 2007-07-25 21:18:37 -0400 (Wed, 25 Jul 2007)
New Revision: 12820
Modified:
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/util/StringHelper.java
Log:
Just some code cleanup.
Modified:
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java
===================================================================
---
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java 2007-07-25
23:49:16 UTC (rev 12819)
+++
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java 2007-07-26
01:18:37 UTC (rev 12820)
@@ -65,7 +65,7 @@
@Override
public Class<? extends Collection> caseParameterizedType(ParameterizedType
parameterizedType) {
- return getCollectionClass( (Class) parameterizedType.getRawType() );
+ return getCollectionClass( parameterizedType.getRawType() );
}
@Override
Modified:
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/util/StringHelper.java
===================================================================
---
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/util/StringHelper.java 2007-07-25
23:49:16 UTC (rev 12819)
+++
trunk/HibernateExt/commons-annotations/src/java/org/hibernate/annotations/common/util/StringHelper.java 2007-07-26
01:18:37 UTC (rev 12820)
@@ -18,17 +18,10 @@
private StringHelper() { /* static methods only - hide constructor */
}
- /*public static boolean containsDigits(String string) {
- for ( int i=0; i<string.length(); i++ ) {
- if ( Character.isDigit( string.charAt(i) ) ) return true;
- }
- return false;
- }*/
-
public static int lastIndexOfLetter(String string) {
for ( int i=0; i<string.length(); i++ ) {
char character = string.charAt(i);
- if ( !Character.isLetter(character) /*&& !('_'==character)*/ ) return
i-1;
+ if ( !Character.isLetter(character) ) return i-1;
}
return string.length()-1;
}
@@ -67,7 +60,6 @@
return buf.toString();
}
-
public static String replace(String template, String placeholder, String replacement) {
return replace( template, placeholder, replacement, false );
}
@@ -75,7 +67,7 @@
public static String[] replace(String templates[], String placeholder, String
replacement) {
String[] result = new String[templates.length];
for ( int i =0; i<templates.length; i++ ) {
- result[i] = replace( templates[i], placeholder, replacement );;
+ result[i] = replace( templates[i], placeholder, replacement );
}
return result;
}
@@ -113,7 +105,6 @@
}
}
-
public static String[] split(String seperators, String list) {
return split( seperators, list, false );
}
@@ -234,8 +225,8 @@
ArrayList locations = new ArrayList( 20 );
- // Impl note: takes advantage of the fact that an escpaed single quote
- // embedded within a quote-block can really be handled as two seperate
+ // Impl note: takes advantage of the fact that an escaped single quote
+ // embedded within a quote-block can really be handled as two separate
// quote-blocks for the purposes of this method...
int stringLength = string.length();
boolean inQuote = false;
@@ -328,7 +319,7 @@
/**
* Generates a root alias by truncating the "root name" defined by
- * the incoming decription and removing/modifying any non-valid
+ * the incoming description and removing/modifying any non-valid
* alias characters.
*
* @param description The root name from which to generate a root alias.
@@ -427,5 +418,4 @@
return name;
}
}
-
-}
+}
\ No newline at end of file
Show replies by date