Index: src/doc/contributors.xml
===================================================================
RCS file: /scm/castor/castor/src/doc/contributors.xml,v
retrieving revision 1.66
diff -u -r1.66 contributors.xml
--- src/doc/contributors.xml 1 Apr 2006 15:49:14 -0000 1.66
+++ src/doc/contributors.xml 13 Apr 2006 12:33:03 -0000
@@ -953,6 +953,12 @@
+
+ voorth@xs4all.nl
+ Fixed lots of compiler warnings
+
+
+
stephane@mminternet.com
Patch for High/Low key generator problem in multi DB environement
Index: src/doc/release-notes.xml
===================================================================
RCS file: /scm/castor/castor/src/doc/release-notes.xml,v
retrieving revision 1.233
diff -u -r1.233 release-notes.xml
--- src/doc/release-notes.xml 12 Apr 2006 21:13:06 -0000 1.233
+++ src/doc/release-notes.xml 13 Apr 2006 12:33:24 -0000
@@ -42,6 +42,26 @@
+
+
+ Fixed compiler warnings: 103 unnecessary casts.
+
+
+ Henk van Voorthujsen
+ voorth@xs4all.nl
+
+
+ Ralf Joachim
+ ralf.joachim@syscon-world.de
+
+
+ Henk van Voorthujsen
+ voorth@xs4all.nl
+
+ Enh.
+ All
+ 20060413
+
Upgrad checkstyle configuration from version 3.5 to 4.1.0beta3.
Index: src/etc/CHANGELOG
===================================================================
RCS file: /scm/castor/castor/src/etc/CHANGELOG,v
retrieving revision 1.384
diff -u -r1.384 CHANGELOG
--- src/etc/CHANGELOG 12 Apr 2006 21:13:06 -0000 1.384
+++ src/etc/CHANGELOG 13 Apr 2006 12:33:49 -0000
@@ -2,6 +2,11 @@
Version (CVS)
-------------
+All: Fixed bug CASTOR-1393 using contribution from Henk van Voorthujsen [voorth@xs4all.nl]
+ Fixed compiler warnings: 103 unnecessary casts.
+ Details: http://jira.codehaus.org/browse/CASTOR-1393
+ (Ralf - 20060413)
+
All: Fixed bug CASTOR-1391 using contribution from Ralf Joachim [ralf.joachim@syscon-world.de]
Upgrad checkstyle configuration from version 3.5 to 4.1.0beta3.
Details: http://jira.codehaus.org/browse/CASTOR-1391
Index: src/examples/jdo/Test.java
===================================================================
RCS file: /scm/castor/castor/src/examples/jdo/Test.java,v
retrieving revision 1.12
diff -u -r1.12 Test.java
--- src/examples/jdo/Test.java 8 Apr 2006 11:10:21 -0000 1.12
+++ src/examples/jdo/Test.java 13 Apr 2006 12:33:51 -0000
@@ -393,7 +393,7 @@
if ( results.hasMore() )
{
- LOG.info( "Loaded computer:" + ( Computer ) results.next() );
+ LOG.info( "Loaded computer:" + results.next() );
}
LOG.info( "End transaction: simple load to test the previous change" );
Index: src/main/org/castor/cache/AbstractBaseCache.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/castor/cache/AbstractBaseCache.java,v
retrieving revision 1.4
diff -u -r1.4 AbstractBaseCache.java
--- src/main/org/castor/cache/AbstractBaseCache.java 12 Apr 2006 21:13:07 -0000 1.4
+++ src/main/org/castor/cache/AbstractBaseCache.java 13 Apr 2006 12:33:52 -0000
@@ -43,7 +43,7 @@
*/
public void initialize(final Properties params) throws CacheAcquireException {
String param = params.getProperty(Cache.PARAM_NAME, Cache.DEFAULT_NAME);
- _cacheName = (String) param;
+ _cacheName = param;
}
/**
Index: src/main/org/castor/cache/hashbelt/AbstractHashbelt.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/castor/cache/hashbelt/AbstractHashbelt.java,v
retrieving revision 1.3
diff -u -r1.3 AbstractHashbelt.java
--- src/main/org/castor/cache/hashbelt/AbstractHashbelt.java 12 Apr 2006 21:13:05 -0000 1.3
+++ src/main/org/castor/cache/hashbelt/AbstractHashbelt.java 13 Apr 2006 12:33:54 -0000
@@ -229,7 +229,7 @@
Class cls = DEFAULT_CONTAINER_CLASS;
param = params.getProperty(PARAM_CONTAINER_CLASS);
if ((param != null) && !"".equals(param)) {
- cls = Class.forName((String) param);
+ cls = Class.forName(param);
}
_poolCount = 2 * _containerTarget;
@@ -246,7 +246,7 @@
Class cls = DEFAULT_REAPER_CLASS;
param = params.getProperty(PARAM_REAPER_CLASS);
if ((param != null) && !"".equals(param)) {
- cls = Class.forName((String) param);
+ cls = Class.forName(param);
}
_reaper = (AbstractReaper) cls.newInstance();
Index: src/main/org/castor/persist/AbstractTransactionContext.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/castor/persist/AbstractTransactionContext.java,v
retrieving revision 1.6
diff -u -r1.6 AbstractTransactionContext.java
--- src/main/org/castor/persist/AbstractTransactionContext.java 11 Apr 2006 21:26:05 -0000 1.6
+++ src/main/org/castor/persist/AbstractTransactionContext.java 13 Apr 2006 12:34:02 -0000
@@ -311,7 +311,7 @@
*/
public final DbMetaInfo getConnectionInfo(final LockEngine engine)
throws PersistenceException {
- Connection conn = (Connection) getConnection(engine);
+ Connection conn = getConnection(engine);
if (_dbInfo == null) {
_dbInfo = new DbMetaInfo(conn);
}
Index: src/main/org/exolab/castor/builder/util/ConsoleDialog.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/builder/util/ConsoleDialog.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ConsoleDialog.java
--- src/main/org/exolab/castor/builder/util/ConsoleDialog.java 3 Mar 2003 07:08:01 -0000 1.1.1.1
+++ src/main/org/exolab/castor/builder/util/ConsoleDialog.java 13 Apr 2006 12:34:04 -0000
@@ -162,7 +162,7 @@
//-- check ch
if (values.indexOf(ch) != -1)
return (char)ch;
- if (ch == (int)'?')
+ if (ch == '?')
System.out.println(help);
else {
System.out.print("invalid input, expecting ");
Index: src/main/org/exolab/castor/dsml/jndi/JNDIImporter.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/dsml/jndi/JNDIImporter.java,v
retrieving revision 1.3
diff -u -r1.3 JNDIImporter.java
--- src/main/org/exolab/castor/dsml/jndi/JNDIImporter.java 13 Dec 2004 21:00:19 -0000 1.3
+++ src/main/org/exolab/castor/dsml/jndi/JNDIImporter.java 13 Apr 2006 12:34:04 -0000
@@ -118,7 +118,7 @@
} else {
try {
- existing = (Attributes) _ctx.getAttributes( result.getName() );
+ existing = _ctx.getAttributes( result.getName() );
modifs = new Vector();
attrSet = result.getAttributes();
Index: src/main/org/exolab/castor/jdo/drivers/SapDbFactory.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/drivers/SapDbFactory.java,v
retrieving revision 1.7
diff -u -r1.7 SapDbFactory.java
--- src/main/org/exolab/castor/jdo/drivers/SapDbFactory.java 18 Aug 2004 11:45:18 -0000 1.7
+++ src/main/org/exolab/castor/jdo/drivers/SapDbFactory.java 13 Apr 2006 12:34:06 -0000
@@ -136,7 +136,7 @@
for ( int i = 0; i < knownFunctions.length; ++i )
{
- String function = ( String ) knownFunctions[i];
+ String function = knownFunctions[i];
if ( text.equals( function ) )
{
Index: src/main/org/exolab/castor/jdo/engine/JDOMappingLoader.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/engine/JDOMappingLoader.java,v
retrieving revision 1.15
diff -u -r1.15 JDOMappingLoader.java
--- src/main/org/exolab/castor/jdo/engine/JDOMappingLoader.java 10 Apr 2006 22:39:19 -0000 1.15
+++ src/main/org/exolab/castor/jdo/engine/JDOMappingLoader.java 13 Apr 2006 12:34:08 -0000
@@ -482,7 +482,7 @@
// if SQL mapping declares transient
if ( fieldMap.getSql().getTransient()) {
- ((FieldDescriptorImpl) fieldDesc).setTransient (true);
+ fieldDesc.setTransient (true);
}
sqlName = fieldMap.getSql().getName();
@@ -505,7 +505,7 @@
sType = new int[] {SQLTypeInfos.javaType2sqlTypeNum(sqlType)};
}
- return new JDOFieldDescriptor( (FieldDescriptorImpl) fieldDesc, sqlName, sType,
+ return new JDOFieldDescriptor( fieldDesc, sqlName, sType,
!SqlDirtyType.IGNORE.equals( fieldMap.getSql().getDirty() ),
fieldMap.getSql().getManyTable(),
fieldMap.getSql().getManyKey(),
Index: src/main/org/exolab/castor/jdo/engine/OQLQueryImpl.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/engine/OQLQueryImpl.java,v
retrieving revision 1.21
diff -u -r1.21 OQLQueryImpl.java
--- src/main/org/exolab/castor/jdo/engine/OQLQueryImpl.java 10 Apr 2006 22:39:19 -0000 1.21
+++ src/main/org/exolab/castor/jdo/engine/OQLQueryImpl.java 13 Apr 2006 12:34:11 -0000
@@ -505,7 +505,7 @@
case ParseTreeWalker.FUNCTION:
try {
- java.sql.Connection conn = (java.sql.Connection)((AbstractDatabaseImpl) _database).getTransaction().getConnection(_dbEngine);
+ java.sql.Connection conn = ((AbstractDatabaseImpl) _database).getTransaction().getConnection(_dbEngine);
SimpleQueryExecutor sqe = new SimpleQueryExecutor( _database );
_results = sqe.execute(conn, _expr, _bindValues);
} catch ( QueryException except ) {
Index: src/main/org/exolab/castor/jdo/engine/SQLHelper.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/engine/SQLHelper.java,v
retrieving revision 1.1
diff -u -r1.1 SQLHelper.java
--- src/main/org/exolab/castor/jdo/engine/SQLHelper.java 21 Jan 2006 11:05:16 -0000 1.1
+++ src/main/org/exolab/castor/jdo/engine/SQLHelper.java 13 Apr 2006 12:34:12 -0000
@@ -101,7 +101,7 @@
// suggestedNumberOfFields += potentialClassDescriptor.getFields().length;
} else {
FieldDescriptor[] potentialFields =
- (FieldDescriptor[]) potentialClassDescriptor.getFields();
+ potentialClassDescriptor.getFields();
for (int i = 0; i < potentialFields.length; i++) {
JDOFieldDescriptor jdoFieldDescriptor = (JDOFieldDescriptor) potentialFields[i];
String[] columnNames = jdoFieldDescriptor.getSQLName();
Index: src/main/org/exolab/castor/jdo/keygen/SequenceKeyGenerator.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/jdo/keygen/SequenceKeyGenerator.java,v
retrieving revision 1.4
diff -u -r1.4 SequenceKeyGenerator.java
--- src/main/org/exolab/castor/jdo/keygen/SequenceKeyGenerator.java 10 Apr 2006 22:39:20 -0000 1.4
+++ src/main/org/exolab/castor/jdo/keygen/SequenceKeyGenerator.java 13 Apr 2006 12:34:13 -0000
@@ -196,7 +196,7 @@
String seqName;
String table;
- seqName = MessageFormat.format( _seqName, (Object[]) (new String[] {tableName,primKeyName}));// due to varargs in 1.5, see CASTOR-1097
+ seqName = MessageFormat.format( _seqName, new String[] {tableName,primKeyName});// due to varargs in 1.5, see CASTOR-1097
table = _factory.quoteName(tableName);
try {
if (_factory.getFactoryName().equals(InterbaseFactory.FACTORY_NAME)) {
@@ -320,7 +320,7 @@
tableName = buffer2.toString();
}
- seqName = MessageFormat.format( _seqName, (Object[]) (new String[] {tableName,primKeyName})); // due to varargs in 1.5, see CASTOR-1097
+ seqName = MessageFormat.format( _seqName, new String[] {tableName,primKeyName}); // due to varargs in 1.5, see CASTOR-1097
nextval = _factory.quoteName(seqName + ".nextval");
lp1 = insert.indexOf( '(' );
lp2 = insert.indexOf( '(', lp1 + 1 );
Index: src/main/org/exolab/castor/mapping/AccessMode.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/mapping/AccessMode.java,v
retrieving revision 1.3
diff -u -r1.3 AccessMode.java
--- src/main/org/exolab/castor/mapping/AccessMode.java 13 Dec 2005 21:58:34 -0000 1.3
+++ src/main/org/exolab/castor/mapping/AccessMode.java 13 Apr 2006 12:34:14 -0000
@@ -199,7 +199,7 @@
* @return Hash code of this object.
*/
public int hashCode() {
- return (int) _id;
+ return _id;
}
/**
Index: src/main/org/exolab/castor/mapping/handlers/EnumFieldHandler.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/mapping/handlers/EnumFieldHandler.java,v
retrieving revision 1.3
diff -u -r1.3 EnumFieldHandler.java
--- src/main/org/exolab/castor/mapping/handlers/EnumFieldHandler.java 2 May 2005 20:58:58 -0000 1.3
+++ src/main/org/exolab/castor/mapping/handlers/EnumFieldHandler.java 13 Apr 2006 12:34:15 -0000
@@ -146,7 +146,7 @@
if (value != null) {
args[0] = value.toString();
try {
- obj = _createMethod.invoke(null, (Object[]) args);
+ obj = _createMethod.invoke(null, args);
}
catch(java.lang.reflect.InvocationTargetException ite) {
Throwable toss = ite.getTargetException();
Index: src/main/org/exolab/castor/mapping/loader/Types.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/mapping/loader/Types.java,v
retrieving revision 1.12
diff -u -r1.12 Types.java
--- src/main/org/exolab/castor/mapping/loader/Types.java 10 Apr 2006 22:39:23 -0000 1.12
+++ src/main/org/exolab/castor/mapping/loader/Types.java 13 Apr 2006 12:34:18 -0000
@@ -494,15 +494,15 @@
new TypeInfo( "int", java.lang.Integer.TYPE,
java.lang.Integer.TYPE, true, new Integer( 0 ) ),
new TypeInfo( "long", java.lang.Long.TYPE,
- java.lang.Long.class, true, new Long( (long) 0 ) ),
+ java.lang.Long.class, true, new Long( 0L ) ),
new TypeInfo( "big-integer", null,
java.math.BigInteger.class, true, BigInteger.valueOf( 0 ) ),
new TypeInfo( "boolean", java.lang.Boolean.TYPE,
java.lang.Boolean.class, true, Boolean.FALSE ),
new TypeInfo( "double", java.lang.Double.TYPE,
- java.lang.Double.class, true, new Double( (double) 0 ) ),
+ java.lang.Double.class, true, new Double( 0 ) ),
new TypeInfo( "float", java.lang.Float.TYPE,
- java.lang.Float.class, true, new Float( (float) 0 ) ),
+ java.lang.Float.class, true, new Float( 0 ) ),
new TypeInfo( "big-decimal", null,
java.math.BigDecimal.class, true, new BigDecimal( (double) 0 ) ),
new TypeInfo( "byte", java.lang.Byte.TYPE,
Index: src/main/org/exolab/castor/persist/ClassMolder.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/persist/ClassMolder.java,v
retrieving revision 1.34
diff -u -r1.34 ClassMolder.java
--- src/main/org/exolab/castor/persist/ClassMolder.java 11 Apr 2006 21:26:05 -0000 1.34
+++ src/main/org/exolab/castor/persist/ClassMolder.java 13 Apr 2006 12:34:24 -0000
@@ -544,7 +544,7 @@
stamp = results.getQuery().fetch(proposedObject,
oid.getIdentity());
} else {
- conn = (Connection) tx.getConnection(oid.getLockEngine());
+ conn = tx.getConnection(oid.getLockEngine());
stamp = _persistence.load(conn, proposedObject, oid
.getIdentity(), accessMode);
}
Index: src/main/org/exolab/castor/types/Century.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/Century.java,v
retrieving revision 1.3
diff -u -r1.3 Century.java
--- src/main/org/exolab/castor/types/Century.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/Century.java 13 Apr 2006 12:34:25 -0000
@@ -236,7 +236,7 @@
// Set the time zone
if ( !isUTC() ) {
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/Date.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/Date.java,v
retrieving revision 1.4
diff -u -r1.4 Date.java
--- src/main/org/exolab/castor/types/Date.java 13 Dec 2005 21:58:32 -0000 1.4
+++ src/main/org/exolab/castor/types/Date.java 13 Apr 2006 12:34:27 -0000
@@ -206,7 +206,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/DateDescriptor.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/DateDescriptor.java,v
retrieving revision 1.4
diff -u -r1.4 DateDescriptor.java
--- src/main/org/exolab/castor/types/DateDescriptor.java 5 Mar 2005 13:41:56 -0000 1.4
+++ src/main/org/exolab/castor/types/DateDescriptor.java 13 Apr 2006 12:34:28 -0000
@@ -182,7 +182,7 @@
//-- update current instance of time with new time
try {
- Date temp = (Date) Date.parseDate(value.toString()) ;
+ Date temp = Date.parseDate(value.toString()) ;
dateTarget.setCentury(temp.getCentury());
dateTarget.setYear(temp.getYear());
dateTarget.setMonth(temp.getMonth());
Index: src/main/org/exolab/castor/types/DateTimeBase.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/DateTimeBase.java,v
retrieving revision 1.2
diff -u -r1.2 DateTimeBase.java
--- src/main/org/exolab/castor/types/DateTimeBase.java 5 Mar 2005 13:41:56 -0000 1.2
+++ src/main/org/exolab/castor/types/DateTimeBase.java 13 Apr 2006 12:34:32 -0000
@@ -585,7 +585,7 @@
temp = _century * 100 + _year + sign*duration.getYear() + carry;
short century = (short) (temp/100);
temp = temp % 100;
- this.setCentury((short)century);
+ this.setCentury(century);
this.setYear((short)temp);
} catch (OperationNotSupportedException e) {
//if there is no Year field in the date/time datatypes
@@ -653,7 +653,7 @@
temp = this.getCentury() * 100 + this.getYear() + temp;
short century = (short) (temp/100);
temp = temp % 100;
- this.setCentury((short)century);
+ this.setCentury(century);
this.setYear((short)temp);
} catch (OperationNotSupportedException e) {
//--if there is no Year field in the date/time datatypes
Index: src/main/org/exolab/castor/types/Duration.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/Duration.java,v
retrieving revision 1.4
diff -u -r1.4 Duration.java
--- src/main/org/exolab/castor/types/Duration.java 13 Dec 2005 21:58:32 -0000 1.4
+++ src/main/org/exolab/castor/types/Duration.java 13 Apr 2006 12:34:34 -0000
@@ -607,7 +607,7 @@
number = number * 10;
number = number * 10;
}
- result.setMilli((long)number);
+ result.setMilli(number);
hasNumber = false;
}
else {
Index: src/main/org/exolab/castor/types/GDay.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/GDay.java,v
retrieving revision 1.3
diff -u -r1.3 GDay.java
--- src/main/org/exolab/castor/types/GDay.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/GDay.java 13 Apr 2006 12:34:35 -0000
@@ -122,7 +122,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/GMonth.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/GMonth.java,v
retrieving revision 1.3
diff -u -r1.3 GMonth.java
--- src/main/org/exolab/castor/types/GMonth.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/GMonth.java 13 Apr 2006 12:34:37 -0000
@@ -123,7 +123,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/GMonthDay.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/GMonthDay.java,v
retrieving revision 1.3
diff -u -r1.3 GMonthDay.java
--- src/main/org/exolab/castor/types/GMonthDay.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/GMonthDay.java 13 Apr 2006 12:34:38 -0000
@@ -170,7 +170,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/GYear.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/GYear.java,v
retrieving revision 1.3
diff -u -r1.3 GYear.java
--- src/main/org/exolab/castor/types/GYear.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/GYear.java 13 Apr 2006 12:34:40 -0000
@@ -96,7 +96,7 @@
public GYear(int year) {
short century = (short) (year/100);
year = year % 100;
- setCentury((short)century);
+ setCentury(century);
setYear((short)year);
}
@@ -172,7 +172,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/GYearMonth.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/GYearMonth.java,v
retrieving revision 1.3
diff -u -r1.3 GYearMonth.java
--- src/main/org/exolab/castor/types/GYearMonth.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/GYearMonth.java 13 Apr 2006 12:34:41 -0000
@@ -103,7 +103,7 @@
public GYearMonth(int year, int month) {
short century = (short) (year/100);
year = year % 100;
- setCentury((short)century);
+ setCentury(century);
setYear((short)year);
setMonth((short)month);
}
@@ -181,7 +181,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/Month.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/Month.java,v
retrieving revision 1.3
diff -u -r1.3 Month.java
--- src/main/org/exolab/castor/types/Month.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/Month.java 13 Apr 2006 12:34:42 -0000
@@ -239,7 +239,7 @@
// Set the time zone
if ( !isUTC() ) {
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/RecurringDuration.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/RecurringDuration.java,v
retrieving revision 1.3
diff -u -r1.3 RecurringDuration.java
--- src/main/org/exolab/castor/types/RecurringDuration.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/RecurringDuration.java 13 Apr 2006 12:34:45 -0000
@@ -360,7 +360,7 @@
// Set the time zone
if ( !isUTC() ) {
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/Time.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/Time.java,v
retrieving revision 1.3
diff -u -r1.3 Time.java
--- src/main/org/exolab/castor/types/Time.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/Time.java 13 Apr 2006 12:34:47 -0000
@@ -196,7 +196,7 @@
if ( isUTC() ) {
SimpleTimeZone timeZone = new SimpleTimeZone(0,"UTC");
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/types/Year.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/types/Year.java,v
retrieving revision 1.3
diff -u -r1.3 Year.java
--- src/main/org/exolab/castor/types/Year.java 13 Dec 2005 21:58:32 -0000 1.3
+++ src/main/org/exolab/castor/types/Year.java 13 Apr 2006 12:34:48 -0000
@@ -228,7 +228,7 @@
// Set the time zone
if ( !isUTC() ) {
int offset = 0;
- offset = (int) ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
+ offset = ( (this.getZoneMinute() + this.getZoneHour()*60)*60*1000);
offset = isZoneNegative() ? -offset : offset;
timeZone.setRawOffset(offset);
timeZone.setID(TimeZone.getAvailableIDs(offset)[0]);
Index: src/main/org/exolab/castor/xml/Marshaller.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/Marshaller.java,v
retrieving revision 1.33
diff -u -r1.33 Marshaller.java
--- src/main/org/exolab/castor/xml/Marshaller.java 10 Apr 2006 22:39:20 -0000 1.33
+++ src/main/org/exolab/castor/xml/Marshaller.java 13 Apr 2006 12:34:58 -0000
@@ -1237,7 +1237,7 @@
nsURI = _namespaces.getNamespaceURI(nsPrefix);
}
else if ((nsPrefix == null) && (nsURI != null)) {
- nsPrefix = (String) _namespaces.getNamespacePrefix(nsURI);
+ nsPrefix = _namespaces.getNamespacePrefix(nsURI);
}
//-- declare namespace at this element scope?
if (nsURI != null) {
Index: src/main/org/exolab/castor/xml/UnmarshalHandler.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/UnmarshalHandler.java,v
retrieving revision 1.54
diff -u -r1.54 UnmarshalHandler.java
--- src/main/org/exolab/castor/xml/UnmarshalHandler.java 30 Mar 2006 22:28:10 -0000 1.54
+++ src/main/org/exolab/castor/xml/UnmarshalHandler.java 13 Apr 2006 12:35:13 -0000
@@ -3651,7 +3651,7 @@
// float
else if ((type == Float.TYPE) || (type == Float.class)) {
if (isNull)
- primitive = new Float((float)0);
+ primitive = new Float(0);
else
primitive = new Float(value);
}
Index: src/main/org/exolab/castor/xml/descriptors/SQLTimeClassDescriptor.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/descriptors/SQLTimeClassDescriptor.java,v
retrieving revision 1.2
diff -u -r1.2 SQLTimeClassDescriptor.java
--- src/main/org/exolab/castor/xml/descriptors/SQLTimeClassDescriptor.java 17 Dec 2004 05:44:50 -0000 1.2
+++ src/main/org/exolab/castor/xml/descriptors/SQLTimeClassDescriptor.java 13 Apr 2006 12:35:14 -0000
@@ -125,7 +125,7 @@
}
public Object newInstance( Object parent ) {
- return new java.sql.Time((long)0);
+ return new java.sql.Time(0);
}
};
sqlTimeHandler.setFieldHandler(handler);
Index: src/main/org/exolab/castor/xml/descriptors/SQLTimestampClassDescriptor.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/descriptors/SQLTimestampClassDescriptor.java,v
retrieving revision 1.2
diff -u -r1.2 SQLTimestampClassDescriptor.java
--- src/main/org/exolab/castor/xml/descriptors/SQLTimestampClassDescriptor.java 17 Dec 2004 05:44:50 -0000 1.2
+++ src/main/org/exolab/castor/xml/descriptors/SQLTimestampClassDescriptor.java 13 Apr 2006 12:35:15 -0000
@@ -130,7 +130,7 @@
}
public Object newInstance( Object parent ) {
- return new java.sql.Timestamp((long)0);
+ return new java.sql.Timestamp(0);
}
}
);
Index: src/main/org/exolab/castor/xml/handlers/EnumFieldHandler.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/handlers/EnumFieldHandler.java,v
retrieving revision 1.5
diff -u -r1.5 EnumFieldHandler.java
--- src/main/org/exolab/castor/xml/handlers/EnumFieldHandler.java 13 Dec 2005 21:58:33 -0000 1.5
+++ src/main/org/exolab/castor/xml/handlers/EnumFieldHandler.java 13 Apr 2006 12:35:17 -0000
@@ -163,7 +163,7 @@
if (value != null) {
args[0] = value.toString();
try {
- obj = valueOf.invoke(null, (Object[]) args);
+ obj = valueOf.invoke(null, args);
}
catch(java.lang.reflect.InvocationTargetException ite) {
Throwable toss = ite.getTargetException();
Index: src/main/org/exolab/castor/xml/handlers/SQLTimeFieldHandler.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/handlers/SQLTimeFieldHandler.java,v
retrieving revision 1.1
diff -u -r1.1 SQLTimeFieldHandler.java
--- src/main/org/exolab/castor/xml/handlers/SQLTimeFieldHandler.java 9 Apr 2004 04:44:19 -0000 1.1
+++ src/main/org/exolab/castor/xml/handlers/SQLTimeFieldHandler.java 13 Apr 2006 12:35:17 -0000
@@ -148,7 +148,7 @@
public Object newInstance( Object parent )
throws IllegalStateException
{
- return new java.sql.Time((long)0);
+ return new java.sql.Time(0);
}
Index: src/main/org/exolab/castor/xml/handlers/SQLTimestampFieldHandler.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/handlers/SQLTimestampFieldHandler.java,v
retrieving revision 1.1
diff -u -r1.1 SQLTimestampFieldHandler.java
--- src/main/org/exolab/castor/xml/handlers/SQLTimestampFieldHandler.java 9 Apr 2004 04:44:10 -0000 1.1
+++ src/main/org/exolab/castor/xml/handlers/SQLTimestampFieldHandler.java 13 Apr 2006 12:35:18 -0000
@@ -150,7 +150,7 @@
public Object newInstance( Object parent )
throws IllegalStateException
{
- return new java.sql.Timestamp((long)0);
+ return new java.sql.Timestamp(0);
}
Index: src/main/org/exolab/castor/xml/schema/FacetListEnumerator.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/FacetListEnumerator.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 FacetListEnumerator.java
--- src/main/org/exolab/castor/xml/schema/FacetListEnumerator.java 3 Mar 2003 07:09:31 -0000 1.1.1.1
+++ src/main/org/exolab/castor/xml/schema/FacetListEnumerator.java 13 Apr 2006 12:35:18 -0000
@@ -105,7 +105,7 @@
if (mask == null) return (currentIdx < facets.size());
else {
for (; currentIdx < facets.size(); currentIdx++) {
- Facet facet = (Facet)facets.get(currentIdx);
+ Facet facet = facets.get(currentIdx);
if (mask.equals(facet.getName())) return true;
}
}
@@ -125,7 +125,7 @@
}
else {
for (; currentIdx < facets.size(); currentIdx++) {
- Facet facet = (Facet)facets.get(currentIdx);
+ Facet facet = facets.get(currentIdx);
if (mask.equals(facet.getName())) {
++currentIdx;
return facet;
Index: src/main/org/exolab/castor/xml/schema/RedefineSchema.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/RedefineSchema.java,v
retrieving revision 1.2
diff -u -r1.2 RedefineSchema.java
--- src/main/org/exolab/castor/xml/schema/RedefineSchema.java 13 Dec 2005 21:58:28 -0000 1.2
+++ src/main/org/exolab/castor/xml/schema/RedefineSchema.java 13 Apr 2006 12:35:20 -0000
@@ -397,7 +397,7 @@
{
String nsPrefix = name.substring(0,idx);
name = name.substring(idx + 1);
- String ns = (String) _parentSchema.getNamespace(nsPrefix);
+ String ns = _parentSchema.getNamespace(nsPrefix);
if (ns == null) {
String err = "addAttributeGroup: ";
err += "Namespace prefix not recognized '"+nsPrefix+"'";
Index: src/main/org/exolab/castor/xml/schema/Schema.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/Schema.java,v
retrieving revision 1.11
diff -u -r1.11 Schema.java
--- src/main/org/exolab/castor/xml/schema/Schema.java 13 Dec 2005 21:58:28 -0000 1.11
+++ src/main/org/exolab/castor/xml/schema/Schema.java 13 Apr 2006 12:35:29 -0000
@@ -354,7 +354,7 @@
{
String nsPrefix = name.substring(0,idx);
name = name.substring(idx + 1);
- String ns = (String) _namespaces.getNamespaceURI(nsPrefix);
+ String ns = _namespaces.getNamespaceURI(nsPrefix);
if (ns == null) {
String err = "addAttributeGroup: ";
err += "Namespace prefix not recognized '"+nsPrefix+"'";
@@ -660,7 +660,7 @@
Vector result = new Vector(_attributes.size()*2);
Enumeration tempAtt = _attributes.elements();
while (tempAtt.hasMoreElements()) {
- result.add((AttributeDecl)tempAtt.nextElement());
+ result.add(tempAtt.nextElement());
}
Enumeration cachedincluded = _cachedincludedSchemas.elements();
@@ -668,7 +668,7 @@
Schema tempSchema = (Schema)cachedincluded.nextElement();
tempAtt = tempSchema.getAttributes();
while (tempAtt.hasMoreElements()) {
- result.add((AttributeDecl)tempAtt.nextElement());
+ result.add(tempAtt.nextElement());
}
}
@@ -683,7 +683,7 @@
tempSchema.setMasterSchema(this);
tempAtt = tempSchema.getAttributes();
while (tempAtt.hasMoreElements()) {
- result.add((AttributeDecl)tempAtt.nextElement());
+ result.add(tempAtt.nextElement());
}
}
}
@@ -715,7 +715,7 @@
{
canonicalName = name.substring(colon + 1);
nsprefix = name.substring(0,colon);
- ns = (String) _namespaces.getNamespaceURI(nsprefix);
+ ns = _namespaces.getNamespaceURI(nsprefix);
if (ns == null) {
String err = "getAttribute: ";
err += "Namespace prefix not recognized '"+name+"'";
@@ -776,7 +776,7 @@
Vector result = new Vector(_attributeGroups.size()*2);
Enumeration tempAtt = _attributeGroups.elements();
while (tempAtt.hasMoreElements()) {
- result.add((AttributeGroup)tempAtt.nextElement());
+ result.add(tempAtt.nextElement());
}
Enumeration cachedincluded = _cachedincludedSchemas.elements();
@@ -784,7 +784,7 @@
Schema tempSchema = (Schema)cachedincluded.nextElement();
tempAtt = tempSchema.getAttributeGroups();
while (tempAtt.hasMoreElements()) {
- result.add((AttributeGroup)tempAtt.nextElement());
+ result.add(tempAtt.nextElement());
}
}
@@ -848,7 +848,7 @@
{
canonicalName = name.substring(colon + 1);
nsprefix = name.substring(0,colon);
- ns = (String) _namespaces.getNamespaceURI(nsprefix);
+ ns = _namespaces.getNamespaceURI(nsprefix);
if (ns == null) {
String err = "getAttributeGroup: ";
err += "Namespace prefix not recognized '"+name+"'";
@@ -947,7 +947,7 @@
{
canonicalName = name.substring(colon + 1);
nsprefix = name.substring(0,colon);
- ns = (String) _namespaces.getNamespaceURI(nsprefix);
+ ns = _namespaces.getNamespaceURI(nsprefix);
if (ns == null) {
String err = "getComplexType: ";
err += "Namespace prefix not recognized '"+name+"'";
@@ -1014,7 +1014,7 @@
Vector result = new Vector(_complexTypes.size()*2);
Enumeration tempEnum = _complexTypes.elements();
while (tempEnum.hasMoreElements()) {
- result.add((ComplexType)tempEnum.nextElement());
+ result.add(tempEnum.nextElement());
}
Enumeration cachedincluded = _cachedincludedSchemas.elements();
@@ -1022,7 +1022,7 @@
Schema tempSchema = (Schema)cachedincluded.nextElement();
tempEnum = tempSchema.getComplexTypes();
while (tempEnum.hasMoreElements()) {
- result.add((ComplexType)tempEnum.nextElement());
+ result.add(tempEnum.nextElement());
}
}
@@ -1074,7 +1074,7 @@
{
String nsPrefix = name.substring(0,idx);
name = name.substring(idx + 1);
- ns = (String) _namespaces.getNamespaceURI(nsPrefix);
+ ns = _namespaces.getNamespaceURI(nsPrefix);
if (ns == null) {
String err = "getElementDecl: ";
err += "Namespace prefix not recognized '"+nsPrefix+"'";
@@ -1129,8 +1129,8 @@
public Enumeration getElementDecls() {
Vector result = new Vector(_elements.size()*2);
Enumeration tempEnum = _elements.elements();
- while (tempEnum.hasMoreElements()) {
- result.add((ElementDecl)tempEnum.nextElement());
+ while (tempEnum.hasMoreElements()) {
+ result.add(tempEnum.nextElement());
}
Enumeration cachedincluded = _cachedincludedSchemas.elements();
@@ -1138,7 +1138,7 @@
Schema tempSchema = (Schema)cachedincluded.nextElement();
tempEnum = tempSchema.getElementDecls();
while (tempEnum.hasMoreElements()) {
- result.add((ElementDecl)tempEnum.nextElement());
+ result.add(tempEnum.nextElement());
}
}
@@ -1154,7 +1154,7 @@
tempSchema.setMasterSchema(this);
tempEnum = tempSchema.getElementDecls();
while (tempEnum.hasMoreElements()) {
- result.add((ElementDecl)tempEnum.nextElement());
+ result.add(tempEnum.nextElement());
}
}
}
@@ -1207,7 +1207,7 @@
if (colon >= 0) {
nsPrefix = name.substring(0,colon);
name = name.substring(colon + 1);
- ns = (String) _namespaces.getNamespaceURI(nsPrefix);
+ ns = _namespaces.getNamespaceURI(nsPrefix);
if (ns == null) {
String err = "getSimpleType: ";
err += "Namespace prefix not recognised '"+nsPrefix+"'";
@@ -1216,7 +1216,7 @@
}
}
else {
- ns = (String) _namespaces.getNamespaceURI(nsPrefix);
+ ns = _namespaces.getNamespaceURI(nsPrefix);
}
//--if at this point, there is no namespace
@@ -1250,7 +1250,7 @@
//--Is the declaration in the default namespace (if any)
boolean isDefaultNS = false;
if (namespace == null) {
- namespace = (String)_namespaces.getNamespaceURI("");
+ namespace = _namespaces.getNamespaceURI("");
isDefaultNS = true;
}
@@ -1446,7 +1446,7 @@
{
String nsPrefix = name.substring(0,idx);
name = name.substring(idx + 1);
- ns = (String) _namespaces.getNamespaceURI(nsPrefix);
+ ns = _namespaces.getNamespaceURI(nsPrefix);
if (ns == null) {
String err = "getModelGroup: ";
err += "Namespace prefix not recognized '"+nsPrefix+"'";
@@ -1668,7 +1668,7 @@
*/
public final String getNamespace(String prefix) {
if (prefix == null) prefix = "";
- return (String)_namespaces.getNamespaceURI(prefix);
+ return _namespaces.getNamespaceURI(prefix);
} //-- getNamespace
/**
@@ -2090,7 +2090,7 @@
if (colon >= 0) {
localName = typeName.substring(colon + 1);
prefix = typeName.substring(0,colon);
- ns = (String) _namespaces.getNamespaceURI(prefix);
+ ns = _namespaces.getNamespaceURI(prefix);
if (ns == null) {
String err = "Schema#getType: ";
err += "Namespace prefix not recognised '"+typeName+"'";
@@ -2100,7 +2100,7 @@
//-- use default namespace if necessary
if (ns == null) {
- ns = (String)_namespaces.getNamespaceURI(prefix);
+ ns = _namespaces.getNamespaceURI(prefix);
}
//--if at this point, there is no namespace
Index: src/main/org/exolab/castor/xml/schema/ScopableResolver.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/ScopableResolver.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ScopableResolver.java
--- src/main/org/exolab/castor/xml/schema/ScopableResolver.java 3 Mar 2003 07:09:34 -0000 1.1.1.1
+++ src/main/org/exolab/castor/xml/schema/ScopableResolver.java 13 Apr 2006 12:35:29 -0000
@@ -101,7 +101,7 @@
public Referable resolve(String id) {
Referable referable = (Referable) ids.get(id);
if ((referable == null) && (_resolver != null)) {
- referable = (Referable)_resolver.resolve(id);
+ referable = _resolver.resolve(id);
}
return referable;
} //-- resolve
Index: src/main/org/exolab/castor/xml/schema/SimpleType.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/SimpleType.java,v
retrieving revision 1.3
diff -u -r1.3 SimpleType.java
--- src/main/org/exolab/castor/xml/schema/SimpleType.java 21 Sep 2004 14:04:05 -0000 1.3
+++ src/main/org/exolab/castor/xml/schema/SimpleType.java 13 Apr 2006 12:35:31 -0000
@@ -242,7 +242,7 @@
public boolean hasFacet(String name) {
if (name == null) return false;
for (int i = 0; i < facets.size(); i++) {
- Facet facet = (Facet) facets.get(i);
+ Facet facet = facets.get(i);
if (name.equals(facet.getName())) return true;
}
return false;
@@ -380,7 +380,7 @@
public boolean removeFacet(String name) {
if (name == null) return false;
for (int i = facets.size()-1; i > 0; i--) {
- Facet facet = (Facet) facets.get(i);
+ Facet facet = facets.get(i);
if (name.equals(facet.getName())) {
facets.remove(i);
return true;
Index: src/main/org/exolab/castor/xml/schema/TypeReference.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/TypeReference.java,v
retrieving revision 1.2
diff -u -r1.2 TypeReference.java
--- src/main/org/exolab/castor/xml/schema/TypeReference.java 13 Dec 2005 21:58:28 -0000 1.2
+++ src/main/org/exolab/castor/xml/schema/TypeReference.java 13 Apr 2006 12:35:31 -0000
@@ -99,7 +99,7 @@
canonicalName = name.substring(colon + 1);
nsPrefix = name.substring(0,colon);
}
- String ns = (String) schema.getNamespace(nsPrefix);
+ String ns = schema.getNamespace(nsPrefix);
if (schema.getSchemaNamespace().equals(ns)) {
if (canonicalName.equals(SchemaNames.ANYTYPE)) {
Index: src/main/org/exolab/castor/xml/schema/reader/RedefineUnmarshaller.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/reader/RedefineUnmarshaller.java,v
retrieving revision 1.1
diff -u -r1.1 RedefineUnmarshaller.java
--- src/main/org/exolab/castor/xml/schema/reader/RedefineUnmarshaller.java 21 Sep 2004 14:08:59 -0000 1.1
+++ src/main/org/exolab/castor/xml/schema/reader/RedefineUnmarshaller.java 13 Apr 2006 12:35:34 -0000
@@ -363,7 +363,7 @@
error(err);
}
- String structureName = ((AttributeGroupDecl)group).getName();
+ String structureName = group.getName();
if (structureName == null) {
String err = "When redefining an AttributeGroup, the group must have a name.\n";
error(err);
@@ -463,7 +463,7 @@
}
ModelGroup group = null;
- group = (ModelGroup) (((ModelGroupUnmarshaller)_unmarshaller).getGroup());
+ group = (((ModelGroupUnmarshaller)_unmarshaller).getGroup());
String structureName = group.getName();
if (structureName == null) {
Index: src/main/org/exolab/castor/xml/schema/reader/SchemaUnmarshaller.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/schema/reader/SchemaUnmarshaller.java,v
retrieving revision 1.9
diff -u -r1.9 SchemaUnmarshaller.java
--- src/main/org/exolab/castor/xml/schema/reader/SchemaUnmarshaller.java 13 Dec 2005 21:58:33 -0000 1.9
+++ src/main/org/exolab/castor/xml/schema/reader/SchemaUnmarshaller.java 13 Apr 2006 12:35:36 -0000
@@ -648,7 +648,7 @@
//--
else if (name.equals(SchemaNames.GROUP)) {
ModelGroup group = null;
- group = (ModelGroup) (((ModelGroupUnmarshaller)unmarshaller).getGroup());
+ group = (((ModelGroupUnmarshaller)unmarshaller).getGroup());
_schema.addModelGroup(group);
}
//--
Index: src/main/org/exolab/castor/xml/util/AttributeSetImpl.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/util/AttributeSetImpl.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 AttributeSetImpl.java
--- src/main/org/exolab/castor/xml/util/AttributeSetImpl.java 3 Mar 2003 07:09:47 -0000 1.1.1.1
+++ src/main/org/exolab/castor/xml/util/AttributeSetImpl.java 13 Apr 2006 12:35:38 -0000
@@ -170,7 +170,7 @@
**/
public String getValue(String name) {
if (name == null) return null;
- Attribute attr = (Attribute)getAttribute(name, "");
+ Attribute attr = getAttribute(name, "");
if (attr != null)
return attr.value;
return null;
@@ -185,7 +185,7 @@
**/
public String getValue(String name, String namespace) {
if (name == null) return null;
- Attribute attr = (Attribute)getAttribute(name, namespace);
+ Attribute attr = getAttribute(name, namespace);
if (attr != null)
return attr.value;
return null;
Index: src/main/org/exolab/castor/xml/util/XMLClassDescriptorImpl.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/util/XMLClassDescriptorImpl.java,v
retrieving revision 1.12
diff -u -r1.12 XMLClassDescriptorImpl.java
--- src/main/org/exolab/castor/xml/util/XMLClassDescriptorImpl.java 23 Feb 2006 08:37:48 -0000 1.12
+++ src/main/org/exolab/castor/xml/util/XMLClassDescriptorImpl.java 13 Apr 2006 12:35:42 -0000
@@ -965,7 +965,7 @@
if (contentDescriptor != null) {
fields[size-1] = contentDescriptor;
}
- return (FieldDescriptor[])fields;
+ return fields;
} //-- getFields
Index: src/main/org/exolab/castor/xml/util/XMLFieldDescriptorImpl.java
===================================================================
RCS file: /scm/castor/castor/src/main/org/exolab/castor/xml/util/XMLFieldDescriptorImpl.java,v
retrieving revision 1.13
diff -u -r1.13 XMLFieldDescriptorImpl.java
--- src/main/org/exolab/castor/xml/util/XMLFieldDescriptorImpl.java 6 Dec 2005 21:55:28 -0000 1.13
+++ src/main/org/exolab/castor/xml/util/XMLFieldDescriptorImpl.java 13 Apr 2006 12:35:46 -0000
@@ -1153,7 +1153,7 @@
this._validator = validator;
if (_validator != null) {
- _validator.setDescriptor((XMLFieldDescriptor)this);
+ _validator.setDescriptor(this);
}
} //-- setValidator
Index: src/tests/ctf/jdo/tc1x/TestTypeConversion.java
===================================================================
RCS file: /scm/castor/castor/src/tests/ctf/jdo/tc1x/TestTypeConversion.java,v
retrieving revision 1.2
diff -u -r1.2 TestTypeConversion.java
--- src/tests/ctf/jdo/tc1x/TestTypeConversion.java 29 Mar 2006 21:49:04 -0000 1.2
+++ src/tests/ctf/jdo/tc1x/TestTypeConversion.java 13 Apr 2006 12:35:48 -0000
@@ -124,7 +124,7 @@
types.setByteInt((byte) 0);
types.setShortInt((short) 0);
- types.setLongInt((long) 0);
+ types.setLongInt(0);
types.setDoubleInt(0.0);
types.setFloatInt(0.0f);
@@ -137,7 +137,7 @@
types.setByteString((byte) 0);
types.setShortString((short) 0);
types.setIntString(0);
- types.setLongString((long) 0);
+ types.setLongString(0);
types.setBigdecString(new BigDecimal(0));
types.setFloatString(0.0f);
types.setDoubleString(0.0d);
@@ -179,7 +179,7 @@
types.setByteInt((byte) 123);
types.setShortInt((short) 123);
- types.setLongInt((long) 123);
+ types.setLongInt(123);
types.setDoubleInt(123.0);
types.setFloatInt(123.0f);
@@ -192,7 +192,7 @@
types.setByteString((byte) 123);
types.setShortString((short) 123);
types.setIntString(123);
- types.setLongString((long) 123);
+ types.setLongString(123);
types.setBigdecString(new BigDecimal(123));
types.setFloatString(123.45f);
types.setDoubleString(123.45);
@@ -211,7 +211,7 @@
&& types.getBoolBigdecMinus()
&& (types.getByteInt() != (byte) 123)
&& (types.getShortInt() != (short) 123)
- && (types.getLongInt() != (long) 123)
+ && (types.getLongInt() != 123)
&& (types.getDoubleInt() != 123.0d)
&& (types.getFloatInt() != 123.0)
&& (types.getByteBigdec() != (byte) 123)
@@ -222,7 +222,7 @@
&& (types.getByteString() != (byte) 123)
&& (types.getShortString() != (short) 123)
&& (types.getIntString() != 123)
- && (types.getLongString() != (long) 123)
+ && (types.getLongString() != 123)
&& (types.getBigdecString() != new BigDecimal(123))
&& (types.getFloatString() != 123.0)
&& (types.getDoubleString() != 123.0d)) {
Index: src/tests/harness/CastorTestCase.java
===================================================================
RCS file: /scm/castor/castor/src/tests/harness/CastorTestCase.java,v
retrieving revision 1.7
diff -u -r1.7 CastorTestCase.java
--- src/tests/harness/CastorTestCase.java 14 Mar 2006 13:22:04 -0000 1.7
+++ src/tests/harness/CastorTestCase.java 13 Apr 2006 12:35:50 -0000
@@ -84,7 +84,7 @@
private void clearCache() {
try {
if (suite instanceof JDOCategory) {
- Database db = (Database) ((JDOCategory) suite).getDatabase();
+ Database db = ((JDOCategory) suite).getDatabase();
db.getCacheManager().expireCache();
}
} catch (Exception e) {
Index: src/tests/harness/CategoryDescriptor.java
===================================================================
RCS file: /scm/castor/castor/src/tests/harness/CategoryDescriptor.java,v
retrieving revision 1.4
diff -u -r1.4 CategoryDescriptor.java
--- src/tests/harness/CategoryDescriptor.java 16 Oct 2005 13:17:07 -0000 1.4
+++ src/tests/harness/CategoryDescriptor.java 13 Apr 2006 12:35:51 -0000
@@ -190,7 +190,7 @@
{
try {
Category target = (Category) object;
- target.setObject( (Object) value);
+ target.setObject( value);
}
catch (Exception ex) {
throw new IllegalStateException(ex.toString());
Index: src/tests/harness/TestHarness.java
===================================================================
RCS file: /scm/castor/castor/src/tests/harness/TestHarness.java,v
retrieving revision 1.3
diff -u -r1.3 TestHarness.java
--- src/tests/harness/TestHarness.java 1 Oct 2004 13:25:43 -0000 1.3
+++ src/tests/harness/TestHarness.java 13 Apr 2006 12:35:52 -0000
@@ -170,7 +170,7 @@
Enumeration enumeration = tests();
while ( enumeration.hasMoreElements() ) {
- sb.append((TestHarness)enumeration.nextElement()).toString();
+ sb.append(enumeration.nextElement()).toString();
}
return sb.toString();
}
Index: src/tests/main/org/exolab/castor/tests/framework/RandomHelper.java
===================================================================
RCS file: /scm/castor/castor/src/tests/main/org/exolab/castor/tests/framework/RandomHelper.java,v
retrieving revision 1.2
diff -u -r1.2 RandomHelper.java
--- src/tests/main/org/exolab/castor/tests/framework/RandomHelper.java 5 Mar 2005 13:42:03 -0000 1.2
+++ src/tests/main/org/exolab/castor/tests/framework/RandomHelper.java 13 Apr 2006 12:35:54 -0000
@@ -225,7 +225,7 @@
* @returns a random Castor timeDuration
*/
public static TimeDuration getRandom(TimeDuration date, Class c) {
- long randLong = (long)_rand.nextInt();
+ long randLong = _rand.nextInt();
randLong = (randLong > 0)?randLong : -randLong;
return new TimeDuration(randLong);
}
Index: src/tests/main/org/exolab/castor/tests/framework/SchemaTestCase.java
===================================================================
RCS file: /scm/castor/castor/src/tests/main/org/exolab/castor/tests/framework/SchemaTestCase.java,v
retrieving revision 1.3
diff -u -r1.3 SchemaTestCase.java
--- src/tests/main/org/exolab/castor/tests/framework/SchemaTestCase.java 21 Feb 2005 03:45:09 -0000 1.3
+++ src/tests/main/org/exolab/castor/tests/framework/SchemaTestCase.java 13 Apr 2006 12:35:55 -0000
@@ -168,7 +168,7 @@
Schema schema = null;
try {
verbose("--> Reading XML Schema: " + url);
- SchemaReader reader = new SchemaReader((String)url);
+ SchemaReader reader = new SchemaReader(url);
schema = reader.read();
} catch (java.io.IOException iox) {
//Handling the failure feature
Index: src/tests/main/org/exolab/castor/tests/framework/XMLTestCase.java
===================================================================
RCS file: /scm/castor/castor/src/tests/main/org/exolab/castor/tests/framework/XMLTestCase.java,v
retrieving revision 1.10
diff -u -r1.10 XMLTestCase.java
--- src/tests/main/org/exolab/castor/tests/framework/XMLTestCase.java 31 Dec 2005 14:56:41 -0000 1.10
+++ src/tests/main/org/exolab/castor/tests/framework/XMLTestCase.java 13 Apr 2006 12:35:59 -0000
@@ -318,7 +318,7 @@
if (_hasDump) {
verbose("----> Dump the object to '" + outputName + "-ref.dump" +"'");
FileWriter writer = new FileWriter(new File(_outputRootFile, outputName + "-ref.dump"));
- writer.write(((CastorTestable)randomizedObject).dumpFields());
+ writer.write(randomizedObject.dumpFields());
writer.close();
}
Index: src/tests/ptf/jdo/rel1toN/TestLoadBiNto1.java
===================================================================
RCS file: /scm/castor/castor/src/tests/ptf/jdo/rel1toN/TestLoadBiNto1.java,v
retrieving revision 1.4
diff -u -r1.4 TestLoadBiNto1.java
--- src/tests/ptf/jdo/rel1toN/TestLoadBiNto1.java 14 Mar 2006 13:22:04 -0000 1.4
+++ src/tests/ptf/jdo/rel1toN/TestLoadBiNto1.java 13 Apr 2006 12:36:01 -0000
@@ -91,7 +91,7 @@
public void testReadWriteEmpty() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.getCacheManager().expireCache();
db.begin();
@@ -130,7 +130,7 @@
public void testReadWriteCached() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.begin();
long begin = System.currentTimeMillis();
@@ -168,7 +168,7 @@
public void testReadOnlyEmpty() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.getCacheManager().expireCache();
db.begin();
@@ -207,7 +207,7 @@
public void testReadOnlyCached() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.begin();
long begin = System.currentTimeMillis();
@@ -245,7 +245,7 @@
public void testReadWriteOidEmpty() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.getCacheManager().expireCache();
db.begin();
@@ -287,7 +287,7 @@
public void testReadWriteOidCached() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.begin();
long begin = System.currentTimeMillis();
@@ -328,7 +328,7 @@
public void testReadOnlyOidEmpty() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.getCacheManager().expireCache();
db.begin();
@@ -370,7 +370,7 @@
public void testReadOnlyOidCached() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.begin();
long begin = System.currentTimeMillis();
@@ -411,7 +411,7 @@
public void testReadOnlyOidOnly() throws Exception {
long start = System.currentTimeMillis();
- Database db = (Database) _jdo.getDatabase();
+ Database db = _jdo.getDatabase();
db.begin();
long begin = System.currentTimeMillis();
Index: src/tests/soak/Test.java
===================================================================
RCS file: /scm/castor/castor/src/tests/soak/Test.java,v
retrieving revision 1.3
diff -u -r1.3 Test.java
--- src/tests/soak/Test.java 8 Apr 2006 14:58:08 -0000 1.3
+++ src/tests/soak/Test.java 13 Apr 2006 12:36:02 -0000
@@ -45,7 +45,7 @@
while ( testA.isAlive() && testB.isAlive() ) {
if ( r.available() > 0 )
Thread.sleep(100);
- else if ((ch=r.read()) == -1 || ch == (int)'q')
+ else if ((ch=r.read()) == -1 || ch == 'q')
break;
}