ASF Bugzilla – Attachment 26301 Details for
Bug 50279
Tab police
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix tabs in examples code
tabexamples.patch (text/plain), 13.94 KB, created by
Sebb
on 2010-11-16 08:28:12 UTC
(
hide
)
Description:
Fix tabs in examples code
Filename:
MIME Type:
Creator:
Sebb
Created:
2010-11-16 08:28:12 UTC
Size:
13.94 KB
patch
obsolete
>Index: examples/src/org/apache/taglibs/standard/examples/i18n/Resources.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/i18n/Resources.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/i18n/Resources.java (working copy) >@@ -23,18 +23,18 @@ > private static Object[][] contents; > > static { >- contents = new Object[][] { >- { "greetingMorning", "Good Morning!" }, >- { "greetingEvening", "Good Evening!" }, >- { "serverInfo", "Name/Version of Servlet Container: {0}, " >- + "Java Version: {1}" }, >- { "currentTime", "Current time: {0}" }, >- { "com.acme.labels.cancel", "Cancel" }, >- { "java.lang.ArithmeticException", "division by 0" } >- }; >+ contents = new Object[][] { >+ { "greetingMorning", "Good Morning!" }, >+ { "greetingEvening", "Good Evening!" }, >+ { "serverInfo", "Name/Version of Servlet Container: {0}, " >+ + "Java Version: {1}" }, >+ { "currentTime", "Current time: {0}" }, >+ { "com.acme.labels.cancel", "Cancel" }, >+ { "java.lang.ArithmeticException", "division by 0" } >+ }; > } > > public Object[][] getContents() { >- return contents; >+ return contents; > } > } >Index: examples/src/org/apache/taglibs/standard/examples/i18n/Resources_de.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/i18n/Resources_de.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/i18n/Resources_de.java (working copy) >@@ -23,18 +23,18 @@ > private static Object[][] contents; > > static { >- contents = new Object[][] { >- { "greetingMorning", "Guten Morgen!" }, >- { "greetingEvening", "Guten Abend!" }, >- { "serverInfo", "Name/Version des Servlet Containers: {0}, " >- + "Java Version: {1}" }, >- { "currentTime", "Heutiges Datum und Uhrzeit: {0}" }, >- { "com.acme.labels.cancel", "Abbrechen" }, >- { "java.lang.ArithmeticException", "/ durch 0" } >- }; >+ contents = new Object[][] { >+ { "greetingMorning", "Guten Morgen!" }, >+ { "greetingEvening", "Guten Abend!" }, >+ { "serverInfo", "Name/Version des Servlet Containers: {0}, " >+ + "Java Version: {1}" }, >+ { "currentTime", "Heutiges Datum und Uhrzeit: {0}" }, >+ { "com.acme.labels.cancel", "Abbrechen" }, >+ { "java.lang.ArithmeticException", "/ durch 0" } >+ }; > } > > public Object[][] getContents() { >- return contents; >+ return contents; > } > } >Index: examples/src/org/apache/taglibs/standard/examples/i18n/Resources_fr.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/i18n/Resources_fr.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/i18n/Resources_fr.java (working copy) >@@ -23,18 +23,18 @@ > private static Object[][] contents; > > static { >- contents = new Object[][] { >- { "greetingMorning", "Bonjour!!" }, >- { "greetingEvening", "Bonsoir!" }, >- { "serverInfo", "Nom/Version du Servlet Container: {0}, " >- + "Version Java: {1}" }, >- { "currentTime", "Nous sommes le: {0}" }, >- { "com.acme.labels.cancel", "Annuler" }, >- { "java.lang.ArithmeticException", "division par 0" } >- }; >+ contents = new Object[][] { >+ { "greetingMorning", "Bonjour!!" }, >+ { "greetingEvening", "Bonsoir!" }, >+ { "serverInfo", "Nom/Version du Servlet Container: {0}, " >+ + "Version Java: {1}" }, >+ { "currentTime", "Nous sommes le: {0}" }, >+ { "com.acme.labels.cancel", "Annuler" }, >+ { "java.lang.ArithmeticException", "division par 0" } >+ }; > } > > public Object[][] getContents() { >- return contents; >+ return contents; > } > } >Index: examples/src/org/apache/taglibs/standard/examples/i18n/Resources_it.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/i18n/Resources_it.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/i18n/Resources_it.java (working copy) >@@ -23,12 +23,12 @@ > private static Object[][] contents; > > static { >- contents = new Object[][] { >- { "greetingMorning", "Buon giorno!" } >- }; >+ contents = new Object[][] { >+ { "greetingMorning", "Buon giorno!" } >+ }; > } > > public Object[][] getContents() { >- return contents; >+ return contents; > } > } >Index: examples/src/org/apache/taglibs/standard/examples/startup/Init.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/startup/Init.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/startup/Init.java (working copy) >@@ -71,23 +71,23 @@ > "Toronto", "ON", "M5C 1Z1", "Canada"); > sce.getServletContext().setAttribute("customers", Customers.findAll()); > >- /** >- * Array of primitives (int) >- */ >- int[] intArray = new int[] {10, 20, 30, 40, 50}; >+ /** >+ * Array of primitives (int) >+ */ >+ int[] intArray = new int[] {10, 20, 30, 40, 50}; > sce.getServletContext().setAttribute("intArray", intArray); > >- /** >- * Array of Objects (String) >- */ >- String[] stringArray = new String[] { >- "A first string", >- "La deuxieme string", >- "Ella troisiemo stringo", >- }; >+ /** >+ * Array of Objects (String) >+ */ >+ String[] stringArray = new String[] { >+ "A first string", >+ "La deuxieme string", >+ "Ella troisiemo stringo", >+ }; > sce.getServletContext().setAttribute("stringArray", stringArray); > >- /** >+ /** > * String-keyed Map > */ > Hashtable stringMap = new Hashtable(); >@@ -105,38 +105,38 @@ > > /** > * Integer-keyed Map >- */ >- // we use a Hashtable so we can get an Enumeration easily, below >+ */ >+ // we use a Hashtable so we can get an Enumeration easily, below > Hashtable numberMap = new Hashtable(); >- sce.getServletContext().setAttribute("numberMap", numberMap); >- numberMap.put(new Integer(1), "uno"); >- numberMap.put(new Integer(2), "dos"); >- numberMap.put(new Integer(3), "tres"); >- numberMap.put(new Integer(4), "cuatro"); >- numberMap.put(new Integer(5), "cinco"); >- numberMap.put(new Integer(6), "seis"); >- numberMap.put(new Integer(7), "siete"); >- numberMap.put(new Integer(8), "ocho"); >- numberMap.put(new Integer(9), "nueve"); >- numberMap.put(new Integer(10), "diez"); >+ sce.getServletContext().setAttribute("numberMap", numberMap); >+ numberMap.put(new Integer(1), "uno"); >+ numberMap.put(new Integer(2), "dos"); >+ numberMap.put(new Integer(3), "tres"); >+ numberMap.put(new Integer(4), "cuatro"); >+ numberMap.put(new Integer(5), "cinco"); >+ numberMap.put(new Integer(6), "seis"); >+ numberMap.put(new Integer(7), "siete"); >+ numberMap.put(new Integer(8), "ocho"); >+ numberMap.put(new Integer(9), "nueve"); >+ numberMap.put(new Integer(10), "diez"); > >- /** >- * Enumeration >- */ >- Enumeration enum_ = numberMap.keys(); >- // don't use 'enum' for attribute name because it is a >- // reserved word in EcmaScript. >+ /** >+ * Enumeration >+ */ >+ Enumeration enum_ = numberMap.keys(); >+ // don't use 'enum' for attribute name because it is a >+ // reserved word in EcmaScript. > sce.getServletContext().setAttribute("enumeration", enum_); > >- /** >- * Message arguments for parametric replacement >- */ >- Object[] serverInfoArgs = >- new Object[] { >- sce.getServletContext().getServerInfo(), >- System.getProperty("java.version") >- }; >- sce.getServletContext().setAttribute("serverInfoArgs", serverInfoArgs); >+ /** >+ * Message arguments for parametric replacement >+ */ >+ Object[] serverInfoArgs = >+ new Object[] { >+ sce.getServletContext().getServerInfo(), >+ System.getProperty("java.version") >+ }; >+ sce.getServletContext().setAttribute("serverInfoArgs", serverInfoArgs); > } > > //********************************************************************* >Index: examples/src/org/apache/taglibs/standard/examples/taglib/LocalesTag.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/taglib/LocalesTag.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/taglib/LocalesTag.java (working copy) >@@ -34,30 +34,30 @@ > private String varTotal; > > public void setVarTotal( String value ) { >- varTotal = value; >+ varTotal = value; > } > > public void prepare() { >- pointer = 0; >- if ( varTotal!=null && varTotal.length()>0 ) { >- pageContext.setAttribute( varTotal, new Integer(locales.length) ); >- } >+ pointer = 0; >+ if ( varTotal!=null && varTotal.length()>0 ) { >+ pageContext.setAttribute( varTotal, new Integer(locales.length) ); >+ } > > } > > public boolean hasNext() { >- return pointer < locales.length; >+ return pointer < locales.length; > } > > public Object next() { >- return locales[ pointer++ ]; >+ return locales[ pointer++ ]; > } > > public void setBegin( int value ) { >- super.begin = value; >+ super.begin = value; > } > > public void setEnd( int value ) { >- super.end = value; >+ super.end = value; > } > } >Index: examples/src/org/apache/taglibs/standard/examples/taglib/NullAttributeException.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/taglib/NullAttributeException.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/taglib/NullAttributeException.java (working copy) >@@ -36,8 +36,8 @@ > * @param att The attribute value for which the error occurred. > */ > public NullAttributeException(String tag, String att) { >- super("The '" + att + "' attribute illegally evaluated to 'null' " >- + "in <" + tag + ">."); >+ super("The '" + att + "' attribute illegally evaluated to 'null' " >+ + "in <" + tag + ">."); > } > } > >Index: examples/src/org/apache/taglibs/standard/examples/util/IOBean.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/util/IOBean.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/util/IOBean.java (working copy) >@@ -31,30 +31,30 @@ > String content = null; > > public Reader getReader() throws JspException { >- //p("getReader()"); >- if (content == null) { >- if (stringWriter == null) { >- throw new JspException( >- "content must first be added to the bean via the writer"); >- } >- content = stringWriter.toString(); >- } >- return new StringReader(content); >+ //p("getReader()"); >+ if (content == null) { >+ if (stringWriter == null) { >+ throw new JspException( >+ "content must first be added to the bean via the writer"); >+ } >+ content = stringWriter.toString(); >+ } >+ return new StringReader(content); > } > > public Writer getWriter() { >- //p("getWriter()"); >- content = null; >- stringWriter = new StringWriter(); >- return stringWriter; >+ //p("getWriter()"); >+ content = null; >+ stringWriter = new StringWriter(); >+ return stringWriter; > } > > public void release() { >- stringWriter = null; >- content = null; >+ stringWriter = null; >+ content = null; > } > > private void p(String s) { >- System.out.println("[IOBean] " + s); >+ System.out.println("[IOBean] " + s); > } > } >Index: examples/src/org/apache/taglibs/standard/examples/util/ServletResponseWrapperForWriter.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/util/ServletResponseWrapperForWriter.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/util/ServletResponseWrapperForWriter.java (working copy) >@@ -45,19 +45,19 @@ > PrintWriter writer; > > public ServletResponseWrapperForWriter(ServletResponse response, >- PrintWriter writer) >+ PrintWriter writer) > { >- super((HttpServletResponse)response); >- this.writer = writer; >+ super((HttpServletResponse)response); >+ this.writer = writer; > } > > /** > * Returns the Writer associated with the response. > */ > public java.io.PrintWriter getWriter() >- throws java.io.IOException >+ throws java.io.IOException > { >- return writer; >+ return writer; > } > } > >Index: examples/src/org/apache/taglibs/standard/examples/util/Util.java >=================================================================== >--- examples/src/org/apache/taglibs/standard/examples/util/Util.java (revision 1034769) >+++ examples/src/org/apache/taglibs/standard/examples/util/Util.java (working copy) >@@ -39,7 +39,7 @@ > */ > } > throw new JspException("Invalid type '" + obj.getClass().getName() + >- "' for castToWriter()"); >+ "' for castToWriter()"); > } > > public static Reader castToReader(Object obj) throws JspException { >@@ -51,7 +51,7 @@ > return new StringReader((String)obj); > } > throw new JspException("Invalid type '" + obj.getClass().getName() + >- "' for castToReader()"); >+ "' for castToReader()"); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 50279
: 26301 |
26304