1 | try {↵ | | 1 | try {↵
|
2 | // TODO : what amount of significant digits need to be supported here?↵ | | 2 | ↵
|
3 | // - from the DecimalFormat docs:↵ | | |
|
4 | // [significant digits] = [minimum integer digits] + [maximum fraction digits]↵ | | |
|
5 | DecimalFormat jdkFormatter = new DecimalFormat( FORMAT_STRING );↵ | | |
|
6 | jdkFormatter.setMinimumIntegerDigits( 1 );↵ | | |
|
7 | jdkFormatter.setMaximumFractionDigits( Integer.MAX_VALUE );↵ | | |
|
8 | return jdkFormatter.format( number )↵ | | 3 | TransactionManagerLookup lookup = ( TransactionManagerLookup )↵
|
| | | 4 | ReflectHelper.classForName( tmLookupClass ).newInstance();↵
|
| | | 5 | log.info( "instantiated TransactionManagerLookup" );↵
|
9 | ;↵ | | 6 | return lookup;↵
|
10 | }↵ | | 7 | }↵
|
11 | catch( Throwable t ) {↵ | | 8 | catch ( ↵
|
12 | throw new HibernateException( "Unable to format decimal literal in approximate format [" + number.toString() + "]", t↵ | | 9 | Exception e ) {↵
|
| | | 10 | log.error( "Could not instantiate TransactionManagerLookup", e );↵
|
13 | );↵ | | 11 | throw new HibernateException( "Could not instantiate TransactionManagerLookup '" + tmLookupClass + "'" );↵
|
14 | } | | 12 | }
|