I get you now. It seems odd (to me) that we would deprecate one method and then a second another method that delegates to the first deprecated one but with the exact same signature. It feels confusing. Maybe it's just me of course ;-)
To complete the deprecation story of getContextMap(), we could add a getContextData() to BasicLogEventEntity and use that. Otherwise, it feels like a dangling thingy. Gary On Fri, Nov 18, 2016 at 11:09 PM, Remko Popma <remko.po...@gmail.com> wrote: > Sorry I was unclear. > Usually we deprecate one method when we offer a better alternative. > > Does BasicLogEventEntity have a getContextData() method that would be the > newly preferred method for client code to use instead of > BasicLogEventEntity.getContextMap()? > If so then deprecating BasicLogEventEntity.getContextMap() is a good > idea. > If not then suppressing the warning is better. > > Sent from my iPhone > > On 19 Nov 2016, at 15:32, Gary Gregory <garydgreg...@gmail.com> wrote: > > I'm not sure we are talking about the same thing here. > > I am suggesting we replace "@SuppressWarnings("deprecation")" with > "@Deprecated" in this once method. > > Gary > > > On Fri, Nov 18, 2016 at 7:02 PM, Remko Popma <remko.po...@gmail.com> > wrote: > >> Not sure if we actually provide a converter for the new getContextData() >> method (as an alternative to the deprecated method). If we do then that's a >> good idea. >> >> Sent from my iPhone >> >> On 19 Nov 2016, at 10:33, Gary Gregory <garydgreg...@gmail.com> wrote: >> >> Question: For methods like org.apache.logging.log4j.core. >> appender.db.jpa.BasicLogEventEntity.getContextMap(): >> >> @SuppressWarnings("deprecation") >> @Override >> @Convert(converter = ContextMapAttributeConverter.class) >> public Map<String, String> getContextMap() { >> return this.getWrappedEvent().getContextMap(); >> } >> >> Why not just do: >> >> @Deprecated >> @Override >> @Convert(converter = ContextMapAttributeConverter.class) >> public Map<String, String> getContextMap() { >> return this.getWrappedEvent().getContextMap(); >> } >> >> That avoids suppressing a warning. >> >> Thoughts? >> >> Gary >> >> >> On Fri, Nov 18, 2016 at 5:05 PM, Remko Popma <remko.po...@gmail.com> >> wrote: >> >>> Done. >>> >>> On Fri, Nov 18, 2016 at 9:59 AM, Gary Gregory <garydgreg...@gmail.com> >>> wrote: >>> >>>> Whatever it takes ;-) >>>> >>>> Gary [AFK] >>>> >>>> On Nov 17, 2016 4:56 PM, "Matt Sicker" <boa...@gmail.com> wrote: >>>> >>>>> So do these just need to be refactored to use the new >>>>> ContextDataInjector class, or is it something else? >>>>> >>>>> On 17 November 2016 at 17:52, Gary Gregory <garydgreg...@gmail.com> >>>>> wrote: >>>>> >>>>>> On Thu, Nov 17, 2016 at 3:41 PM, Remko Popma <remko.po...@gmail.com> >>>>>> wrote: >>>>>> >>>>>>> (Away from PC) I think the only place where the Map interface is >>>>>>> still used is in FlumeAppender and there it made sense to leave it a jdk >>>>>>> map if I remember correctly. >>>>>>> >>>>>>> Where are you seeing compiler warnings? >>>>>>> >>>>>> >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> BasicLogEventEntity.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/appender/db/jpa line 238 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> CsvLogEventLayout.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/layout line 94 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> FlumeEvent.java /log4j-flume-ng/src/main/java/ >>>>>> org/apache/logging/log4j/flume/appender line 92 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> HtmlLayout.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/layout line 199 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> HtmlLayout.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/layout line 199 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> HtmlLayout.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/layout line 203 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> Log4j1XmlLayout.java /log4j-1.2-api/src/main/java/o >>>>>> rg/apache/log4j/layout line 139 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> Log4jLogEventTest.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/impl line 451 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> LogEventFixtures.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/layout line 88 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> LogEventFixtures.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/layout line 88 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> MapRewritePolicyTest.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/appender/rewrite line 169 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> MapRewritePolicyTest.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/appender/rewrite line 169 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> NoSqlDatabaseManager.java /log4j-nosql/src/main/java/org >>>>>> /apache/logging/log4j/nosql/appender line 122 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> PropertiesRewritePolicy.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/appender/rewrite line 67 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> ReusableLogEventFactoryTest.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/impl line 125 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> Rfc5424Layout.java /log4j-core/src/main/java/org/ >>>>>> apache/logging/log4j/core/layout line 364 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> RingBufferLogEventTest.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/async line 166 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> SocketAppenderTest.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/appender line 159 >>>>>> The method getContextMap() from the type LogEvent is deprecated >>>>>> TestBaseEntity.java /log4j-core/src/test/java/org/ >>>>>> apache/logging/log4j/core/appender/db/jpa line 160 >>>>>> >>>>>> >>>>>> >>>>>>> Are you talking about the tests? >>>>>>> >>>>>> >>>>>> A few are in the tests (see above). >>>>>> >>>>>> Gary >>>>>> >>>>>> >>>>>>> >>>>>>> Sent from my iPhone >>>>>>> >>>>>>> On 18 Nov 2016, at 5:01, Gary Gregory <garydgreg...@gmail.com> >>>>>>> wrote: >>>>>>> >>>>>>> Ping? Could whomever deprecated this API fix all the call sites SVP? >>>>>>> >>>>>>> We do get an awful lot of compiler warnings... >>>>>>> >>>>>>> Gary >>>>>>> >>>>>>> On Sat, Nov 12, 2016 at 1:45 AM, Gary Gregory < >>>>>>> garydgreg...@gmail.com> wrote: >>>>>>> >>>>>>>> Is there search and replace to fix all of these? >>>>>>>> >>>>>>>> Gary >>>>>>>> >>>>>>>> -- >>>>>>>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org >>>>>>>> Java Persistence with Hibernate, Second Edition >>>>>>>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> >>>>>>>> >>>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> >>>>>>>> JUnit in Action, Second Edition >>>>>>>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> >>>>>>>> >>>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> >>>>>>>> Spring Batch in Action >>>>>>>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> >>>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> >>>>>>>> Blog: http://garygregory.wordpress.com >>>>>>>> Home: http://garygregory.com/ >>>>>>>> Tweet! http://twitter.com/GaryGregory >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org >>>>>>> Java Persistence with Hibernate, Second Edition >>>>>>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> >>>>>>> >>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> >>>>>>> JUnit in Action, Second Edition >>>>>>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> >>>>>>> >>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> >>>>>>> Spring Batch in Action >>>>>>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> >>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> >>>>>>> Blog: http://garygregory.wordpress.com >>>>>>> Home: http://garygregory.com/ >>>>>>> Tweet! http://twitter.com/GaryGregory >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org >>>>>> Java Persistence with Hibernate, Second Edition >>>>>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> >>>>>> >>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> >>>>>> JUnit in Action, Second Edition >>>>>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> >>>>>> >>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> >>>>>> Spring Batch in Action >>>>>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> >>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> >>>>>> Blog: http://garygregory.wordpress.com >>>>>> Home: http://garygregory.com/ >>>>>> Tweet! http://twitter.com/GaryGregory >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Matt Sicker <boa...@gmail.com> >>>>> >>>> >>> >> >> >> -- >> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org >> Java Persistence with Hibernate, Second Edition >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> >> JUnit in Action, Second Edition >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> >> Spring Batch in Action >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory >> >> > > > -- > E-Mail: garydgreg...@gmail.com | ggreg...@apache.org > Java Persistence with Hibernate, Second Edition > <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> > JUnit in Action, Second Edition > <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> > Spring Batch in Action > <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> JUnit in Action, Second Edition <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> Spring Batch in Action <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory