Author: vyemialyanchyk
Date: 2009-04-07 08:43:40 -0400 (Tue, 07 Apr 2009)
New Revision: 14547
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java 2009-04-07
12:21:20 UTC (rev 14546)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java 2009-04-07
12:43:40 UTC (rev 14547)
@@ -44,22 +44,22 @@
static final Map typeFormats = new HashMap();
static {
addTypeFormat(Hibernate.BOOLEAN, Boolean.TRUE );
- addTypeFormat(Hibernate.BYTE, new Byte((byte) 42));
+ addTypeFormat(Hibernate.BYTE, Byte.valueOf((byte) 42));
addTypeFormat(Hibernate.BIG_INTEGER, BigInteger.valueOf(42));
- addTypeFormat(Hibernate.SHORT, new Short((short) 42));
+ addTypeFormat(Hibernate.SHORT, Short.valueOf((short) 42));
addTypeFormat(Hibernate.CALENDAR, new GregorianCalendar());
addTypeFormat(Hibernate.CALENDAR_DATE, new GregorianCalendar());
- addTypeFormat(Hibernate.INTEGER, new Integer(42));
- addTypeFormat(Hibernate.INTEGER, new Integer(42));
+ addTypeFormat(Hibernate.INTEGER, Integer.valueOf(42));
+ addTypeFormat(Hibernate.INTEGER, Integer.valueOf(42));
addTypeFormat(Hibernate.BIG_DECIMAL, new BigDecimal(42.0));
- addTypeFormat(Hibernate.CHARACTER, new Character('h'));
+ addTypeFormat(Hibernate.CHARACTER, Character.valueOf('h'));
addTypeFormat(Hibernate.CLASS, Table.class);
addTypeFormat(Hibernate.CURRENCY, Currency.getInstance(Locale.getDefault()));
addTypeFormat(Hibernate.DATE, new Date());
- addTypeFormat(Hibernate.DOUBLE, new Double(42.42));
- addTypeFormat(Hibernate.FLOAT, new Float(42.42));
+ addTypeFormat(Hibernate.DOUBLE, Double.valueOf(42.42));
+ addTypeFormat(Hibernate.FLOAT, Float.valueOf((float)42.42));
addTypeFormat(Hibernate.LOCALE, Locale.getDefault());
- addTypeFormat(Hibernate.LONG, new Long(42));
+ addTypeFormat(Hibernate.LONG, Long.valueOf(42));
addTypeFormat(Hibernate.STRING, "a string"); //$NON-NLS-1$
addTypeFormat(Hibernate.TEXT, "a text"); //$NON-NLS-1$
addTypeFormat(Hibernate.TIME, new Date());
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2009-04-07
12:21:20 UTC (rev 14546)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2009-04-07
12:43:40 UTC (rev 14547)
@@ -105,7 +105,7 @@
Iterator iterator = map.keySet().iterator();
//TODO: filter non classes.
- String imports = new String();
+ String imports = ""; //$NON-NLS-1$
while (iterator.hasNext() ) {
String element = (String) iterator.next();
imports += "import " + element + ";\n"; //$NON-NLS-1$
//$NON-NLS-2$
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2009-04-07
12:21:20 UTC (rev 14546)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2009-04-07
12:43:40 UTC (rev 14547)
@@ -121,7 +121,7 @@
Enhancer e = ProxyFactory.createEnhancer(PropertyNode.class);
return (BaseNode) e.create(new Class[] { NodeFactory.class, BaseNode.class,
int.class, ClassMetadata.class, Object.class, boolean.class},
- new Object[] { this, node, new
Integer(i),md,baseObject,Boolean.valueOf(objectGraph) } );
+ new Object[] { this, node,
Integer.valueOf(i),md,baseObject,Boolean.valueOf(objectGraph) } );
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java 2009-04-07
12:21:20 UTC (rev 14546)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java 2009-04-07
12:43:40 UTC (rev 14547)
@@ -51,9 +51,6 @@
map.put( key, stack );
stack.push( message );
}
- else if ( stack.isEmpty() ) {
- stack.push( message );
- }
else {
stack.push( message );
}