Remove redundant local variables

This commit is contained in:
Thibault Meyer committed 2016-11-07 10:03:50 +01:00
1 parent 63f852475d
commit 5f35e3c944
4 files changed
+5 -13

No files matched your search

@@ -14,9 +14,7 @@ public class ExhangeCompoundType implements CompoundType<ExhangeCMoneyRate> {
@SuppressWarnings({ "unchecked", "rawtypes" })
public CompoundTypeProperty<ExhangeCMoneyRate, ?>[] getProperties() {
CompoundTypeProperty[] props = {new RateProp(), new CMoneyProp()};
return props;
return new CompoundTypeProperty[]{new RateProp(), new CMoneyProp()};
}
static class RateProp implements CompoundTypeProperty<ExhangeCMoneyRate, Rate> {
@@ -13,8 +13,7 @@ public class JodaIntervalCompoundType implements CompoundType<Interval>{
@SuppressWarnings({ "unchecked", "rawtypes" })
public CompoundTypeProperty<Interval, ?>[] getProperties() {
CompoundTypeProperty[] props = {new Start(), new End()};
return props;
return new CompoundTypeProperty[]{new Start(), new End()};
}
static class Start implements CompoundTypeProperty<Interval, Long> {
@@ -3,7 +3,6 @@ package com.avaje.tests.query.other;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.EbeanServer;
import com.avaje.ebean.QueryEachConsumer;
import com.avaje.tests.model.basic.EBasic;
import com.sun.management.HotSpotDiagnosticMXBean;
import org.junit.Ignore;
@@ -115,10 +114,8 @@ public class TestFindIterateHeapDump extends BaseTestCase {
*/
private static HotSpotDiagnosticMXBean getHotspotMBean() {
try {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
HotSpotDiagnosticMXBean bean = ManagementFactory.newPlatformMXBeanProxy(server, HOTSPOT_BEAN_NAME,
HotSpotDiagnosticMXBean.class);
return bean;
final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
return ManagementFactory.newPlatformMXBeanProxy(server, HOTSPOT_BEAN_NAME, HotSpotDiagnosticMXBean.class);
} catch (RuntimeException re) {
throw re;
} catch (Exception exp) {