The following issues were found
src/test/java/data/media/writeAsArray/ImageDeserializer.java
8 issues
Line: 21
Image image = new Image();
final JSONLexer lexer = parser.getLexer();
if (lexer.token() != JSONToken.LBRACKET) {
throw new JSONException("error");
}
int height = lexer.scanInt(',');
int width = lexer.scanInt(',');
Reported by PMD.
Line: 25
throw new JSONException("error");
}
int height = lexer.scanInt(',');
int width = lexer.scanInt(',');
String sizeName = lexer.scanSymbolWithSeperator(parser.getSymbolTable(), ',');
String title = lexer.scanString(',');
String uri = lexer.scanString(']');
Reported by PMD.
Line: 26
}
int height = lexer.scanInt(',');
int width = lexer.scanInt(',');
String sizeName = lexer.scanSymbolWithSeperator(parser.getSymbolTable(), ',');
String title = lexer.scanString(',');
String uri = lexer.scanString(']');
lexer.nextToken(JSONToken.COMMA);
Reported by PMD.
Line: 27
int height = lexer.scanInt(',');
int width = lexer.scanInt(',');
String sizeName = lexer.scanSymbolWithSeperator(parser.getSymbolTable(), ',');
String title = lexer.scanString(',');
String uri = lexer.scanString(']');
lexer.nextToken(JSONToken.COMMA);
Reported by PMD.
Line: 28
int height = lexer.scanInt(',');
int width = lexer.scanInt(',');
String sizeName = lexer.scanSymbolWithSeperator(parser.getSymbolTable(), ',');
String title = lexer.scanString(',');
String uri = lexer.scanString(']');
lexer.nextToken(JSONToken.COMMA);
image.setHeight(height);
Reported by PMD.
Line: 29
int width = lexer.scanInt(',');
String sizeName = lexer.scanSymbolWithSeperator(parser.getSymbolTable(), ',');
String title = lexer.scanString(',');
String uri = lexer.scanString(']');
lexer.nextToken(JSONToken.COMMA);
image.setHeight(height);
image.setWidth(width);
Reported by PMD.
Line: 31
String title = lexer.scanString(',');
String uri = lexer.scanString(']');
lexer.nextToken(JSONToken.COMMA);
image.setHeight(height);
image.setWidth(width);
image.setSize(Size.valueOf(sizeName));
image.setTitle(title);
Reported by PMD.
Line: 18
@SuppressWarnings("unchecked")
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) {
Image image = new Image();
final JSONLexer lexer = parser.getLexer();
if (lexer.token() != JSONToken.LBRACKET) {
throw new JSONException("error");
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/writeAsArray/WriteAsArray_double_private.java
8 issues
Line: 13
import junit.framework.TestCase;
public class WriteAsArray_double_private extends TestCase {
public void test_0 () throws Exception {
VO vo = new VO();
vo.setId(123D);
vo.setName("wenshao");
String text = JSON.toJSONString(vo, SerializerFeature.BeanToArray);
Reported by PMD.
Line: 26
Assert.assertEquals(vo.name, vo2.name);
}
public void test_error() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123.A,\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
Reported by PMD.
Line: 36
Assert.assertNotNull(error);
}
public void test_error1() throws Exception {
Exception error = null;
try {
JSON.parseObject("[\"A\",\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
Reported by PMD.
Line: 46
Assert.assertNotNull(error);
}
public void test_error2() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123:\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
Reported by PMD.
Line: 56
Assert.assertNotNull(error);
}
public static class VO {
private double id;
private String name;
public double getId() {
return id;
Reported by PMD.
Line: 27
}
public void test_error() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123.A,\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
}
Reported by PMD.
Line: 37
}
public void test_error1() throws Exception {
Exception error = null;
try {
JSON.parseObject("[\"A\",\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
}
Reported by PMD.
Line: 47
}
public void test_error2() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123:\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
}
Reported by PMD.
src/test/java/com/alibaba/json/demo/ReuseObject.java
8 issues
Line: 10
* Created by wenshao on 11/02/2017.
*/
public class ReuseObject extends TestCase {
public void test_reuse() throws Exception {
Model model = new Model();
{
DefaultJSONParser parser = new DefaultJSONParser("{\"id\":123,\"name\":\"wangsai-silence\"}");
parser.parseObject(model);
Reported by PMD.
Line: 10
* Created by wenshao on 11/02/2017.
*/
public class ReuseObject extends TestCase {
public void test_reuse() throws Exception {
Model model = new Model();
{
DefaultJSONParser parser = new DefaultJSONParser("{\"id\":123,\"name\":\"wangsai-silence\"}");
parser.parseObject(model);
Reported by PMD.
Line: 18
parser.parseObject(model);
parser.close(); // 调用close能重用buf,提升性能
assertEquals(123, model.id);
assertEquals("wangsai-silence", model.name);
}
{
DefaultJSONParser parser = new DefaultJSONParser("{\"id\":234,\"name\":\"wenshao\"}");
Reported by PMD.
Line: 19
parser.close(); // 调用close能重用buf,提升性能
assertEquals(123, model.id);
assertEquals("wangsai-silence", model.name);
}
{
DefaultJSONParser parser = new DefaultJSONParser("{\"id\":234,\"name\":\"wenshao\"}");
parser.parseObject(model);
Reported by PMD.
Line: 27
parser.parseObject(model);
parser.close(); // 调用close能重用buf,提升性能
assertEquals(234, model.id);
assertEquals("wenshao", model.name);
}
}
public static class Model {
public int id;
Reported by PMD.
Line: 28
parser.close(); // 调用close能重用buf,提升性能
assertEquals(234, model.id);
assertEquals("wenshao", model.name);
}
}
public static class Model {
public int id;
public String name;
Reported by PMD.
Line: 32
}
}
public static class Model {
public int id;
public String name;
}
}
Reported by PMD.
Line: 33
}
public static class Model {
public int id;
public String name;
}
}
Reported by PMD.
src/test/java/com/alibaba/json/test/A1.java
8 issues
Line: 22
public void test_a() throws Exception {
Object obj = JSON.parse("[{\"feature\":\"\\u3A56\\u3A26\"}]");
String json = JSON.toJSONString(obj, SerializerFeature.BrowserCompatible);
System.out.println(json);
}
Reported by PMD.
Line: 19
*/
public class A1 extends TestCase {
public void test_a() throws Exception {
Object obj = JSON.parse("[{\"feature\":\"\\u3A56\\u3A26\"}]");
String json = JSON.toJSONString(obj, SerializerFeature.BrowserCompatible);
System.out.println(json);
Reported by PMD.
Line: 19
*/
public class A1 extends TestCase {
public void test_a() throws Exception {
Object obj = JSON.parse("[{\"feature\":\"\\u3A56\\u3A26\"}]");
String json = JSON.toJSONString(obj, SerializerFeature.BrowserCompatible);
System.out.println(json);
Reported by PMD.
Line: 28
}
public void test_ser() throws Exception {
// JSONObject obj = new JSONObject();
//
// ByteArrayOutputStream out = new ByteArrayOutputStream();
// ObjectOutputStream objOut = new ObjectOutputStream(out);
// objOut.writeObject(obj);
Reported by PMD.
Line: 45
ByteArrayInputStream byteIn = new ByteArrayInputStream(bytes2);
ObjectInputStream objIn = new ObjectInputStream(byteIn);
Object obj = objIn.readObject();
assertEquals(JSONObject.class, obj.getClass());
}
}
Reported by PMD.
Line: 45
ByteArrayInputStream byteIn = new ByteArrayInputStream(bytes2);
ObjectInputStream objIn = new ObjectInputStream(byteIn);
Object obj = objIn.readObject();
assertEquals(JSONObject.class, obj.getClass());
}
}
Reported by PMD.
Line: 10
import junit.framework.TestCase;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
/**
* Created by wenshao on 14/03/2017.
Reported by PMD.
Line: 12
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
/**
* Created by wenshao on 14/03/2017.
*/
public class A1 extends TestCase {
Reported by PMD.
src/test/java/com/alibaba/json/test/Issue3805.java
8 issues
Line: 46
converter.canRead(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
Reported by PMD.
Line: 46
converter.canRead(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
Reported by PMD.
Line: 46
converter.canRead(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
Reported by PMD.
Line: 46
converter.canRead(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
Reported by PMD.
Line: 47
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
@Override
Reported by PMD.
Line: 47
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
@Override
Reported by PMD.
Line: 47
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
@Override
Reported by PMD.
Line: 47
converter.canWrite(TestModel.class, MediaType.APPLICATION_JSON_UTF8);
final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
HttpOutputMessage out = new HttpOutputMessage() {
public HttpHeaders getHeaders() {
return new HttpHeaders() {
private static final long serialVersionUID = 1L;
@Override
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/BenchmarkMain_EishayEncode.java
8 issues
Line: 16
public class BenchmarkMain_EishayEncode {
public static void main(String[] args) throws Exception {
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
Reported by PMD.
Line: 18
public static void main(String[] args) throws Exception {
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
Reported by PMD.
Line: 22
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
for (int i = 0; i < 10; ++i) {
perf(text);
}
}
Reported by PMD.
Line: 44
long ygct = TestUtils.getYoungGCTime() - startYGCTime;
long fgc = TestUtils.getFullGC() - startFGC;
System.out.println("encode\t" + millis + ", ygc " + ygc + ", ygct " + ygct + ", fgc " + fgc);
return millis;
}
static String encode(Object text) {
return JSON.toJSONString(text, SerializerFeature.BeanToArray);
Reported by PMD.
Line: 13
import data.media.MediaContent;
public class BenchmarkMain_EishayEncode {
public static void main(String[] args) throws Exception {
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
Reported by PMD.
Line: 15
public class BenchmarkMain_EishayEncode {
public static void main(String[] args) throws Exception {
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
Reported by PMD.
Line: 17
public static void main(String[] args) throws Exception {
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
Reported by PMD.
Line: 20
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
for (int i = 0; i < 10; ++i) {
perf(text);
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/BenchmarkMain_EishayEncode_WriteAsArray.java
8 issues
Line: 26
config.put(Media.class, new MediaSerializer());
config.put(Image.class, new ImageSerializer());
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
Reported by PMD.
Line: 28
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
Reported by PMD.
Line: 32
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
for (int i = 0; i < 10; ++i) {
perf(text);
}
}
Reported by PMD.
Line: 54
long ygct = TestUtils.getYoungGCTime() - startYGCTime;
long fgc = TestUtils.getFullGC() - startFGC;
System.out.println("encode\t" + millis + ", ygc " + ygc + ", ygct " + ygct + ", fgc " + fgc);
return millis;
}
static String encode(Object text) {
return JSON.toJSONString(text);
Reported by PMD.
Line: 18
import data.media.writeAsArray.MediaContentSerializer;
import data.media.writeAsArray.MediaSerializer;
public class BenchmarkMain_EishayEncode_WriteAsArray {
public static void main(String[] args) throws Exception {
SerializeConfig config = SerializeConfig.getGlobalInstance();
config.put(MediaContent.class, new MediaContentSerializer());
config.put(Media.class, new MediaSerializer());
Reported by PMD.
Line: 20
public class BenchmarkMain_EishayEncode_WriteAsArray {
public static void main(String[] args) throws Exception {
SerializeConfig config = SerializeConfig.getGlobalInstance();
config.put(MediaContent.class, new MediaContentSerializer());
config.put(Media.class, new MediaSerializer());
config.put(Image.class, new ImageSerializer());
Reported by PMD.
Line: 27
config.put(Image.class, new ImageSerializer());
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.runtime.version"));
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
Reported by PMD.
Line: 30
List<String> arguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
System.out.println(arguments);
MediaContent content = EishayDecodeBytes.instance.getContent();
String text = encode(content);
System.out.println(text);
for (int i = 0; i < 10; ++i) {
perf(text);
Reported by PMD.
src/test/java/com/alibaba/json/bvt/writeAsArray/WriteAsArray_double_public.java
8 issues
Line: 13
import junit.framework.TestCase;
public class WriteAsArray_double_public extends TestCase {
public void test_0 () throws Exception {
VO vo = new VO();
vo.setId(123D);
vo.setName("wenshao");
String text = JSON.toJSONString(vo, SerializerFeature.BeanToArray);
Reported by PMD.
Line: 26
Assert.assertEquals(vo.name, vo2.name);
}
public void test_error() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123.A,\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
Reported by PMD.
Line: 36
Assert.assertNotNull(error);
}
public void test_error1() throws Exception {
Exception error = null;
try {
JSON.parseObject("[\"A\",\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
Reported by PMD.
Line: 46
Assert.assertNotNull(error);
}
public void test_error2() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123:\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
Reported by PMD.
Line: 56
Assert.assertNotNull(error);
}
private static class VO {
private double id;
private String name;
public double getId() {
return id;
Reported by PMD.
Line: 27
}
public void test_error() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123.A,\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
}
Reported by PMD.
Line: 37
}
public void test_error1() throws Exception {
Exception error = null;
try {
JSON.parseObject("[\"A\",\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
}
Reported by PMD.
Line: 47
}
public void test_error2() throws Exception {
Exception error = null;
try {
JSON.parseObject("[123:\"wenshao\"]", VO.class, Feature.SupportArrayToBean);
} catch (JSONException ex) {
error = ex;
}
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/RyuFloatBenchmark.java
8 issues
Line: 12
float v = 0.539005056644f; //new java.util.Random().nextDouble();
System.out.println(v);
// for (int i = 0; i < 10; ++i) {
// f0(v); // 741
// }
Reported by PMD.
Line: 31
Float.toString(v);
}
long millis = System.currentTimeMillis() - start;
System.out.println("jdk : " + millis);
}
public static void f1(float v) throws Exception {
long start = System.currentTimeMillis();
for (int i = 0; i < COUNT; ++i) {
Reported by PMD.
Line: 40
RyuFloat.toString(v);
}
long millis = System.currentTimeMillis() - start;
System.out.println("ryu : " + millis);
}
}
Reported by PMD.
Line: 6
import com.alibaba.fastjson.util.RyuDouble;
import com.alibaba.fastjson.util.RyuFloat;
public class RyuFloatBenchmark {
private final static int COUNT = 1000 * 1000 * 10;
public static void main(String[] args) throws Exception {
float v = 0.539005056644f; //new java.util.Random().nextDouble();
Reported by PMD.
Line: 8
public class RyuFloatBenchmark {
private final static int COUNT = 1000 * 1000 * 10;
public static void main(String[] args) throws Exception {
float v = 0.539005056644f; //new java.util.Random().nextDouble();
System.out.println(v);
Reported by PMD.
Line: 25
}
}
public static void f0(float v) throws Exception {
long start = System.currentTimeMillis();
for (int i = 0; i < COUNT; ++i) {
Float.toString(v);
}
long millis = System.currentTimeMillis() - start;
Reported by PMD.
Line: 34
System.out.println("jdk : " + millis);
}
public static void f1(float v) throws Exception {
long start = System.currentTimeMillis();
for (int i = 0; i < COUNT; ++i) {
RyuFloat.toString(v);
}
long millis = System.currentTimeMillis() - start;
Reported by PMD.
Line: 3
package com.alibaba.json.test.benchmark;
import com.alibaba.fastjson.util.RyuDouble;
import com.alibaba.fastjson.util.RyuFloat;
public class RyuFloatBenchmark {
private final static int COUNT = 1000 * 1000 * 10;
public static void main(String[] args) throws Exception {
float v = 0.539005056644f; //new java.util.Random().nextDouble();
Reported by PMD.
src/test/java/com/alibaba/json/test/benchmark/basic/FloatBenchmark.java
8 issues
Line: 45
JSON.parseObject(json, Model.class);
}
long millis = System.currentTimeMillis() - start;
System.out.println("millis : " + millis);
}
public static void perf2() {
long start = System.currentTimeMillis();
for (int i = 0; i < 1000 * 1000; ++i) {
Reported by PMD.
Line: 54
JSON.parseObject(json2, Model.class);
}
long millis = System.currentTimeMillis() - start;
System.out.println("millis : " + millis);
}
public static void perf3() {
long start = System.currentTimeMillis();
for (int i = 0; i < 1000 * 1000; ++i) {
Reported by PMD.
Line: 63
JSON.parseObject(json3, Model.class);
}
long millis = System.currentTimeMillis() - start;
System.out.println("millis : " + millis);
}
public static class Model {
public float v1;
public float v2;
Reported by PMD.
Line: 10
/**
* Created by wenshao on 04/08/2017.
*/
public class FloatBenchmark {
static String json = "{\"v1\":0.012671709,\"v2\":0.6042485,\"v3\":0.13231707,\"v4\":0.80090785,\"v5\":0.6192943}";
static String json2 = "{\"v1\":\"0.012671709\",\"v2\":\"0.6042485\",\"v3\":\"0.13231707\",\"v4\":\"0.80090785\",\"v5\":\"0.6192943\"}";
static String json3 = "{\n" +
"\t\"v1\":0.012671709,\n" +
"\t\"v2\":0.6042485,\n" +
Reported by PMD.
Line: 21
"\t\"v5\":0.6192943\n" +
"}";
public static void main(String[] args) throws Exception {
Model model = new Model();
// model.v1 = new Random().nextFloat();
// model.v2 = new Random().nextFloat();
// model.v3 = new Random().nextFloat();
// model.v4 = new Random().nextFloat();
Reported by PMD.
Line: 22
"}";
public static void main(String[] args) throws Exception {
Model model = new Model();
// model.v1 = new Random().nextFloat();
// model.v2 = new Random().nextFloat();
// model.v3 = new Random().nextFloat();
// model.v4 = new Random().nextFloat();
// model.v5 = new Random().nextFloat();
Reported by PMD.
Line: 5
import com.alibaba.fastjson.JSON;
import java.util.Random;
/**
* Created by wenshao on 04/08/2017.
*/
public class FloatBenchmark {
Reported by PMD.
Line: 22
"}";
public static void main(String[] args) throws Exception {
Model model = new Model();
// model.v1 = new Random().nextFloat();
// model.v2 = new Random().nextFloat();
// model.v3 = new Random().nextFloat();
// model.v4 = new Random().nextFloat();
// model.v5 = new Random().nextFloat();
Reported by PMD.