You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Stepan Mishura (JIRA)" <ji...@apache.org> on 2006/05/10 08:13:05 UTC

[jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes

     [ http://issues.apache.org/jira/browse/HARMONY-454?page=all ]
     
Stepan Mishura resolved HARMONY-454:
------------------------------------

    Resolution: Fixed

Hi Nathan,

Fixed in LUNI module at repo revision 405648. Please check that the fix resolved your issue.

Comments to the fix:
1) According to the spec. Set extends Collection that in turn extends Iterable. So Iterable is already superinterface for Set and IMHO we shouldn't extend it explicitly again i.e. the following is not required:
-public interface Set<E> extends Collection<E> {
+public interface Set<E> extends Collection<E>, Iterable<E> {
2) To avoid casting while-loop was replaced with for-loop. Could you review the change?

Thanks,
Stepan.

> [classlib][luni] java.util.Set generics uplift and related changes
> ------------------------------------------------------------------
>
>          Key: HARMONY-454
>          URL: http://issues.apache.org/jira/browse/HARMONY-454
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Nathan Beyer
>     Assignee: Stepan Mishura
>  Attachments: Set_etc_generics_patch.txt
>
> Complete java.util.Set generification and subsequent changes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes)

Posted by Stepan Mishura <st...@gmail.com>.
On 5/10/06, Tim Ellison wrote:
>
> Stepan Mishura (JIRA) wrote:
> <snip>
> > 2) To avoid casting while-loop was replaced with for-loop. Could you
> review the change?
>
> I was scratching my head about this cast, so I was very pleased to see
> your elegant solution.
>
> I must admit that I don't really understand why the for-loop version is
> inherently different (other than it 'hides' the casting) -- but I've
> learned a new pattern there :-)


Well, as far as I understand new for-loop version was designed to simplify
iteration on collections so I just applied it for this case - nothing
outstanding. However a side effect of 'hiding' the cast was some kind of
disclosure for me.

 Frankly speaking, I also don't understands some aspects of using
generics :-)

Thanks,
Stepan


Regards,
> Tim
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Thanks,
Stepan Mishura
Intel Middleware Products Division

------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

RE: [classlib] generics puzzler (was: Re: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes))

Posted by Nathan Beyer <nb...@kc.rr.com>.
For anyone interested, I finally figured out the answer to this puzzle.

The following code compiles without error or warning using the new foreach
loop.

for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
	entry.toString();
}

The way to make this work without a compile error or warning and use an
Iterator, you have to declare the Iterator just right.

Iterator<? extends Map.Entry<? extends K, ? extends V>> it =
t.entrySet().iterator();
while(it.hasNext()) {
	Map.Entry<? extends K, ? extends V> entry = it.next();
}

The key is the "? extends" before the Map.Entry declaration.

-Nathan

> -----Original Message-----
> From: Tim Ellison [mailto:t.p.ellison@gmail.com]
> Sent: Thursday, May 11, 2006 3:30 AM
> To: harmony-dev@incubator.apache.org
> Subject: [classlib] generics puzzler (was: Re: Thanks Stepan! (was: Re:
> [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics
> uplift and related changes))
> 
> But the question remains in my mind whether there is any generic type
> definition you could write that would allow you to cast the  entrySet()
> to a "Set<Map.Entry<capture-of ? extends K, capture-of ? extends V>>"
> equivalent?
> 
> To put it another way, I would expect that
> 	for (Map.Entry<? extends K, ? extends V> entry : map.entrySet())
> 
> should complain that the declaration of 'entry' is not compatible with
> the 'capture-of ? extends K' etc.
> 
> (It's still a useful cheat though)
> 
> Regards,
> Tim
> 
> 
> Neil Bartlett wrote:
> > Nathan,
> >
> > It's a tricky one to be sure.
> >
> > The problem is that the entrySet() method is returning a
> > "Set<Map.Entry<capture-of ? extends K, capture-of ? extends V>>",
> > which is incompatible with the type "Set<Map.Entry<? extends K, ?
> > extends V>>". It's easier to describe why if I drop the "extends K"
> > and "extends V" part. So we have "Set<Map.Entry<?, ?>" and
> > "Set<Map.Entry<capture-of ?, capture-of ?>>".
> >
> > The first one, "Set<Map.Entry<?, ?>>" is a set of Map.Entries of
> > different types - ie it is a heterogeneous collection. It could
> > contain a Map.Entry<Long, Date> and a Map.Entry<String, ResultSet>>
> > and any other pair of types, all in the same set.
> >
> > On the other hand, "Set<Map.Entry<capture-of ?, capture-of ?>>" is a
> > homogenous collection of the same (albeit unknown) pair of types. Eg
> > it might be a Set<Map.Entry<Long, Date>>, so all of the entries in the
> > set MUST be Map.Entry<Long, Date>.
> >
> > In general, even if you could assign this to a local variable without
> > unchecked type safety warnings, you wouldn't be able to call any
> > methods on it because the compiler cannot check whether the access is
> > type-safe. For example you would not be able to call add() because the
> > Set must contain a specific type, but the compiler doesn't know which
> > specific type that is!
> >
> > Regards
> > Neil
> >
> > On 5/11/06, Nathan Beyer <nb...@kc.rr.com> wrote:
> >> Does someone understand why this works this way? This seems so odd. I
> >> know
> >> there are quirks to the generics syntax, but this in an edge I haven't
> >> run
> >> into yet. I haven't been able to make this one click in my head yet.
> >>
> >> This compiles fine:
> >>         public synchronized void putAll(Map<? extends K,? extends V>
> >> map) {
> >>         for (Map.Entry<? extends K,? extends V> entry : map.entrySet())
> {
> >>               ...
> >>         }
> >>         }
> >>
> >> This won't compile at all:
> >>         public synchronized void putAll(Map<? extends K,? extends V>
> >> map) {
> >>         Set<Map.Entry<? extends K, ? extends V>> entries =
> >> map.entrySet();
> >>         ...
> >>       }
> >> The error is: Type mismatch: cannot convert from
> >> Set<Map.Entry<capture-of ?
> >> extends K,capture-of ? extends V>> to Set<Map.Entry<? extends K,?
> extends
> >> V>>
> >> The suggested quick fix in Eclipse is "Set<?> entries = ...".
> >>
> >> This reports a warning:
> >>         public synchronized void putAll(Map<? extends K,? extends V>
> >> map) {
> >>         Map<K,V> map2 = (Map<K,V>)map;
> >>       }
> >> The warning is: Type safety: The cast from Map<capture-of ? extends
> >> K,capture-of ? extends V> to Map<K,V> is actually checking against the
> >> erased type Map
> >> The suggested quick fix in Eclipse is to the annotation:
> >> @SuppressWarnings("unchecked").
> >>
> >> -Nathan
> >>
> >>
> >> > -----Original Message-----
> >> > From: Tim Ellison [mailto:t.p.ellison@gmail.com]
> >> > Sent: Wednesday, May 10, 2006 6:59 AM
> >> > To: harmony-dev@incubator.apache.org
> >> > Subject: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454)
> >> > [classlib][luni] java.util.Set generics uplift and related changes)
> >> >
> >> > Stepan Mishura (JIRA) wrote:
> >> > <snip>
> >> > > 2) To avoid casting while-loop was replaced with for-loop. Could
> you
> >> > review the change?
> >> >
> >> > I was scratching my head about this cast, so I was very pleased to
> see
> >> > your elegant solution.
> >> >
> >> > I must admit that I don't really understand why the for-loop version
> is
> >> > inherently different (other than it 'hides' the casting) -- but I've
> >> > learned a new pattern there :-)
> >> >
> >> > Regards,
> >> > Tim
> >> >
> >> > --
> >> >
> >> > Tim Ellison (t.p.ellison@gmail.com)
> >> > IBM Java technology centre, UK.
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> > For additional commands, e-mail: harmony-dev-
> help@incubator.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >>
> >>
> >
> >
> 
> --
> 
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


[classlib] generics puzzler (was: Re: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes))

Posted by Tim Ellison <t....@gmail.com>.
But the question remains in my mind whether there is any generic type
definition you could write that would allow you to cast the  entrySet()
to a "Set<Map.Entry<capture-of ? extends K, capture-of ? extends V>>"
equivalent?

To put it another way, I would expect that
	for (Map.Entry<? extends K, ? extends V> entry : map.entrySet())

should complain that the declaration of 'entry' is not compatible with
the 'capture-of ? extends K' etc.

(It's still a useful cheat though)

Regards,
Tim


Neil Bartlett wrote:
> Nathan,
> 
> It's a tricky one to be sure.
> 
> The problem is that the entrySet() method is returning a
> "Set<Map.Entry<capture-of ? extends K, capture-of ? extends V>>",
> which is incompatible with the type "Set<Map.Entry<? extends K, ?
> extends V>>". It's easier to describe why if I drop the "extends K"
> and "extends V" part. So we have "Set<Map.Entry<?, ?>" and
> "Set<Map.Entry<capture-of ?, capture-of ?>>".
> 
> The first one, "Set<Map.Entry<?, ?>>" is a set of Map.Entries of
> different types - ie it is a heterogeneous collection. It could
> contain a Map.Entry<Long, Date> and a Map.Entry<String, ResultSet>>
> and any other pair of types, all in the same set.
> 
> On the other hand, "Set<Map.Entry<capture-of ?, capture-of ?>>" is a
> homogenous collection of the same (albeit unknown) pair of types. Eg
> it might be a Set<Map.Entry<Long, Date>>, so all of the entries in the
> set MUST be Map.Entry<Long, Date>.
> 
> In general, even if you could assign this to a local variable without
> unchecked type safety warnings, you wouldn't be able to call any
> methods on it because the compiler cannot check whether the access is
> type-safe. For example you would not be able to call add() because the
> Set must contain a specific type, but the compiler doesn't know which
> specific type that is!
> 
> Regards
> Neil
> 
> On 5/11/06, Nathan Beyer <nb...@kc.rr.com> wrote:
>> Does someone understand why this works this way? This seems so odd. I
>> know
>> there are quirks to the generics syntax, but this in an edge I haven't
>> run
>> into yet. I haven't been able to make this one click in my head yet.
>>
>> This compiles fine:
>>         public synchronized void putAll(Map<? extends K,? extends V>
>> map) {
>>         for (Map.Entry<? extends K,? extends V> entry : map.entrySet()) {
>>               ...
>>         }
>>         }
>>
>> This won't compile at all:
>>         public synchronized void putAll(Map<? extends K,? extends V>
>> map) {
>>         Set<Map.Entry<? extends K, ? extends V>> entries =
>> map.entrySet();
>>         ...
>>       }
>> The error is: Type mismatch: cannot convert from
>> Set<Map.Entry<capture-of ?
>> extends K,capture-of ? extends V>> to Set<Map.Entry<? extends K,? extends
>> V>>
>> The suggested quick fix in Eclipse is "Set<?> entries = ...".
>>
>> This reports a warning:
>>         public synchronized void putAll(Map<? extends K,? extends V>
>> map) {
>>         Map<K,V> map2 = (Map<K,V>)map;
>>       }
>> The warning is: Type safety: The cast from Map<capture-of ? extends
>> K,capture-of ? extends V> to Map<K,V> is actually checking against the
>> erased type Map
>> The suggested quick fix in Eclipse is to the annotation:
>> @SuppressWarnings("unchecked").
>>
>> -Nathan
>>
>>
>> > -----Original Message-----
>> > From: Tim Ellison [mailto:t.p.ellison@gmail.com]
>> > Sent: Wednesday, May 10, 2006 6:59 AM
>> > To: harmony-dev@incubator.apache.org
>> > Subject: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454)
>> > [classlib][luni] java.util.Set generics uplift and related changes)
>> >
>> > Stepan Mishura (JIRA) wrote:
>> > <snip>
>> > > 2) To avoid casting while-loop was replaced with for-loop. Could you
>> > review the change?
>> >
>> > I was scratching my head about this cast, so I was very pleased to see
>> > your elegant solution.
>> >
>> > I must admit that I don't really understand why the for-loop version is
>> > inherently different (other than it 'hides' the casting) -- but I've
>> > learned a new pattern there :-)
>> >
>> > Regards,
>> > Tim
>> >
>> > --
>> >
>> > Tim Ellison (t.p.ellison@gmail.com)
>> > IBM Java technology centre, UK.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > Terms of use : http://incubator.apache.org/harmony/mailing.html
>> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes)

Posted by Neil Bartlett <ne...@integility.com>.
Nathan,

It's a tricky one to be sure.

The problem is that the entrySet() method is returning a
"Set<Map.Entry<capture-of ? extends K, capture-of ? extends V>>",
which is incompatible with the type "Set<Map.Entry<? extends K, ?
extends V>>". It's easier to describe why if I drop the "extends K"
and "extends V" part. So we have "Set<Map.Entry<?, ?>" and
"Set<Map.Entry<capture-of ?, capture-of ?>>".

The first one, "Set<Map.Entry<?, ?>>" is a set of Map.Entries of
different types - ie it is a heterogeneous collection. It could
contain a Map.Entry<Long, Date> and a Map.Entry<String, ResultSet>>
and any other pair of types, all in the same set.

On the other hand, "Set<Map.Entry<capture-of ?, capture-of ?>>" is a
homogenous collection of the same (albeit unknown) pair of types. Eg
it might be a Set<Map.Entry<Long, Date>>, so all of the entries in the
set MUST be Map.Entry<Long, Date>.

In general, even if you could assign this to a local variable without
unchecked type safety warnings, you wouldn't be able to call any
methods on it because the compiler cannot check whether the access is
type-safe. For example you would not be able to call add() because the
Set must contain a specific type, but the compiler doesn't know which
specific type that is!

Regards
Neil

On 5/11/06, Nathan Beyer <nb...@kc.rr.com> wrote:
> Does someone understand why this works this way? This seems so odd. I know
> there are quirks to the generics syntax, but this in an edge I haven't run
> into yet. I haven't been able to make this one click in my head yet.
>
> This compiles fine:
>         public synchronized void putAll(Map<? extends K,? extends V> map) {
>         for (Map.Entry<? extends K,? extends V> entry : map.entrySet()) {
>               ...
>         }
>         }
>
> This won't compile at all:
>         public synchronized void putAll(Map<? extends K,? extends V> map) {
>         Set<Map.Entry<? extends K, ? extends V>> entries = map.entrySet();
>         ...
>       }
> The error is: Type mismatch: cannot convert from Set<Map.Entry<capture-of ?
> extends K,capture-of ? extends V>> to Set<Map.Entry<? extends K,? extends
> V>>
> The suggested quick fix in Eclipse is "Set<?> entries = ...".
>
> This reports a warning:
>         public synchronized void putAll(Map<? extends K,? extends V> map) {
>         Map<K,V> map2 = (Map<K,V>)map;
>       }
> The warning is: Type safety: The cast from Map<capture-of ? extends
> K,capture-of ? extends V> to Map<K,V> is actually checking against the
> erased type Map
> The suggested quick fix in Eclipse is to the annotation:
> @SuppressWarnings("unchecked").
>
> -Nathan
>
>
> > -----Original Message-----
> > From: Tim Ellison [mailto:t.p.ellison@gmail.com]
> > Sent: Wednesday, May 10, 2006 6:59 AM
> > To: harmony-dev@incubator.apache.org
> > Subject: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454)
> > [classlib][luni] java.util.Set generics uplift and related changes)
> >
> > Stepan Mishura (JIRA) wrote:
> > <snip>
> > > 2) To avoid casting while-loop was replaced with for-loop. Could you
> > review the change?
> >
> > I was scratching my head about this cast, so I was very pleased to see
> > your elegant solution.
> >
> > I must admit that I don't really understand why the for-loop version is
> > inherently different (other than it 'hides' the casting) -- but I've
> > learned a new pattern there :-)
> >
> > Regards,
> > Tim
> >
> > --
> >
> > Tim Ellison (t.p.ellison@gmail.com)
> > IBM Java technology centre, UK.
> >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Neil Bartlett
Senior Technical Consultant, Integility Ltd
Tel: +44 (0) 20 7043 8328
Fax: +44 (0) 20 7043 8329

LinkedIn Profile: https://www.linkedin.com/in/neilbartlett

RE: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes)

Posted by Nathan Beyer <nb...@kc.rr.com>.
Does someone understand why this works this way? This seems so odd. I know
there are quirks to the generics syntax, but this in an edge I haven't run
into yet. I haven't been able to make this one click in my head yet.

This compiles fine:
	public synchronized void putAll(Map<? extends K,? extends V> map) {
        for (Map.Entry<? extends K,? extends V> entry : map.entrySet()) {
	      ...
        }        
	}

This won't compile at all:
	public synchronized void putAll(Map<? extends K,? extends V> map) {
        Set<Map.Entry<? extends K, ? extends V>> entries = map.entrySet();
        ...
      }
The error is: Type mismatch: cannot convert from Set<Map.Entry<capture-of ?
extends K,capture-of ? extends V>> to Set<Map.Entry<? extends K,? extends
V>>
The suggested quick fix in Eclipse is "Set<?> entries = ...".

This reports a warning:
	public synchronized void putAll(Map<? extends K,? extends V> map) {
        Map<K,V> map2 = (Map<K,V>)map;
      }
The warning is: Type safety: The cast from Map<capture-of ? extends
K,capture-of ? extends V> to Map<K,V> is actually checking against the
erased type Map
The suggested quick fix in Eclipse is to the annotation:
@SuppressWarnings("unchecked").

-Nathan


> -----Original Message-----
> From: Tim Ellison [mailto:t.p.ellison@gmail.com]
> Sent: Wednesday, May 10, 2006 6:59 AM
> To: harmony-dev@incubator.apache.org
> Subject: Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454)
> [classlib][luni] java.util.Set generics uplift and related changes)
> 
> Stepan Mishura (JIRA) wrote:
> <snip>
> > 2) To avoid casting while-loop was replaced with for-loop. Could you
> review the change?
> 
> I was scratching my head about this cast, so I was very pleased to see
> your elegant solution.
> 
> I must admit that I don't really understand why the for-loop version is
> inherently different (other than it 'hides' the casting) -- but I've
> learned a new pattern there :-)
> 
> Regards,
> Tim
> 
> --
> 
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
> 
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Thanks Stepan! (was: Re: [jira] Resolved: (HARMONY-454) [classlib][luni] java.util.Set generics uplift and related changes)

Posted by Tim Ellison <t....@gmail.com>.
Stepan Mishura (JIRA) wrote:
<snip>
> 2) To avoid casting while-loop was replaced with for-loop. Could you review the change?

I was scratching my head about this cast, so I was very pleased to see
your elegant solution.

I must admit that I don't really understand why the for-loop version is
inherently different (other than it 'hides' the casting) -- but I've
learned a new pattern there :-)

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: tip: reference svn entries using rXXX (was: [jira] Resolved:....)

Posted by Stepan Mishura <st...@gmail.com>.
On 5/11/06, Leo Simons wrote:
>
> Just a random tip...
>
> On Wed, May 10, 2006 at 06:13:05AM +0000, Stepan Mishura (JIRA) wrote:
> > Fixed in LUNI module at repo revision 405648. Please check that the fix
> resolved your issue.
>
> Similarly to having eg "HARMONY-454" in the commit logs instead of "issue
> 454" so that
> it is easier to machine-parse and associated commits with issues (neat how
> jira makes
> the xref innit?), specifying SVN revisions as rXXXXX, so eg "r405648"
> makes them easier
> to machine-detect 'n stuff (specifically, the SVN team has scripts in
> contrib/ that
> operate on that principle).


No problems with inserting "rXXXXXX" instead of "repo revision XXXXXX" -
less typing.

Just random thought - I expect that revision number is the only one 6-digits
number in JIRA notification and there should be no problems with parsing
notifications. Right?

Thanks,
Stepan.

cheers!
>
> LSD
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Thanks,
Stepan Mishura
Intel Middleware Products Division

------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

Re: tip: reference svn entries using rXXX

Posted by Tim Ellison <t....@gmail.com>.
I didn't read through the details, but it does look like what I was
thinking.

Regards,
Tim

Craig Blake wrote:
> Out of the box Jira has the ability to monitor a mailing list and attach
> messages containing an issue number as comments to that issue.  That
> might do what you want.
> 
> http://www.atlassian.com/software/jira/docs/latest/issue_creation_email.html
> 
> 
> Craig
> 
> On May 11, 2006, at 1:57 AM, Tim Ellison wrote:
> 
>> Is there any way we can couple the mailing list postings to JIRA?
>>
>> I often find it hard to go back and find the -dev list discussions we
>> have had for particular issues.  If we could have links from JIRA to a
>> mail archive of subject headers containing HARMONY-XYZ tags that would
>> be great.
>>
>> Regards
>> Tim
>>
>> Leo Simons wrote:
>>> Just a random tip...
>>>
>>> On Wed, May 10, 2006 at 06:13:05AM +0000, Stepan Mishura (JIRA) wrote:
>>>> Fixed in LUNI module at repo revision 405648. Please check that the
>>>> fix resolved your issue.
>>>
>>> Similarly to having eg "HARMONY-454" in the commit logs instead of
>>> "issue 454" so that
>>> it is easier to machine-parse and associated commits with issues
>>> (neat how jira makes
>>> the xref innit?), specifying SVN revisions as rXXXXX, so eg "r405648"
>>> makes them easier
>>> to machine-detect 'n stuff (specifically, the SVN team has scripts in
>>> contrib/ that
>>> operate on that principle).
>>>
>>> cheers!
>>>
>>> LSD
>>>
>>> ---------------------------------------------------------------------
>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>
>>>
>>
>> -- 
>> Tim Ellison (t.p.ellison@gmail.com)
>> IBM Java technology centre, UK.
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: tip: reference svn entries using rXXX

Posted by Craig Blake <cr...@mac.com>.
Out of the box Jira has the ability to monitor a mailing list and  
attach messages containing an issue number as comments to that  
issue.  That might do what you want.

http://www.atlassian.com/software/jira/docs/latest/ 
issue_creation_email.html

Craig

On May 11, 2006, at 1:57 AM, Tim Ellison wrote:

> Is there any way we can couple the mailing list postings to JIRA?
>
> I often find it hard to go back and find the -dev list discussions we
> have had for particular issues.  If we could have links from JIRA to a
> mail archive of subject headers containing HARMONY-XYZ tags that would
> be great.
>
> Regards
> Tim
>
> Leo Simons wrote:
>> Just a random tip...
>>
>> On Wed, May 10, 2006 at 06:13:05AM +0000, Stepan Mishura (JIRA)  
>> wrote:
>>> Fixed in LUNI module at repo revision 405648. Please check that  
>>> the fix resolved your issue.
>>
>> Similarly to having eg "HARMONY-454" in the commit logs instead of  
>> "issue 454" so that
>> it is easier to machine-parse and associated commits with issues  
>> (neat how jira makes
>> the xref innit?), specifying SVN revisions as rXXXXX, so eg  
>> "r405648" makes them easier
>> to machine-detect 'n stuff (specifically, the SVN team has scripts  
>> in contrib/ that
>> operate on that principle).
>>
>> cheers!
>>
>> LSD
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev- 
>> help@incubator.apache.org
>>
>>
>
> -- 
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: tip: reference svn entries using rXXX

Posted by Vladimir Gorr <vv...@gmail.com>.
Often new threads are created to continue the initial discussion.

Therefore some of e-mails can be marked with different subject and remain
unnoticed.
In my opinion it'd be not bad to use the [h-XXXX] tag instead [jira] to
start the discussion.
In this case all related with the Harmony-XXXX can be easy found out by
search engine.

Thanks,
Vladimir.

On 5/11/06, Tim Ellison <t....@gmail.com> wrote:
>
> Is there any way we can couple the mailing list postings to JIRA?
>
> I often find it hard to go back and find the -dev list discussions we
> have had for particular issues.  If we could have links from JIRA to a
> mail archive of subject headers containing HARMONY-XYZ tags that would
> be great.
>
> Regards
> Tim
>
> Leo Simons wrote:
> > Just a random tip...
> >
> > On Wed, May 10, 2006 at 06:13:05AM +0000, Stepan Mishura (JIRA) wrote:
> >> Fixed in LUNI module at repo revision 405648. Please check that the fix
> resolved your issue.
> >
> > Similarly to having eg "HARMONY-454" in the commit logs instead of
> "issue 454" so that
> > it is easier to machine-parse and associated commits with issues (neat
> how jira makes
> > the xref innit?), specifying SVN revisions as rXXXXX, so eg "r405648"
> makes them easier
> > to machine-detect 'n stuff (specifically, the SVN team has scripts in
> contrib/ that
> > operate on that principle).
> >
> > cheers!
> >
> > LSD
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: tip: reference svn entries using rXXX

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Leo Simons skrev  den 11-05-2006 14:48:
> On Thu, May 11, 2006 at 09:57:04AM +0100, Tim Ellison wrote:
>   
>> Is there any way we can couple the mailing list postings to JIRA?
>>     
>
> Interesting question! I'm sure it should be possible :-)
>   
I played with JIRA the other day.  There is a facility to let JIRA 
accept mail and - based on tags - add the content as a comment to the 
tag i nquestion.

It should basically be setting up a mail account for jira, and tell JIRA 
where to get the mail

--
  Thorbjørn

Re: tip: reference svn entries using rXXX

Posted by Tim Ellison <t....@gmail.com>.
Summer of Code?!

Tim

Leo Simons wrote:
> On Thu, May 11, 2006 at 09:57:04AM +0100, Tim Ellison wrote:
>> Is there any way we can couple the mailing list postings to JIRA?
> 
> Interesting question! I'm sure it should be possible :-)
> 
>> I often find it hard to go back and find the -dev list discussions we
>> have had for particular issues.  If we could have links from JIRA to a
>> mail archive of subject headers containing HARMONY-XYZ tags that would
>> be great.
> 
> Heh, one alternative is to use a better mailer :-)
> 
> In mutt you go...
> 
> / ~s HARMONY-XYZ
> 
> and if I want to go really fancy I'll usually do
> 
>   !mairix bs:HARMONY-XYZ
>   c ~/mailsearch
> 
> to search cross-list and deeply into archives. Of course, apple users will
> just go
> 
>   apple+space HARMONY-XYZ
> 
> it'll take minutes instead of seconds but it kinda works too if you keep
> your mail volume down and use Apple Mail.
> 
> In any case, it should be possible to create a webapp tool that does
> this kind of thing, eg
> 
>   1) get list of jira prefixes
>   2) get list of mbox files
>   3) correlate using (HARMONY|INFRASTRUCTURE|MAVEN|GERONIMO|...)-[0-9]+
>      3a) collapse threads, keep only first message id in a thread
>   4) get list of mailing list corresponding to jira prefixes
>   5) for each match, construct the mail-archives.apache.org URL
>      using that list
>   6) use the jira interface to figure out whether the message id
>      was already mentioned, if not, post a comment listing the
>      message id and the mail-archives URL
> 
> Neat little task. Lets find a volunteer :-). Maybe posting to infrastructure@
> or site-dev@ will help...
> 
> LSD
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: tip: reference svn entries using rXXX

Posted by Leo Simons <ma...@leosimons.com>.
On Thu, May 11, 2006 at 09:57:04AM +0100, Tim Ellison wrote:
> Is there any way we can couple the mailing list postings to JIRA?

Interesting question! I'm sure it should be possible :-)

> I often find it hard to go back and find the -dev list discussions we
> have had for particular issues.  If we could have links from JIRA to a
> mail archive of subject headers containing HARMONY-XYZ tags that would
> be great.

Heh, one alternative is to use a better mailer :-)

In mutt you go...

/ ~s HARMONY-XYZ

and if I want to go really fancy I'll usually do

  !mairix bs:HARMONY-XYZ
  c ~/mailsearch

to search cross-list and deeply into archives. Of course, apple users will
just go

  apple+space HARMONY-XYZ

it'll take minutes instead of seconds but it kinda works too if you keep
your mail volume down and use Apple Mail.

In any case, it should be possible to create a webapp tool that does
this kind of thing, eg

  1) get list of jira prefixes
  2) get list of mbox files
  3) correlate using (HARMONY|INFRASTRUCTURE|MAVEN|GERONIMO|...)-[0-9]+
     3a) collapse threads, keep only first message id in a thread
  4) get list of mailing list corresponding to jira prefixes
  5) for each match, construct the mail-archives.apache.org URL
     using that list
  6) use the jira interface to figure out whether the message id
     was already mentioned, if not, post a comment listing the
     message id and the mail-archives URL

Neat little task. Lets find a volunteer :-). Maybe posting to infrastructure@
or site-dev@ will help...

LSD

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: tip: reference svn entries using rXXX

Posted by Tim Ellison <t....@gmail.com>.
Is there any way we can couple the mailing list postings to JIRA?

I often find it hard to go back and find the -dev list discussions we
have had for particular issues.  If we could have links from JIRA to a
mail archive of subject headers containing HARMONY-XYZ tags that would
be great.

Regards
Tim

Leo Simons wrote:
> Just a random tip...
> 
> On Wed, May 10, 2006 at 06:13:05AM +0000, Stepan Mishura (JIRA) wrote:
>> Fixed in LUNI module at repo revision 405648. Please check that the fix resolved your issue.
> 
> Similarly to having eg "HARMONY-454" in the commit logs instead of "issue 454" so that
> it is easier to machine-parse and associated commits with issues (neat how jira makes
> the xref innit?), specifying SVN revisions as rXXXXX, so eg "r405648" makes them easier
> to machine-detect 'n stuff (specifically, the SVN team has scripts in contrib/ that
> operate on that principle).
> 
> cheers!
> 
> LSD
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


tip: reference svn entries using rXXX (was: [jira] Resolved:....)

Posted by Leo Simons <ma...@leosimons.com>.
Just a random tip...

On Wed, May 10, 2006 at 06:13:05AM +0000, Stepan Mishura (JIRA) wrote:
> Fixed in LUNI module at repo revision 405648. Please check that the fix resolved your issue.

Similarly to having eg "HARMONY-454" in the commit logs instead of "issue 454" so that
it is easier to machine-parse and associated commits with issues (neat how jira makes
the xref innit?), specifying SVN revisions as rXXXXX, so eg "r405648" makes them easier
to machine-detect 'n stuff (specifically, the SVN team has scripts in contrib/ that
operate on that principle).

cheers!

LSD

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org