Current implementation of findViewById() :
public class View {
public final View findViewById(int id) {
if (id < 0) {
return null;
}
return findViewTraversal(id);
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.content.ContextWrapper; | |
import android.os.Bundle; | |
import android.os.Looper; | |
import android.os.MessageQueue; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.ViewTreeObserver; |
import java.util.List; | |
public class Test<T> { | |
public static String getFirst(Test test) { | |
return test.strings.get(0); | |
} | |
List<String> strings; | |
} |
JSP Processing Error | |
HTTP Error Code: 500 | |
Error Message: | |
JSPG0049E: /US/fr/local/rebooking/standard/rbk_standard_recap.jsp failed to compile : | |
JSPG0091E: An error occurred at line: 403 in the file: /US/fr/local/rebooking/standard/rbk_standard_recap.jsp | |
JSPG0093E: Generated servlet error from file: /US/fr/local/rebooking/standard/rbk_standard_recap.jsp | |
/exploit/was6/prd/cells/ASQVIPB2CB01/temp/qvipb2cb01n7/WVPB2CB01b2c_bServer_n7s4/WVPB2CB01b2c_b_B2CEAR_App/B2CWeb.war/US/fr/local/rebooking/standard/_rbk_5F_standard_5F_recap.java : 2291 : The method isConfirmationRecap() is undefined for the type RecapRbkDisplayBean | |
JSPG0091E: An error occurred at line: 816 in the file: /US/fr/local/rebooking/standard/rbk_standard_recap.jsp |
Current implementation of findViewById() :
public class View {
public final View findViewById(int id) {
if (id < 0) {
return null;
}
return findViewTraversal(id);
public class ThreadPreconditions { | |
public static void checkOnMainThread() { | |
if (BuildConfig.DEBUG) { | |
if (Thread.currentThread() != Looper.getMainLooper().getThread()) { | |
throw new IllegalStateException("This method should be called from the Main Thread"); | |
} | |
} | |
} | |
} |
// Copyright 2012 Pierre-Yves Ricau | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
// use this file except in compliance with the License. You may obtain a copy of | |
// the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
public class DrawableUtils { | |
/** | |
* @see #fixTexturesInLayerDrawable(Drawable) | |
*/ | |
public static void fixBackgroundTextures(View view) { | |
fixTexturesInLayerDrawable(view.getBackground()); | |
} | |
/** |
Android DDD (Diet Driven Development)! | |
Is your Android code growing big and fat? | |
It's time for a slim down: with AndroidAnnotations, you will lose 42% LOC in a few hours, money-back guaranteed! Oh, by the way... it's | |
Open Source! | |
Try it now, it works! | |
Why are we writing the same Android code over and over again? Why are our apps harder and harder to maintain? Context and Activity god |
public class Strip { | |
public static void main(String[] args) { | |
// outputs "Hello world!" | |
System.out.println(stripHtmlTags("Hello <b>world</b><img src='somewhere'/>!")); | |
} | |
public static String stripHtmlTags(String input) { | |
StringBuilder sb = new StringBuilder(input.length()); |
import static java.util.Arrays.asList; | |
import static org.fest.assertions.Assertions.assertThat; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.Random; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; |