You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2006/07/19 23:35:07 UTC
svn commit: r423615 [41/44] - in /incubator/openjpa/trunk: ./
openjpa-jdbc-5/ openjpa-jdbc-5/src/ openjpa-jdbc-5/src/main/
openjpa-jdbc-5/src/main/java/ openjpa-jdbc-5/src/main/java/org/
openjpa-jdbc-5/src/main/java/org/apache/ openjpa-jdbc-5/src/main/...
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java Wed Jul 19 14:34:44 2006
@@ -139,8 +139,7 @@
break;
}
}
- }
- finally {
+ } finally {
pc.pcReplaceStateManager(null);
}
if (!embedded && !isNew)
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionLockManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionLockManager.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionLockManager.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionLockManager.java Wed Jul 19 14:34:44 2006
@@ -77,8 +77,7 @@
setLockLevel(sm, level);
try {
lockInternal(sm, level, timeout, sdata);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
// revert lock
setLockLevel(sm, oldlevel);
throw re;
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/AbstractExpressionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/AbstractExpressionBuilder.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/AbstractExpressionBuilder.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/AbstractExpressionBuilder.java Wed Jul 19 14:34:44 2006
@@ -281,8 +281,7 @@
protected Object traverseStaticField(Class cls, String field) {
try {
return cls.getField(field).get(null);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// count not locate the field: return null
return null;
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java Wed Jul 19 14:34:44 2006
@@ -142,8 +142,7 @@
// get the specified field value and switch candidate
Traversal traversal = (Traversal) action;
candidate = sm.fetchField(traversal.field.getIndex(), true);
- }
- finally {
+ } finally {
// transactional does not clear the state, which is
// important since tmpCandidate might be also managed by
// another broker if it's a proxied non-pc instance
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java Wed Jul 19 14:34:44 2006
@@ -34,11 +34,9 @@
StoreContext ctx, Object[] params) {
try {
return eval(candidate, candidate, ctx, params);
- }
- catch (ClassCastException cce) {
+ } catch (ClassCastException cce) {
return false;
- }
- catch (NullPointerException npe) {
+ } catch (NullPointerException npe) {
return false;
}
}
@@ -50,11 +48,9 @@
StoreContext ctx, Object[] params) {
try {
return eval(candidates, ctx, params);
- }
- catch (ClassCastException cce) {
+ } catch (ClassCastException cce) {
return false;
- }
- catch (NullPointerException npe) {
+ } catch (NullPointerException npe) {
return false;
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java Wed Jul 19 14:34:44 2006
@@ -105,8 +105,7 @@
// no match
return false;
- }
- finally {
+ } finally {
ImplHelper.close(itr);
}
}
@@ -208,8 +207,7 @@
// no match
return false;
- }
- finally {
+ } finally {
ImplHelper.close(itr);
}
}
@@ -713,8 +711,7 @@
if (_asc)
return ((Comparable) o1).compareTo(o2);
return ((Comparable) o2).compareTo(o1);
- }
- catch (ClassCastException cce) {
+ } catch (ClassCastException cce) {
Localizer loc = Localizer.forPackage
(InMemoryExpressionFactory.class);
throw new UserException(loc.get("not-comp", o1, o2));
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Val.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Val.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Val.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Val.java Wed Jul 19 14:34:44 2006
@@ -41,11 +41,9 @@
StoreContext ctx, Object[] params) {
try {
return eval(candidate, candidate, ctx, params);
- }
- catch (NullPointerException npe) {
+ } catch (NullPointerException npe) {
return null;
- }
- catch (ClassCastException cce) {
+ } catch (ClassCastException cce) {
return null;
}
}
@@ -61,11 +59,9 @@
if (c.isEmpty())
return null;
return c.iterator().next();
- }
- catch (NullPointerException npe) {
+ } catch (NullPointerException npe) {
return null;
- }
- catch (ClassCastException cce) {
+ } catch (ClassCastException cce) {
return null;
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java Wed Jul 19 14:34:44 2006
@@ -1113,8 +1113,7 @@
QueryExpressions subexp = getQueryExpressions();
subq.setQueryExpressions(subexp, 0, Long.MAX_VALUE);
return subq;
- }
- finally {
+ } finally {
// remove the subquery parse context
contexts.pop();
}
@@ -1138,8 +1137,7 @@
// indexes in JPQL are 1-based, as opposed to 0-based in
// the core ExpressionFactory
index = Integer.parseInt(id) - 1;
- }
- catch (NumberFormatException e) {
+ } catch (NumberFormatException e) {
throw parseException(EX_USER, "bad-positional-parameter",
new Object[]{ id }, e);
}
@@ -1233,12 +1231,10 @@
Field field = c.getField(fieldName);
Object value = field.get(null);
return factory.newLiteral(value, Literal.TYPE_UNKNOWN);
- }
- catch (NoSuchFieldException nsfe) {
+ } catch (NoSuchFieldException nsfe) {
throw parseException(EX_USER, "no-field",
new Object[]{ className, fieldName }, nsfe);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw parseException(EX_USER, "unaccessible-field",
new Object[]{ className, fieldName }, e);
}
@@ -1629,14 +1625,12 @@
private static final JPQLNode parse(String jpql) {
try {
return (JPQLNode) new JPQL(jpql).parseQuery();
- }
- catch (Error e) {
+ } catch (Error e) {
// special handling for Error subclasses, which the
// parser may sometimes (unfortunately) throw
throw new UserException(_loc.get("parse-error",
new Object[]{ e.toString(), jpql }));
- }
- catch (ParseException e) {
+ } catch (ParseException e) {
throw new UserException(_loc.get("parse-error",
new Object[]{ e.toString(), jpql }), e);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLParser.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLParser.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLParser.java Wed Jul 19 14:34:44 2006
@@ -57,11 +57,9 @@
try {
return new JPQLExpressionBuilder(factory, query, parsed).
getQueryExpressions();
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(_loc.get("bad-jpql", parsed), e);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java Wed Jul 19 14:34:44 2006
@@ -115,8 +115,7 @@
try {
for (int i = 0; i < strs.length; i++)
this.urls.add(new URL(strs[i]));
- }
- catch (MalformedURLException mue) {
+ } catch (MalformedURLException mue) {
throw new UserException(mue);
}
}
@@ -424,8 +423,7 @@
try {
for (Iterator itr = files.iterator(); itr.hasNext();)
parser.parse((File) itr.next());
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
throw new GeneralException(ioe);
}
}
@@ -437,8 +435,7 @@
try {
for (int i = 0; i < cls.length; i++)
parser.parse(cls[i], isParseTopDown());
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
throw new GeneralException(ioe);
}
}
@@ -459,8 +456,7 @@
ser.serialize(flags);
else
ser.serialize(output, flags);
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
throw new GeneralException(ioe);
}
}
@@ -589,8 +585,7 @@
log.info(_loc.get("found-pcs", String.valueOf(names.size()),
String.valueOf(System.currentTimeMillis() - start)));
return (names.isEmpty()) ? null : names;
- }
- catch (IOException ioe) {
+ } catch (IOException ioe) {
throw new GeneralException(ioe);
}
}
@@ -682,8 +677,7 @@
Map map;
try {
map = cparser.mapTypeNames(mitr);
- }
- finally {
+ } finally {
mitr.close();
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataDefaults.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataDefaults.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataDefaults.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataDefaults.java Wed Jul 19 14:34:44 2006
@@ -155,15 +155,12 @@
populate(fmd);
}
return true;
- }
- catch (IllegalStateException iae) {
+ } catch (IllegalStateException iae) {
// thrown by registry when no metadata available
return false;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(e);
}
}
@@ -279,11 +276,9 @@
return fmd.getDeclaringType().getDeclaredField(fmd.getName());
return getBackingMethod(fmd.getDeclaringType(), fmd.getName(),
fmd.getDeclaredType());
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new InternalException(e);
}
}
@@ -303,16 +298,14 @@
do {
try {
return cls.getDeclaredMethod("get" + capName, (Class[]) null);
- }
- catch (NoSuchMethodException e) {
+ } catch (NoSuchMethodException e) {
}
if (isBoolean) {
try {
return cls.getDeclaredMethod("is" + capName,
(Class[]) null);
- }
- catch (NoSuchMethodException e) {
+ } catch (NoSuchMethodException e) {
}
}
// ### EJB3: recursion should be limited to manageable types,
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Wed Jul 19 14:34:44 2006
@@ -1280,8 +1280,7 @@
type = type.getSuperclass()) {
try {
return type.getDeclaredField(fieldName);
- }
- catch (Exception e) {
+ } catch (Exception e) {
}
}
throw new MetaDataException(_loc.get("no-detach-state", fieldName,
@@ -1731,8 +1730,7 @@
private void validateAppIdClassMethods(Class oid) {
try {
oid.getConstructor((Class[]) null);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new MetaDataException(_loc.get("null-cons", _type)).
setCause(e);
}
@@ -1743,8 +1741,7 @@
Method method;
try {
method = oid.getMethod("equals", new Class[]{ Object.class });
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e).setFatal(true);
}
@@ -1754,8 +1751,7 @@
try {
method = oid.getMethod("hashCode", (Class[]) null);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e).setFatal(true);
}
if (!abs && method.getDeclaringClass() == Object.class)
@@ -1822,11 +1818,9 @@
_type)).setFailedObject("set" + cap);
}
}
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new MetaDataException(_loc.get("invalid-id", _type)).
setCause(t);
}
@@ -1842,8 +1836,7 @@
try {
return (pub) ? c.getField(name) : c.getDeclaredField(name);
- }
- catch (NoSuchFieldException nsfe) {
+ } catch (NoSuchFieldException nsfe) {
return (pub) ? null : findField(c.getSuperclass(), name, false);
}
}
@@ -1860,8 +1853,7 @@
try {
return (pub) ? c.getMethod(name, params)
: c.getDeclaredMethod(name, params);
- }
- catch (NoSuchMethodException nsfe) {
+ } catch (NoSuchMethodException nsfe) {
return (pub) ? null : findMethod(c.getSuperclass(), name, params,
false);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java Wed Jul 19 14:34:44 2006
@@ -113,8 +113,7 @@
static {
try {
DEFAULT_METHOD = Object.class.getMethod("wait", (Class[]) null);
- }
- catch (Exception e) {
+ } catch (Exception e) {
// shouldn't ever happen
throw new InternalException(e);
}
@@ -1101,11 +1100,9 @@
if (externalizer.getParameterTypes().length == 0)
return externalizer.invoke(val, (Object[]) null);
return externalizer.invoke(val, new Object[]{ ctx });
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new MetaDataException(_loc.get("externalizer-err", this,
Exceptions.toString(val), e.toString())).setCause(e);
}
@@ -1142,8 +1139,7 @@
if (meth.getParameterTypes().length == 1)
return meth.invoke(null, new Object[]{ val });
return meth.invoke(null, new Object[]{ val, ctx });
- }
- catch (Exception e) {
+ } catch (Exception e) {
// unwrap cause
if (e instanceof InvocationTargetException) {
Throwable t = ((InvocationTargetException) e).
@@ -1338,11 +1334,9 @@
(new Class[]{ getType() });
else
_factMethod = findMethod(_factName);
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
}
if (!(_factMethod instanceof Constructor)
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java Wed Jul 19 14:34:44 2006
@@ -408,8 +408,7 @@
try {
Class.forName(cls.getName(), true,
cls.getClassLoader());
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
}
}
}
@@ -571,8 +570,7 @@
try {
_factory.load(meta.getDescribedType(), mode,
meta.getEnvClassLoader());
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
removeMetaData(meta);
_errs.add(re);
return;
@@ -589,8 +587,7 @@
prepareMapping(meta);
} else
meta.defineSuperclassFields(false);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
removeMetaData(meta);
_errs.add(re);
}
@@ -612,8 +609,7 @@
meta = (ClassMetaData) mapped.get(i);
try {
meta.resolve(MODE_MAPPING_INIT);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
removeMetaData(meta);
_errs.add(re);
}
@@ -645,8 +641,7 @@
buffered.resolve(mode);
processed.add(buffered);
buffer.remove(buffered);
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
_errs.add(re);
// any exception during resolution of one type means we can't
@@ -937,8 +932,7 @@
try {
Class.forName(className.substring(0, i), true, cl);
- }
- catch (Exception e) {
+ } catch (Exception e) {
} // consume all exceptions
}
@@ -1059,8 +1053,7 @@
private Class classForName(String name, ClassLoader loader) {
try {
return Class.forName(name, true, loader);
- }
- catch (Exception e) {
+ } catch (Exception e) {
if ((_validate & VALIDATE_RUNTIME) != 0) {
if (_log.isWarnEnabled())
_log.warn(_loc.get("bad-discover-class", name));
@@ -1104,8 +1097,7 @@
for (int i = 0; i < reg.length; i++) {
try {
getMetaData(reg[i], envLoader, false);
- }
- catch (MetaDataException me) {
+ } catch (MetaDataException me) {
if (_log.isWarnEnabled())
_log.warn(me);
}
@@ -1131,8 +1123,7 @@
for (int i = 0; i < reg.length; i++) {
try {
processRegisteredClass(reg[i]);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
if (!_conf.getRetryClassRegistration())
throw new MetaDataException(_loc.get("error-registered",
reg[i]), t);
@@ -1181,8 +1172,7 @@
Object oid = null;
try {
oid = PCRegistry.newObjectId(cls);
- }
- catch (InternalException ie) {
+ } catch (InternalException ie) {
// thrown for single field identity with null pk field value
}
if (oid != null) {
@@ -1436,8 +1426,7 @@
context.getEnvClassLoader(), mustExist);
if (seq != null)
return seq;
- }
- catch (MetaDataException mde) {
+ } catch (MetaDataException mde) {
e = mde;
}
@@ -1454,8 +1443,7 @@
try {
return getSequenceMetaData(name, context.getEnvClassLoader(),
mustExist);
- }
- catch (MetaDataException mde) {
+ } catch (MetaDataException mde) {
// throw original exception
if (e != null)
throw e;
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java Wed Jul 19 14:34:44 2006
@@ -252,8 +252,7 @@
try {
if (!run(conf, args, opts))
System.err.println(_loc.get("tool-usage"));
- }
- finally {
+ } finally {
conf.close();
}
}
@@ -323,8 +322,7 @@
log.info(_loc.get("tool-running", classes[j], flags.action));
try {
tool.run(classes[j]);
- }
- catch (IllegalArgumentException iae) {
+ } catch (IllegalArgumentException iae) {
return false;
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java Wed Jul 19 14:34:44 2006
@@ -266,11 +266,9 @@
throw new MetaDataException(_loc.get("not-seq-cls", _name,
cls));
return seq;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new MetaDataException(_loc.get("cant-init-seq", _name)).
setCause(e);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java Wed Jul 19 14:34:44 2006
@@ -171,8 +171,7 @@
}
}
return removed;
- }
- finally {
+ } finally {
itr.close();
}
}
@@ -227,8 +226,7 @@
while (itr.hasNext())
list.add(itr.next());
return list;
- }
- finally {
+ } finally {
itr.close();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java Wed Jul 19 14:34:44 2006
@@ -301,8 +301,7 @@
map.put(entry.getKey(), entry.getValue());
}
return map;
- }
- finally {
+ } finally {
itr.close();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java Wed Jul 19 14:34:44 2006
@@ -95,11 +95,9 @@
}
}
return pks;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new GeneralException(t);
}
}
@@ -203,8 +201,7 @@
if (meta.isObjectIdTypeShared())
copy = new ObjectId(meta.getDescribedType(), copy);
return copy;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new GeneralException(t);
}
}
@@ -315,11 +312,9 @@
}
}
return copy;
- }
- catch (OpenJPAException ke) {
+ } catch (OpenJPAException ke) {
throw ke;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new GeneralException(t);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CacheMap.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CacheMap.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CacheMap.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CacheMap.java Wed Jul 19 14:34:44 2006
@@ -211,8 +211,7 @@
writeLock();
try {
cacheMap.setMaxSize((size < 0) ? Integer.MAX_VALUE : size);
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -232,8 +231,7 @@
writeLock();
try {
softMap.setMaxSize((size < 0) ? Integer.MAX_VALUE : size);
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -253,8 +251,7 @@
readLock();
try {
return Collections.unmodifiableSet(pinnedMap.keySet());
- }
- finally {
+ } finally {
readUnlock();
}
}
@@ -287,8 +284,7 @@
return true;
}
return false;
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -307,8 +303,7 @@
return true;
}
return false;
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -353,8 +348,7 @@
put(key, val);
}
return val;
- }
- finally {
+ } finally {
readUnlock();
}
}
@@ -396,8 +390,7 @@
entryAdded(key, value);
}
return val;
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -437,8 +430,7 @@
entryRemoved(key, val, false);
return val;
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -458,8 +450,7 @@
notifyEntryRemovals(softMap.entrySet());
softMap.clear();
- }
- finally {
+ } finally {
writeUnlock();
}
}
@@ -477,8 +468,7 @@
readLock();
try {
return _pinnedSize + cacheMap.size() + softMap.size();
- }
- finally {
+ } finally {
readUnlock();
}
}
@@ -493,8 +483,7 @@
return pinnedMap.get(key) != null
|| cacheMap.containsKey(key)
|| softMap.containsKey(key);
- }
- finally {
+ } finally {
readUnlock();
}
}
@@ -505,8 +494,7 @@
return pinnedMap.containsValue(val)
|| cacheMap.containsValue(val)
|| softMap.containsValue(val);
- }
- finally {
+ } finally {
readUnlock();
}
}
@@ -528,8 +516,7 @@
try {
return "CacheMap:" + cacheMap.toString() + "::"
+ softMap.toString();
- }
- finally {
+ } finally {
readUnlock();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java Wed Jul 19 14:34:44 2006
@@ -68,8 +68,7 @@
try {
new ObjectOutputStream(DEV_NULL).writeObject(ob);
return true;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
return false;
}
}
@@ -109,8 +108,7 @@
if (s.indexOf(ob.getClass().getName()) == -1)
s += " [" + ob.getClass().getName() + "]";
return s;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
return ob.getClass().getName();
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Id.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Id.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Id.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Id.java Wed Jul 19 14:34:44 2006
@@ -80,8 +80,7 @@
int dash = str.indexOf('-');
try {
type = Class.forName(str.substring(0, dash), true, loader);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
throw new UserException(_loc.get("string-id", str), t);
}
_id = Long.parseLong(str.substring(dash + 1));
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java Wed Jul 19 14:34:44 2006
@@ -57,12 +57,10 @@
prop = StringUtils.capitalize(prop);
try {
return cls.getMethod("get" + prop, (Class[]) null);
- }
- catch (Exception e) {
+ } catch (Exception e) {
try {
return cls.getMethod("is" + prop, (Class[]) null);
- }
- catch (Exception e2) {
+ } catch (Exception e2) {
throw new UserException(_loc.get("bad-getter", cls,
prop)).setCause(e);
}
@@ -78,8 +76,7 @@
try {
return cls.getMethod("set" + prop,
new Class[]{ getter.getReturnType() });
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UserException(_loc.get("bad-setter", cls, prop)).
setCause(e);
}
@@ -178,11 +175,9 @@
try {
if (o instanceof Closeable)
((Closeable) o).close();
- }
- catch (RuntimeException re) {
+ } catch (RuntimeException re) {
throw re;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new GeneralException(e);
}
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java Wed Jul 19 14:34:44 2006
@@ -74,8 +74,7 @@
cal = (ProxyGregorianCalendar) JavaVersions.
getVersionSpecificClass(ProxyGregorianCalendar.class).
newInstance();
- }
- catch (Exception e) {
+ } catch (Exception e) {
}
_calendars.put(Calendar.class, cal);
@@ -201,8 +200,7 @@
System.arraycopy(orig, 0, array, 0, length);
return array;
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UnsupportedException(_loc.get("bad-array",
e.getMessage()), e);
}
@@ -256,8 +254,7 @@
try {
p = (Proxy) type.newInstance();
proxies.put(type, p);
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new UnsupportedException(_loc.get("no-proxy-cons",
type), e);
}
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Serialization.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Serialization.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Serialization.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Serialization.java Wed Jul 19 14:34:44 2006
@@ -55,8 +55,7 @@
objs.writeObject(val);
objs.flush();
return bytes.toByteArray();
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new StoreException(e);
}
}
@@ -77,8 +76,7 @@
if (ctx == null)
return new ObjectInputStream(in).readObject();
return new PersistentObjectInputStream(in, ctx).readObject();
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new StoreException(e);
}
}
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/AbstractTask.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/AbstractTask.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/AbstractTask.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/AbstractTask.java Wed Jul 19 14:34:44 2006
@@ -150,8 +150,7 @@
e.printStackTrace();
if (haltOnError)
throw new BuildException(e);
- }
- finally {
+ } finally {
if (_conf != null)
_conf.close();
_conf = null;
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java Wed Jul 19 14:34:44 2006
@@ -558,8 +558,7 @@
} catch (NamingException ne) {
throw new NestableRuntimeException(_loc.get("naming-err", name),
ne);
- }
- finally {
+ } finally {
if (ctx != null)
try {
ctx.close();
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/JDBCEventConnectionDecorator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/JDBCEventConnectionDecorator.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/JDBCEventConnectionDecorator.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/JDBCEventConnectionDecorator.java Wed Jul 19 14:34:44 2006
@@ -114,8 +114,7 @@
JDBCEvent.BEFORE_COMMIT, null, null, null);
try {
super.commit();
- }
- finally {
+ } finally {
fireEvent(getDelegate(), JDBCEvent.AFTER_COMMIT, before,
null, null);
}
@@ -126,8 +125,7 @@
JDBCEvent.BEFORE_ROLLBACK, null, null, null);
try {
super.rollback();
- }
- finally {
+ } finally {
fireEvent(getDelegate(), JDBCEvent.AFTER_ROLLBACK, before,
null, null);
}
@@ -140,8 +138,7 @@
try {
stmnt = new EventStatement(super.createStatement(false),
EventConnection.this);
- }
- finally {
+ } finally {
fireEvent(getDelegate(), JDBCEvent.AFTER_CREATE_STATEMENT,
before, stmnt, null);
}
@@ -156,8 +153,7 @@
try {
stmnt = new EventStatement(super.createStatement
(rsType, rsConcur, false), EventConnection.this);
- }
- finally {
+ } finally {
fireEvent(getDelegate(), JDBCEvent.AFTER_CREATE_STATEMENT,
before, stmnt, null);
}
@@ -172,8 +168,7 @@
try {
stmnt = new EventPreparedStatement(super.prepareStatement
(sql, false), EventConnection.this, sql);
- }
- finally {
+ } finally {
fireEvent(getDelegate(), JDBCEvent.AFTER_PREPARE_STATEMENT,
before, stmnt, sql);
}
@@ -188,8 +183,7 @@
try {
stmnt = new EventPreparedStatement(super.prepareStatement
(sql, rsType, rsConcur, false), EventConnection.this, sql);
- }
- finally {
+ } finally {
fireEvent(getDelegate(), JDBCEvent.AFTER_PREPARE_STATEMENT,
before, stmnt, sql);
}
@@ -200,8 +194,7 @@
try {
fireEvent(getDelegate(), JDBCEvent.BEFORE_CLOSE,
null, null, null);
- }
- finally {
+ } finally {
super.close();
}
}
@@ -227,8 +220,7 @@
JDBCEvent.BEFORE_EXECUTE_STATEMENT, null, getDelegate(), _sql);
try {
return super.executeUpdate();
- }
- finally {
+ } finally {
fireEvent(_conn.getDelegate(),
JDBCEvent.AFTER_EXECUTE_STATEMENT, before,
getDelegate(), _sql);
@@ -240,8 +232,7 @@
JDBCEvent.BEFORE_EXECUTE_STATEMENT, null, getDelegate(), _sql);
try {
return super.executeQuery(wrap);
- }
- finally {
+ } finally {
fireEvent(_conn.getDelegate(),
JDBCEvent.AFTER_EXECUTE_STATEMENT, before,
getDelegate(), _sql);
@@ -253,8 +244,7 @@
JDBCEvent.BEFORE_EXECUTE_STATEMENT, null, getDelegate(), _sql);
try {
return super.executeBatch();
- }
- finally {
+ } finally {
fireEvent(_conn.getDelegate(),
JDBCEvent.AFTER_EXECUTE_STATEMENT, before,
getDelegate(), _sql);
@@ -279,8 +269,7 @@
JDBCEvent.BEFORE_EXECUTE_STATEMENT, null, getDelegate(), sql);
try {
return super.executeUpdate(sql);
- }
- finally {
+ } finally {
fireEvent(_conn.getDelegate(),
JDBCEvent.AFTER_EXECUTE_STATEMENT, before,
getDelegate(), sql);
@@ -293,8 +282,7 @@
JDBCEvent.BEFORE_EXECUTE_STATEMENT, null, getDelegate(), sql);
try {
return super.executeQuery(sql, wrap);
- }
- finally {
+ } finally {
fireEvent(_conn.getDelegate(),
JDBCEvent.AFTER_EXECUTE_STATEMENT, before,
getDelegate(), sql);
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Wed Jul 19 14:34:44 2006
@@ -245,8 +245,7 @@
try {
super.commit();
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled())
_logs.logJDBC("commit", start, this);
handleSQLWarning();
@@ -258,8 +257,7 @@
try {
super.rollback();
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled())
_logs.logJDBC("rollback", start, this);
handleSQLWarning();
@@ -271,8 +269,7 @@
try {
super.close();
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled())
_logs.logJDBC("close", start, this);
}
@@ -282,8 +279,7 @@
long start = System.currentTimeMillis();
try {
return super.setSavepoint();
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled())
_logs.logJDBC("savepoint", start, this);
handleSQLWarning();
@@ -294,8 +290,7 @@
long start = System.currentTimeMillis();
try {
return super.setSavepoint(name);
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled())
_logs.logJDBC("savepoint: " + name, start, this);
handleSQLWarning();
@@ -306,8 +301,7 @@
long start = System.currentTimeMillis();
try {
super.rollback(savepoint);
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled()) {
String name = null;
try {
@@ -325,8 +319,7 @@
long start = System.currentTimeMillis();
try {
super.releaseSavepoint(savepoint);
- }
- finally {
+ } finally {
if (_logs.isJDBCEnabled()) {
String name = null;
try {
@@ -415,8 +408,7 @@
try {
handleSQLWarning(getWarnings());
- }
- finally {
+ } finally {
clearWarnings();
}
}
@@ -432,8 +424,7 @@
try {
handleSQLWarning(stmnt.getWarnings());
- }
- finally {
+ } finally {
stmnt.clearWarnings();
}
}
@@ -449,8 +440,7 @@
try {
handleSQLWarning(rs.getWarnings());
- }
- finally {
+ } finally {
rs.clearWarnings();
}
}
@@ -723,8 +713,7 @@
return super.executeQuery(sql, wrap);
} catch (SQLException se) {
throw wrap(se, LoggingStatement.this);
- }
- finally {
+ } finally {
if (_logs.isSQLEnabled())
_logs.logSQL("executing " + this, start,
LoggingConnection.this);
@@ -740,8 +729,7 @@
return super.executeUpdate(sql);
} catch (SQLException se) {
throw wrap(se, LoggingStatement.this);
- }
- finally {
+ } finally {
if (_logs.isSQLEnabled())
_logs.logSQL("executing " + this, start,
LoggingConnection.this);
@@ -757,8 +745,7 @@
return super.execute(sql);
} catch (SQLException se) {
throw wrap(se, LoggingStatement.this);
- }
- finally {
+ } finally {
if (_logs.isSQLEnabled())
_logs.logSQL("executing " + this, start,
LoggingConnection.this);
@@ -794,8 +781,7 @@
return super.executeQuery(sql, wrap);
} catch (SQLException se) {
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -809,8 +795,7 @@
return super.executeUpdate(sql);
} catch (SQLException se) {
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -824,8 +809,7 @@
return super.execute(sql);
} catch (SQLException se) {
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -839,8 +823,7 @@
return super.executeQuery(wrap);
} catch (SQLException se) {
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -854,8 +837,7 @@
return super.executeUpdate();
} catch (SQLException se) {
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -901,8 +883,7 @@
}
}
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing batch", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -916,8 +897,7 @@
return super.execute();
} catch (SQLException se) {
throw wrap(se, LoggingPreparedStatement.this);
- }
- finally {
+ } finally {
log("executing", start);
clearLogParameters(true);
handleSQLWarning(LoggingPreparedStatement.this);
@@ -1221,8 +1201,7 @@
public boolean next() throws SQLException {
try {
return super.next();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1230,8 +1209,7 @@
public void close() throws SQLException {
try {
super.close();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1239,8 +1217,7 @@
public void beforeFirst() throws SQLException {
try {
super.beforeFirst();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1248,8 +1225,7 @@
public void afterLast() throws SQLException {
try {
super.afterLast();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1257,8 +1233,7 @@
public boolean first() throws SQLException {
try {
return super.first();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1266,8 +1241,7 @@
public boolean last() throws SQLException {
try {
return super.last();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1275,8 +1249,7 @@
public boolean absolute(int a) throws SQLException {
try {
return super.absolute(a);
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1284,8 +1257,7 @@
public boolean relative(int a) throws SQLException {
try {
return super.relative(a);
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
@@ -1293,8 +1265,7 @@
public boolean previous() throws SQLException {
try {
return super.previous();
- }
- finally {
+ } finally {
handleSQLWarning(LoggingResultSet.this);
}
}
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassArgParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassArgParser.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassArgParser.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassArgParser.java Wed Jul 19 14:34:44 2006
@@ -250,8 +250,7 @@
if (source.toString().endsWith(".class"))
names.add(getFromClass(in));
names.addAll(getFromMetaData(new InputStreamReader(in)));
- }
- finally {
+ } finally {
try {
in.close();
} catch (IOException ioe) {
@@ -294,8 +293,7 @@
try {
fin = new FileInputStream(file);
return getFromClass(fin);
- }
- finally {
+ } finally {
if (fin != null)
try {
fin.close();
@@ -353,8 +351,7 @@
clsName = pack + "." + clsName;
return clsName;
- }
- finally {
+ } finally {
if (in != null)
try {
in.close();
@@ -371,8 +368,7 @@
try {
in = new FileReader(file);
return getFromMetaData(in);
- }
- finally {
+ } finally {
if (in != null)
try {
in.close();
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java Wed Jul 19 14:34:44 2006
@@ -374,8 +374,7 @@
IOException ioe = new IOException(se.toString());
JavaVersions.initCause(ioe, se);
throw ioe;
- }
- finally {
+ } finally {
reset();
}
}
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/EagerResultList.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/EagerResultList.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/EagerResultList.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/EagerResultList.java Wed Jul 19 14:34:44 2006
@@ -35,8 +35,7 @@
throw re;
} catch (Exception e) {
rop.handleCheckedException(e);
- }
- finally {
+ } finally {
try {
rop.close();
} catch (Exception e) {
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Files.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Files.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Files.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Files.java Wed Jul 19 14:34:44 2006
@@ -250,8 +250,7 @@
for (int b; (b = inbuf.read()) != -1; outbuf.write(b)) ;
outbuf.flush();
return true;
- }
- finally {
+ } finally {
if (in != null)
try {
in.close();
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java Wed Jul 19 14:34:44 2006
@@ -283,8 +283,7 @@
isLoading = true;
try {
loadProperties(in);
- }
- finally {
+ } finally {
isLoading = false;
}
}
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ParameterTemplate.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ParameterTemplate.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ParameterTemplate.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ParameterTemplate.java Wed Jul 19 14:34:44 2006
@@ -144,8 +144,7 @@
FileReader reader = new FileReader(file);
try {
return append(reader);
- }
- finally {
+ } finally {
try {
reader.close();
} catch (IOException ioe) {
@@ -245,8 +244,7 @@
FileWriter writer = new FileWriter(file);
try {
write(writer);
- }
- finally {
+ } finally {
try {
writer.close();
} catch (IOException ioe) {
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/StreamResourceBundleProvider.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/StreamResourceBundleProvider.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/StreamResourceBundleProvider.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/StreamResourceBundleProvider.java Wed Jul 19 14:34:44 2006
@@ -41,8 +41,7 @@
try {
return new PropertyResourceBundle(in);
} catch (Exception e) {
- }
- finally {
+ } finally {
try {
in.close();
} catch (IOException ioe) {
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java Wed Jul 19 14:34:44 2006
@@ -56,8 +56,7 @@
zip.closeEntry();
}
} catch (Exception e) {
- }
- finally {
+ } finally {
try {
zip.close();
} catch (IOException ioe) {
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CondVar.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CondVar.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CondVar.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CondVar.java Wed Jul 19 14:34:44 2006
@@ -86,8 +86,7 @@
throw ex;
}
}
- }
- finally {
+ } finally {
for (int i = holdCount; i > 0; i--) lock.lock();
}
}
@@ -118,8 +117,7 @@
throw ex;
}
}
- }
- finally {
+ } finally {
for (int i = holdCount; i > 0; i--) lock.lock();
}
return success;
@@ -157,8 +155,7 @@
throw ex;
}
}
- }
- finally {
+ } finally {
for (int i = holdCount; i > 0; i--) lock.lock();
}
return success;
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOCondVar.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOCondVar.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOCondVar.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOCondVar.java Wed Jul 19 14:34:44 2006
@@ -58,8 +58,7 @@
for (int i = holdCount; i > 0; i--) lock.unlock();
try {
n.doWaitUninterruptibly(sync);
- }
- finally {
+ } finally {
for (int i = holdCount; i > 0; i--) lock.lock();
}
}
@@ -75,8 +74,7 @@
for (int i = holdCount; i > 0; i--) lock.unlock();
try {
n.doWait(sync);
- }
- finally {
+ } finally {
for (int i = holdCount; i > 0; i--) lock.lock();
}
}
@@ -95,8 +93,7 @@
for (int i = holdCount; i > 0; i--) lock.unlock();
try {
success = n.doTimedWait(sync, nanos);
- }
- finally {
+ } finally {
for (int i = holdCount; i > 0; i--) lock.lock();
}
return success;
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ReentrantLock.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ReentrantLock.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ReentrantLock.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ReentrantLock.java Wed Jul 19 14:34:44 2006
@@ -187,8 +187,7 @@
return;
}
}
- }
- finally {
+ } finally {
if (wasInterrupted) Thread.currentThread().interrupt();
}
}
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/WaitQueue.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/WaitQueue.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/WaitQueue.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/WaitQueue.java Wed Jul 19 14:34:44 2006
@@ -139,8 +139,7 @@
// must be not waiting, and we'll act like signalled
}
}
- }
- finally {
+ } finally {
if (wasInterrupted) Thread.currentThread().interrupt();
}
}
Modified: incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestMultiClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestMultiClassLoader.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestMultiClassLoader.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestMultiClassLoader.java Wed Jul 19 14:34:44 2006
@@ -101,16 +101,14 @@
assertEquals(TestMultiClassLoader.class, Class.forName
(TestMultiClassLoader.class.getName(), true, _loader));
fail("System class laoder still working.");
- }
- catch (ClassNotFoundException cnfe)
+ } catch (ClassNotFoundException cnfe)
{
}
try
{
Class.forName("foo", true, _loader);
fail("Somehow found 'foo'???");
- }
- catch (ClassNotFoundException cnfe)
+ } catch (ClassNotFoundException cnfe)
{
}
_loader.addClassLoader(new FooLoader());
Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml Wed Jul 19 14:34:44 2006
@@ -0,0 +1,120 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-persistence-jdbc</artifactId>
+ <packaging>jar</packaging>
+
+ <name>JPA JDBC</name>
+ <description>JPA JDBC</description>
+ <url>http://incubator.apache.org/projects/openjpa</url>
+ <parent>
+
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>0.0.1</version>
+
+ </parent>
+ <dependencies>
+
+ <dependency>
+
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-jdbc-5</artifactId>
+ <version>0.0.1</version>
+ <scope>compile</scope>
+
+ </dependency>
+ <dependency>
+
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-persistence</artifactId>
+ <version>0.0.1</version>
+ <scope>compile</scope>
+
+ </dependency>
+ <dependency>
+
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.1.2.1</version>
+ <scope>test</scope>
+
+ </dependency>
+ <dependency>
+
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+
+ </dependency>
+ <dependency>
+
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ <scope>test</scope>
+
+ </dependency>
+
+ </dependencies>
+ <build>
+
+ <plugins>
+
+ <plugin>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test-compile</phase>
+ <configuration>
+ <tasks>
+ <path id="enhance.path.ref">
+ <fileset
+ dir="${project.build.testOutputDirectory}">
+ <include name="**/*.class"/>
+ </fileset>
+ </path>
+ <pathconvert property="enhance.files"
+ refid="enhance.path.ref"
+ pathsep=" "/>
+ <java
+ classname="org.apache.openjpa.enhance.PCEnhancer">
+ <arg value="-MetaDataFactory"/>
+ <arg
+ value="org.apache.openjpa.persistence.PersistenceMetaDataFactory"/>
+ <arg line="${enhance.files}"/>
+ <classpath>
+ <path
+ refid="maven.dependency.classpath"/>
+ <path refid="maven.compile.classpath"/>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ </java>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+
+</project>
Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml
------------------------------------------------------------------------------
svn:executable = *