Skip to content

Commit

Permalink
Changed list creation at DynaCode() to a singleton.
Browse files Browse the repository at this point in the history
  • Loading branch information
shroman authored and dongeforever committed Jun 6, 2017
1 parent 0224f93 commit 06416b0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.net.URLClassLoader;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -71,9 +71,8 @@ public class DynaCode {

private String target;

@SuppressWarnings("unchecked")
public DynaCode(String code) {
this(Thread.currentThread().getContextClassLoader(), Arrays.asList(code));
this(Thread.currentThread().getContextClassLoader(), Collections.singletonList(code));
}

public DynaCode(ClassLoader parentClassLoader, List<String> codeStrs) {
Expand Down

0 comments on commit 06416b0

Please sign in to comment.