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/org/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 >>>>>>>> JUnit in Action, Second Edition >>>>>>>> Spring Batch in Action >>>>>>>> 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 >>>>>>> JUnit in Action, Second Edition >>>>>>> Spring Batch in Action >>>>>>> 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 >>>>> JUnit in Action, Second Edition >>>>> Spring Batch in Action >>>>> 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 > JUnit in Action, Second Edition > Spring Batch in Action > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory