Showing 4,841 of 7,782 total issues
Method getMethod
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static Method getMethod(Class<?> type, Method m) {
if (m == null || Modifier.isPublic(type.getModifiers())) {
return m;
}
Class<?>[] inf = type.getInterfaces();
Method addContainer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Listen("onClick = #addContainer")
public void addContainer() {
final Div container = new Div();
container.setStyle("border: 1px solid red");
Method render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void render(Treeitem treeitem, Object data, int index) throws Exception {
Treerow row;
if(treeitem.getTreerow()==null){// tree row not create yet.
row = new Treerow();
row.setParent(treeitem);
Method getValidator1
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Validator getValidator1(){
return new Validator() {
public void validate(ValidationContext ctx) {
Boolean v1 = (Boolean)ctx.getBindContext().getBindingArg("v1");
Boolean v2 = (Boolean)ctx.getBindContext().getBindingArg("v2");
Method lookup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public <T extends Event> EventQueue<T> lookup(String name, String scope, boolean autoCreate) {
final boolean bAppScope = EventQueues.APPLICATION.equals(scope);
final boolean bSessionScope = EventQueues.SESSION.equals(scope);
Method renderProperties
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
super.renderProperties(renderer);
if (_auxinf != null) {
render(renderer, "width", _auxinf.width);
Method fillUpIndexMap
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private Map<Component, Integer> fillUpIndexMap(Component first, Component last) {
if (first == null) // last will be null too
return getIndexMap(getShadowHostIfAny());
Component parent = first.getParent();
if (parent == null)
Method parseAttribute
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void parseAttribute(PageDefinition pgdef, ComponentInfo parent, Element el, AnnotationHelper annHelper)
throws Exception {
if (el.getAttributeItem("forEach") != null)
throw new UiException(message("forEach not applicable to attribute", el));
Method setPage0
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void setPage0(Page page) {
if (page == _page)
return; //nothing changed
//assert _parent == null || _parent.getPage() == page;
Method initClone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void initClone(AbstractComponent owner, AuxInfo clone) {
//spaceinfo (after children is cloned)
if (spaceInfo != null) {
clone.spaceInfo = owner.new SpaceInfo();
owner.cloneSpaceInfoFrom(spaceInfo);
Method newComponent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Component newComponent(Page page, Component parent, ShadowInfo compInfo, Component insertBefore) {
final Component comp = compInfo.newInstance(page, parent);
Utils.setShadowInfo(comp, compInfo);
Object currentInfo = ShadowElementsCtrl.getCurrentInfo();
Method addListener
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void addListener(Object listener) {
boolean added = false;
if (listener instanceof EventInterceptor) {
_eis.addEventInterceptor((EventInterceptor) listener);
added = true;
Method resumeAll
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void resumeAll(Desktop desktop, UiVisualizer uv, List<Throwable> errs) {
//We have to loop because a resumed thread might resume others
while (!_resumed.isEmpty()) { //no need to sync (better performance)
final List<EventProcessingThreadImpl> list;
synchronized (_resumed) {
Method parseRequest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static AuDecoder parseRequest(HttpServletRequest request, AuDecoder decoder) {
Map<String, Object> params = getFileuploadMetaPerWebApp(
WebApps.getCurrent());
AbstractFileUpload upload = newServletDiskFileUpload(new DiskFileItemFactory.Builder()
.setBufferSize((Integer) params.get("sizeThreadHold"))
Method getFileuploadMetaPerWebApp
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Map<String, Object> getFileuploadMetaPerWebApp(WebApp webApp) {
final Map<String, Object> params = new HashMap<String, Object>();
final Configuration conf = webApp.getConfiguration();
int thrs = conf.getFileSizeThreshold();
Method reconstructPacket
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Object reconstructPacket(Object data, Map<String, Object> reqData, Desktop desktop,
Map<String, Object> params) throws IOException {
if (data instanceof List) {
int i = 0;
List listData = (List) data;
Method readObject
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
if (s.readBoolean()) {
BSHInterpreter.read(new NameSpace(null, null, "nst") {
Method get
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Object get(ContextType type) {
switch (type) {
//bind contexts
case BIND_CONTEXT:
return _bindContext;
Method visitMethod
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private MethodCollector visitMethod(int access, String name, String desc) {
// already found the method, skip any processing
if (collector != null) {
return null;
}
Method createKey
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static Object createKey(Object obj) {
if (obj == null) {
return NULL;
}
if (!obj.getClass().isArray()) {