Chat Logs

  1. * Fiji joined #java
  2. * hwpplayer1 joined #java
  3. * lucerne90 joined #java
  4. jreicherNeXeN: https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/main/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java
  5. javabotjreicher's title: "eclipse.jdt.ls/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java at main 路 eclipse-jdtls/eclipse.jdt.ls 路 GitHub"
  6. jreicherPretty sure it's all there
  7. jreicherYou might have to cross-reference with https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#initialize
  8. nevetSpecification
  9. * Rainier joined #java
  10. * metalmaniac joined #java
  11. * metalmaniac joined #java
  12. * cation_ joined #java
  13. * Techcable joined #java
  14. * hwpplayer1 joined #java
  15. * michele2 joined #java
  16. * Arsen joined #java
  17. * hwpplayer1 joined #java
  18. NeXeNjreicher: ahh thanks
  19. * PyR3X_ joined #java
  20. NeXeNhrmm, i've been using this idiom to manage scope for a library i'm building. i put it in a try with resources statement and i was doing a simple try (Scope s = Scopes.get(ScopeType.WHATEVER)) { } to get scoped blocks that auto close (implementing auto closable)
  21. NeXeNwell turns out my IDE i guess shows a warning, since the local variable s isn't used anywhere.....you know it's defined in the try statement and never used because i don't need to, it just initiates a scope and is auto closable to make it clean so there's no leakage or residual scope bugs.
  22. NeXeNso i'm curious, if i replace it with var _ = Scopes.get() will the _ be ignored by the ide's "problems". i'm using a vsclone and you know that standard java plugin from redhat
  23. NeXeNjreicher: i'm wondering what harm it would be to do that. i guess none since i don't often fail to use something i defined in local scope
  24. deeboif your min version is a java version that supports _, it should be fine, we have that all over our code to specifically get around the unused variable stuff
  25. NeXeNyeah i don't have local unused vars ever hardly, but this time i chose it as a pattern to ease the headache of edge cases. allowing it to autoclose makes it so much easier and more robust
  26. deebofor that specific use case, it might even make more sens to do Scopes.get(...).inScope((_) -> ...);, or without the param if it's never needed
  27. * pr070cal joined #java
  28. deeboweird that "anonymous" try-with-resource is not supported though
  29. deeboi sort of remember using it, but looking at the code, it's always with a resource, even if not referenced, like http calls etc
  30. * Henryx joined #java
  31. * Enissay joined #java
  32. * Para joined #java
  33. * Adrian35 joined #java
  34. * acidjnk joined #java
  35. * Adrian35 joined #java
  36. * fed-kaczynski joined #java
  37. * polyrob joined #java
  38. jreicherFWIW I would also use _ in that situation, but I haven't had to do it in practice.
  39. * A_Dragon joined #java
  40. NeXeNyeah i thought about lambda, but i am specifically trying to avoid proxy objects
  41. * fgarcia_ joined #java
  42. * fgarcia__ joined #java
  43. * MikeBux joined #java
  44. * JazzJackalope9 joined #java
  45. * ChaiTRex joined #java
  46. * iusr joined #java
  47. NeXeNyup, changing everything to var _ = solves the issue. just have to state it clearly in the docs. maybe someone will come up with a good fix like a config value but whatever, works for now
  48. ParaIs it VS Code complaining or actual javac?
  49. * Cae2 joined #java
  50. * hwpplayer1 joined #java
  51. * pebble joined #java
  52. * MikeBux joined #java
  53. * lord4163 joined #java
  54. jreicherNeXeN: why do you not consider var _ a fix? Not only does it not generate a warning but it also states the intent of the code. It probably doesn't even need documentation.
  55. * hwpplayer1 joined #java
  56. jreicher~jep456
  57. javabot'JEP 456: Unnamed Variables & Patterns' can be found at http://openjdk.java.net/jeps/456
  58. nevetJEP 456: Unnamed Variables & Patterns
  59. jreicherJust in case it helps. You might already know about it.
  60. * lord4163 joined #java
  61. * hwpplayer1 joined #java
  62. * Nemu64 joined #java
  63. * ForeverDreaming joined #java
  64. hassoon'morning
  65. Opticgood morning
  66. * taylan joined #java
  67. Opticthis morning's battle: figure out why the scope claim in my jwt is missing when it gets to spring's JwtGrantedAuthoritiesConverter
  68. Opticif you see a laptop flying from a building window, that's me
  69. dreamrealnoted
  70. * leppard joined #java
  71. hassoonOptic: probably the jwt decoder's fault ?
  72. * Soulcatcher joined #java
  73. Opticyeah i'm working my way up the chain in the debugger
  74. * scottg489 joined #java
  75. * jamezp joined #java
  76. Opticomg figured it it out, it's because I wasn't REQUESTING the scopes in intellij httpclient. :P 100% PEBKAC
  77. hassoonintellij's httpclient ?
  78. dreamrealhappens a lot and has happened to all of us, probably. To the ones it has NOT happened to: well, you just ain't tried yet or you're lying about it :D
  79. Optichasson i'm using it for debugging... the actual application requests the scopes properly but my debug setup did not
  80. * hwpplayer1 joined #java
  81. hassooni see
  82. Opticif you use the IDE i recommend checking out the feature, it's handy. saves jumping out to something like postman or bruno
  83. hassooncool; +1
  84. ParaIntelliJ's built-in http client is pretty nifty for API testing as well.
  85. * bionade24 joined #java
  86. * Solstice_21 joined #java
  87. * Solstice_21 joined #java
  88. * hwpplayer1 joined #java
  89. * Solstice_21 joined #java
  90. * metalmaniac joined #java
  91. * hwpplayer1 joined #java
  92. * Cae2 joined #java
  93. * jontxu joined #java
  94. * Adrian35 joined #java
  95. * gas51627 joined #java
  96. gas51627Hi all, should I try to make my services singletons, that is, existing for the duration of the running app or is it fine to create a service object each time I get a request?
  97. gas51627In other words, what can be a singleton, should it be a singleton?
  98. nimajesingleton means there can be only one object of that class and you should avoid that if possible, but your app holding onto one instance of some class and use that for all requests can be a good idea in some cases, that depends on your use case and other tradeoffs
  99. dreamrealgas51627: it depends on what they do and what they need
  100. dreamrealand how you're building them
  101. dreamrealthere's no answer that fits in a general sense
  102. * LtHummus joined #java
  103. * Cae3 joined #java
  104. * Fiji joined #java
  105. * Cae2 joined #java
  106. * deglebe joined #java
  107. * Candle joined #java
  108. * bionade24 joined #java
  109. * vitaliy joined #java
  110. * deavmi joined #java
  111. * acidsys joined #java
  112. * braxas joined #java
  113. * magla joined #java
  114. * MikeBux joined #java
  115. * LtHummus joined #java
  116. * pr070cal joined #java
  117. * Aedil joined #java
  118. * mwnaylor joined #java
  119. * CygniX joined #java
  120. * hwpplayer1 joined #java
  121. * PocketKiller joined #java
  122. * ramontjunior joined #java
  123. * sa02irc joined #java
  124. * Chronos joined #java
  125. * Ragnor joined #java
  126. * qbone joined #java
  127. * ptomli96 joined #java
  128. * ptomli98 joined #java
  129. * qbone6 joined #java
  130. * Candle joined #java
  131. * ramontjunior1 joined #java
  132. Tenchihttps://blog.jetbrains.com/junie/2026/08/junie-local-launch/
  133. javabotTenchi's title: "Junie Local: Run the AI Coding Agent on Your Mac | JetBrains"
  134. nevetJunie Local: Run the AI Coding Agent on Your Mac | JetBrains
  135. Tenchisexy maybe
  136. * Fiji joined #java
  137. * chris64 joined #java