Skip to content

Commit

Permalink
For #4086/#6491: use Scala 3 import wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Bruchez committed Sep 17, 2024
1 parent 3f1d8f1 commit 7a48a7c
Show file tree
Hide file tree
Showing 815 changed files with 2,388 additions and 2,387 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package org.orbeon.oxf.controller

import org.orbeon.oxf.servlet._
import org.orbeon.oxf.servlet.*

// For backward compatibility
class AuthorizerServlet extends JavaxAuthorizerServlet
Expand Down
4 changes: 2 additions & 2 deletions common/js/src/main/scala/org/orbeon/date/JSDateUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package org.orbeon.date

import cats.syntax.option._
import org.orbeon.oxf.util.StringUtils._
import cats.syntax.option.*
import org.orbeon.oxf.util.StringUtils.*

import scala.scalajs.js
import scala.util.Try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package org.orbeon.oxf.util

import scala.async.Async._
import scala.async.Async.*
import scala.concurrent.duration.{FiniteDuration, _}
import scala.concurrent.{ExecutionContext, Future, Promise}
import scala.scalajs.js.timers.setTimeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package org.orbeon.date

import org.orbeon.date.JSDateUtils._
import org.orbeon.date.JSDateUtils.*
import org.scalatest.funspec.AnyFunSpec

import scala.scalajs.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.orbeon.oxf.util.{LoggerFactory, ServiceProviderSupport}
import org.slf4j

import java.net.URI
import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*


trait ConnectionContextSupportPlatform extends ConnectionContextSupportTrait {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
*/
package org.orbeon.exception

import org.orbeon.errorified._
import org.orbeon.errorified.*
import org.orbeon.oxf.common.{OrbeonLocationException, ValidationException}
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.CoreUtils.*
import org.orbeon.datatypes.{ExtendedLocationData, LocationData}
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*


// Orbeon-specific exception formatter
Expand Down
2 changes: 1 addition & 1 deletion common/jvm/src/main/scala/org/orbeon/io/FileUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package org.orbeon.io

import java.io.File
import java.net.URI
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.CoreUtils.*

object FileUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.orbeon.datatypes.{BasicLocationData, LocationData}
import org.orbeon.errorified.Exceptions
import org.xml.sax.SAXParseException

import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*
import scala.util.control.NonFatal

object OrbeonLocationException extends OrbeonLocationExceptionTrait {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package org.orbeon.oxf.http

import org.apache.http.auth._
import org.apache.http.client.methods._
import org.apache.http.auth.*
import org.apache.http.client.methods.*
import org.apache.http.client.protocol.{ClientContext, RequestAcceptEncoding, ResponseContentEncoding}
import org.apache.http.client.{CookieStore, CredentialsProvider}
import org.apache.http.conn.ClientConnectionManager
Expand All @@ -30,10 +30,10 @@ import org.apache.http.protocol.{BasicHttpContext, ExecutionContext, HttpContext
import org.apache.http.util.EntityUtils
import org.apache.http.{ProtocolException => _, _}
import org.orbeon.connection.{ConnectionContextSupport, StreamedContent}
import org.orbeon.io.IOUtils._
import org.orbeon.oxf.http.HttpMethod._
import org.orbeon.oxf.util.CollectionUtils._
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.io.IOUtils.*
import org.orbeon.oxf.http.HttpMethod.*
import org.orbeon.oxf.util.CollectionUtils.*
import org.orbeon.oxf.util.CoreUtils.*
import org.slf4j.LoggerFactory

import java.net.{CookieStore => _, _}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.orbeon.oxf.util
import org.slf4j

import java.util.ServiceLoader
import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*
import scala.reflect.ClassTag
import scala.util.control.NonFatal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package org.orbeon.oxf.util

import org.orbeon.io.IOUtils._
import org.orbeon.oxf.util.PathUtils._
import org.orbeon.io.IOUtils.*
import org.orbeon.oxf.util.PathUtils.*
import org.scalatest.funspec.AnyFunSpec

class JVMOnlyUtilsTest extends AnyFunSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package org.orbeon.connection

import org.log4s
import org.orbeon.oxf.http.{DateHeaders, HttpStatusCodeException, StatusCode, Headers => HttpHeaders}
import org.orbeon.oxf.util.Logging._
import org.orbeon.oxf.util.Logging.*
import org.orbeon.oxf.util.{ContentTypes, IndentedLogger}

import java.io._
import java.io.*
import java.{lang => jl}
import scala.util.control.NonFatal
import scala.util.{Failure, Success, Try}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.orbeon.datatypes

import org.orbeon.oxf.util.NumericUtils
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

import scala.annotation.tailrec

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
package org.orbeon.datatypes

import org.orbeon.datatypes.Mediatype.TypeOrSubtype._
import org.orbeon.datatypes.Mediatype._
import org.orbeon.datatypes.MediatypeRange._
import org.orbeon.datatypes.Mediatype.TypeOrSubtype.*
import org.orbeon.datatypes.Mediatype.*
import org.orbeon.datatypes.MediatypeRange.*


// Concrete mediatype, as opposed to `MediatypeRange` below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.orbeon.datatypes

import enumeratum.EnumEntry.Lowercase
import enumeratum._
import enumeratum.*

sealed trait Direction extends EnumEntry with Lowercase

Expand Down
8 changes: 4 additions & 4 deletions common/shared/src/main/scala/org/orbeon/date/IsoTime.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.orbeon.date

import cats.syntax.option._
import org.orbeon.date.IsoTime._
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.StringUtils._
import cats.syntax.option.*
import org.orbeon.date.IsoTime.*
import org.orbeon.oxf.util.CoreUtils.*
import org.orbeon.oxf.util.StringUtils.*


case class IsoTime(
Expand Down
2 changes: 1 addition & 1 deletion common/shared/src/main/scala/org/orbeon/io/IOUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package org.orbeon.io

import org.orbeon.oxf.common.Defaults

import java.io._
import java.io.*
import java.{lang => jl}
import scala.util.control.NonFatal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package org.orbeon.io
import java.io.{FilterInputStream, InputStream}

import org.orbeon.datatypes.MaximumSize
import org.orbeon.datatypes.MaximumSize._
import org.orbeon.datatypes.MaximumSize.*

class LimiterInputStream(
is : InputStream,
Expand Down
2 changes: 1 addition & 1 deletion common/shared/src/main/scala/org/orbeon/io/UriScheme.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.orbeon.io

import enumeratum.EnumEntry.Lowercase
import enumeratum._
import enumeratum.*

sealed trait UriScheme extends EnumEntry with Lowercase

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.orbeon.oxf.common

import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*


object VersionSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
*/
package org.orbeon.oxf.externalcontext

import java.io._
import java.io.*
import java.net.URL
import java.{util => ju}
import enumeratum.{Enum, EnumEntry}
import enumeratum.values.{IntEnum, IntEnumEntry}
import org.orbeon.io.CharsetNames
import org.orbeon.oxf.http.{Headers, HttpMethod, PathType}
import org.orbeon.oxf.util.PathUtils
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*
import scala.collection.immutable
import scala.util.control.NonFatal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.{util => ju}
import org.orbeon.oxf.common.OXFException
import org.orbeon.oxf.externalcontext.ExternalContext.{Session, SessionListener, SessionScope}

import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*
import scala.collection.{immutable => i}

class SimpleSession(sessionId: String) extends Session {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.orbeon.oxf.externalcontext

import org.orbeon.oxf.common.OXFException
import org.orbeon.oxf.util.MarkupUtils._
import org.orbeon.oxf.util.MarkupUtils.*
import org.orbeon.oxf.util.PathUtils
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

import java.net.URI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*/
package org.orbeon.oxf.http

import enumeratum._
import enumeratum.*
import org.orbeon.connection.{ConnectionContextSupport, StreamedContent}
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

import java.io.InputStream
import scala.concurrent.duration._
import scala.concurrent.duration.*


case class HttpClientSettings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package org.orbeon.oxf.util

import enumeratum.EnumEntry.Lowercase
import enumeratum.{Enum, EnumEntry}
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.CoreUtils.*

import scala.collection.{AbstractIterator, Factory, mutable}
import scala.language.{implicitConversions, reflectiveCalls}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package org.orbeon.oxf.util

import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

object ContentTypes {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import java.{lang => jl}

import org.log4s
import org.orbeon.exception.OrbeonFormatter
import org.orbeon.oxf.util.IndentedLogger._
import org.orbeon.oxf.util.IndentedLogger.*

import scala.annotation.varargs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package org.orbeon.oxf.util

import java.{lang => jl}

import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

import scala.scalajs.js.annotation.{JSExport, JSExportTopLevel}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package org.orbeon.oxf.util
import enumeratum.EnumEntry.Lowercase
import enumeratum.{CirceEnum, Enum, EnumEntry}

import StringUtils._
import StringUtils.*

// NOTE: We place this in a separate module also to help with Circe issues, see:
// https://github.com/circe/circe/issues/639
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.orbeon.oxf.util

import org.orbeon.oxf.util.CollectionUtils.combineValues
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.StringUtils.*

import java.{util, lang => jl}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package org.orbeon.oxf.util

import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.CoreUtils.*

import scala.annotation.tailrec
import scala.collection.Factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.orbeon.xml

import java.{util => ju}
import scala.jdk.CollectionConverters._
import scala.jdk.CollectionConverters.*


// Scala 3: was private constructor. Any better solution?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.orbeon.date

import cats.syntax.option._
import org.orbeon.date.IsoTime._
import cats.syntax.option.*
import org.orbeon.date.IsoTime.*
import org.scalatest.funspec.AnyFunSpec


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package org.orbeon.oxf.util

import org.orbeon.oxf.util.ContentTypes._
import org.orbeon.oxf.util.ContentTypes.*
import org.scalatest.funspec.AnyFunSpec

class ContentTypesTest extends AnyFunSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
*/
package org.orbeon.oxf.util

import org.orbeon.oxf.util.CollectionUtils._
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.MarkupUtils._
import org.orbeon.oxf.util.PathUtils._
import org.orbeon.oxf.util.StringUtils._
import org.orbeon.oxf.util.CollectionUtils.*
import org.orbeon.oxf.util.CoreUtils.*
import org.orbeon.oxf.util.MarkupUtils.*
import org.orbeon.oxf.util.PathUtils.*
import org.orbeon.oxf.util.StringUtils.*
import org.scalatest.funspec.AnyFunSpec

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.orbeon.dom
import org.orbeon.dom.io.SAXWriter
import org.orbeon.io.StringBuilderWriter
import org.orbeon.saxon.tree.util.DocumentNumberAllocator
import org.orbeon.oxf.util.CoreUtils._
import org.orbeon.oxf.util.CoreUtils.*
import org.orbeon.oxf.xml.dom.LocationDocumentResult
import org.orbeon.oxf.xml.{ForwardingXMLReceiver, ShareableXPathStaticContext, XMLReceiver}
import org.orbeon.saxon.expr.{XPathContext, parser}
Expand Down
Loading

0 comments on commit 7a48a7c

Please sign in to comment.