Merge pull request #864 from 0xbaadf00d/feature/redundant-local-var

Remove redundant local variables
This commit is contained in:
Rob Bygrave
2016-11-07 22:14:59 +13:00
committed by GitHub
4 changed files with 5 additions and 13 deletions
@@ -132,8 +132,6 @@ class EqlAdapterHelper {
}
private String unquote(String value) {
String raw = value.substring(1, value.length() - 1);
//raw.replaceAll();
return raw;
return value.substring(1, value.length() - 1);
}
}
@@ -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) {