You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/11/17 22:42:27 UTC

svn commit: r1542836 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Author: markt
Date: Sun Nov 17 21:42:26 2013
New Revision: 1542836

URL: http://svn.apache.org/r1542836
Log:
Revert part of r1542565 which added rather than removed an IDE warning

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542836&r1=1542835&r2=1542836&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sun Nov 17 21:42:26 2013
@@ -138,7 +138,8 @@ class TagLibraryInfoImpl extends TagLibr
                 // Add TLD within the JAR to the dependency list
                 String entryName = tldResourcePath.getEntryName();
                 try {
-                    pageInfo.addDependant(jar.getURL(entryName), jar.getLastModified(entryName));
+                    pageInfo.addDependant(jar.getURL(entryName),
+                            Long.valueOf(jar.getLastModified(entryName)));
                 } catch (IOException ioe) {
                     throw new JasperException(ioe);
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Coding styles...

Posted by Jeremy Boynes <jb...@apache.org>.
On Nov 17, 2013, at 2:33 PM, Konstantin Kolinko <kn...@gmail.com> wrote:

> 2013/11/18 Mark Thomas <ma...@apache.org>:
...
>> 
>> The coding standard used in Tomcat is that all boxing and unboxing must
>> be explicit. The second parameter in the addDependant() method is a Long
>> so the long must be explicitly converted.
>> 
> 
> +1
> 
> By the way,
> the settings for Eclipse IDE are documented here:
> 
> http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt?view=markup

Not all of us use Eclipse and relying on the IDE's defaults is ambiguous. I added an export from IDE for the settings I'm using but don't know what else is needed.

For things that aren't checked in the build, can we please document them somewhere.
Thanks
Jeremy

Re: svn commit: r1542836 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/11/18 Mark Thomas <ma...@apache.org>:
> On 17/11/2013 22:25, Nick Williams wrote:
>>
>> On Nov 17, 2013, at 4:10 PM, Jeremy Boynes wrote:
>>
>>> On Nov 17, 2013, at 1:42 PM, markt@apache.org wrote:
>>>
>>>> Author: markt
>>>> Date: Sun Nov 17 21:42:26 2013
>>>> New Revision: 1542836
>>>>
>>>> URL: http://svn.apache.org/r1542836
>>>> Log:
>>>> Revert part of r1542565 which added rather than removed an IDE warning
>>>>
>>>> Modified:
>>>>   tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
>>>>
>>>> Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
>>>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542836&r1=1542835&r2=1542836&view=diff
>>>> ==============================================================================
>>>> --- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
>>>> +++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sun Nov 17 21:42:26 2013
>>>> @@ -138,7 +138,8 @@ class TagLibraryInfoImpl extends TagLibr
>>>>                // Add TLD within the JAR to the dependency list
>>>>                String entryName = tldResourcePath.getEntryName();
>>>>                try {
>>>> -                    pageInfo.addDependant(jar.getURL(entryName), jar.getLastModified(entryName));
>>>> +                    pageInfo.addDependant(jar.getURL(entryName),
>>>> +                            Long.valueOf(jar.getLastModified(entryName)));
>>>>                } catch (IOException ioe) {
>>>>                    throw new JasperException(ioe);
>>>>                }
>>>
>>> Hmm, differences in IDE's opinion I assume - with this IDEA gives me a warning about unnecessary boxing and nothing without. What are you seeing?
>>
>> Yea, by all rules of Java boxing that I'm aware of, the use of Long.valueOf() here is unnecessary boxing. Not sure why your IDE is saying it's necessary.
>
> The coding standard used in Tomcat is that all boxing and unboxing must
> be explicit. The second parameter in the addDependant() method is a Long
> so the long must be explicitly converted.
>

+1

By the way,
the settings for Eclipse IDE are documented here:

http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt?view=markup

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1542836 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Posted by Mark Thomas <ma...@apache.org>.
On 17/11/2013 22:25, Nick Williams wrote:
> 
> On Nov 17, 2013, at 4:10 PM, Jeremy Boynes wrote:
> 
>> On Nov 17, 2013, at 1:42 PM, markt@apache.org wrote:
>>
>>> Author: markt
>>> Date: Sun Nov 17 21:42:26 2013
>>> New Revision: 1542836
>>>
>>> URL: http://svn.apache.org/r1542836
>>> Log:
>>> Revert part of r1542565 which added rather than removed an IDE warning
>>>
>>> Modified:
>>>   tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
>>>
>>> Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
>>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542836&r1=1542835&r2=1542836&view=diff
>>> ==============================================================================
>>> --- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
>>> +++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sun Nov 17 21:42:26 2013
>>> @@ -138,7 +138,8 @@ class TagLibraryInfoImpl extends TagLibr
>>>                // Add TLD within the JAR to the dependency list
>>>                String entryName = tldResourcePath.getEntryName();
>>>                try {
>>> -                    pageInfo.addDependant(jar.getURL(entryName), jar.getLastModified(entryName));
>>> +                    pageInfo.addDependant(jar.getURL(entryName),
>>> +                            Long.valueOf(jar.getLastModified(entryName)));
>>>                } catch (IOException ioe) {
>>>                    throw new JasperException(ioe);
>>>                }
>>
>> Hmm, differences in IDE's opinion I assume - with this IDEA gives me a warning about unnecessary boxing and nothing without. What are you seeing?
> 
> Yea, by all rules of Java boxing that I'm aware of, the use of Long.valueOf() here is unnecessary boxing. Not sure why your IDE is saying it's necessary.

The coding standard used in Tomcat is that all boxing and unboxing must
be explicit. The second parameter in the addDependant() method is a Long
so the long must be explicitly converted.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1542836 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Posted by Nick Williams <ni...@nicholaswilliams.net>.
On Nov 17, 2013, at 4:10 PM, Jeremy Boynes wrote:

> On Nov 17, 2013, at 1:42 PM, markt@apache.org wrote:
> 
>> Author: markt
>> Date: Sun Nov 17 21:42:26 2013
>> New Revision: 1542836
>> 
>> URL: http://svn.apache.org/r1542836
>> Log:
>> Revert part of r1542565 which added rather than removed an IDE warning
>> 
>> Modified:
>>   tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
>> 
>> Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542836&r1=1542835&r2=1542836&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
>> +++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sun Nov 17 21:42:26 2013
>> @@ -138,7 +138,8 @@ class TagLibraryInfoImpl extends TagLibr
>>                // Add TLD within the JAR to the dependency list
>>                String entryName = tldResourcePath.getEntryName();
>>                try {
>> -                    pageInfo.addDependant(jar.getURL(entryName), jar.getLastModified(entryName));
>> +                    pageInfo.addDependant(jar.getURL(entryName),
>> +                            Long.valueOf(jar.getLastModified(entryName)));
>>                } catch (IOException ioe) {
>>                    throw new JasperException(ioe);
>>                }
> 
> Hmm, differences in IDE's opinion I assume - with this IDEA gives me a warning about unnecessary boxing and nothing without. What are you seeing?

Yea, by all rules of Java boxing that I'm aware of, the use of Long.valueOf() here is unnecessary boxing. Not sure why your IDE is saying it's necessary.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1542836 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Posted by Jeremy Boynes <jb...@apache.org>.
On Nov 17, 2013, at 1:42 PM, markt@apache.org wrote:

> Author: markt
> Date: Sun Nov 17 21:42:26 2013
> New Revision: 1542836
> 
> URL: http://svn.apache.org/r1542836
> Log:
> Revert part of r1542565 which added rather than removed an IDE warning
> 
> Modified:
>    tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
> 
> Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542836&r1=1542835&r2=1542836&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
> +++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sun Nov 17 21:42:26 2013
> @@ -138,7 +138,8 @@ class TagLibraryInfoImpl extends TagLibr
>                 // Add TLD within the JAR to the dependency list
>                 String entryName = tldResourcePath.getEntryName();
>                 try {
> -                    pageInfo.addDependant(jar.getURL(entryName), jar.getLastModified(entryName));
> +                    pageInfo.addDependant(jar.getURL(entryName),
> +                            Long.valueOf(jar.getLastModified(entryName)));
>                 } catch (IOException ioe) {
>                     throw new JasperException(ioe);
>                 }

Hmm, differences in IDE's opinion I assume - with this IDEA gives me a warning about unnecessary boxing and nothing without. What are you seeing?