Skip to content

Commit 1bd260a

Browse files
committed
polishing
1 parent 57851de commit 1bd260a

File tree

3 files changed

+27
-19
lines changed

3 files changed

+27
-19
lines changed

org.springframework.core/src/main/java/org/springframework/core/io/VfsResource.java

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2010 the original author or authors.
2+
* Copyright 2002-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* VFS based {@link Resource} implementation.
30-
* Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x.
30+
* Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x and 7.x.
3131
*
3232
* @author Ales Justin
3333
* @author Juergen Hoeller
@@ -47,22 +47,21 @@ public VfsResource(Object resources) {
4747
}
4848

4949

50+
public InputStream getInputStream() throws IOException {
51+
return VfsUtils.getInputStream(this.resource);
52+
}
53+
54+
@Override
5055
public boolean exists() {
5156
return VfsUtils.exists(this.resource);
5257
}
5358

59+
@Override
5460
public boolean isReadable() {
5561
return VfsUtils.isReadable(this.resource);
5662
}
5763

58-
public long lastModified() throws IOException {
59-
return VfsUtils.getLastModified(this.resource);
60-
}
61-
62-
public InputStream getInputStream() throws IOException {
63-
return VfsUtils.getInputStream(this.resource);
64-
}
65-
64+
@Override
6665
public URL getURL() throws IOException {
6766
try {
6867
return VfsUtils.getURL(this.resource);
@@ -72,6 +71,7 @@ public URL getURL() throws IOException {
7271
}
7372
}
7473

74+
@Override
7575
public URI getURI() throws IOException {
7676
try {
7777
return VfsUtils.getURI(this.resource);
@@ -81,10 +81,17 @@ public URI getURI() throws IOException {
8181
}
8282
}
8383

84+
@Override
8485
public File getFile() throws IOException {
8586
return VfsUtils.getFile(this.resource);
8687
}
8788

89+
@Override
90+
public long lastModified() throws IOException {
91+
return VfsUtils.getLastModified(this.resource);
92+
}
93+
94+
@Override
8895
public Resource createRelative(String relativePath) throws IOException {
8996
if (!relativePath.startsWith(".") && relativePath.contains("/")) {
9097
try {
@@ -98,6 +105,7 @@ public Resource createRelative(String relativePath) throws IOException {
98105
return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath)));
99106
}
100107

108+
@Override
101109
public String getFilename() {
102110
return VfsUtils.getName(this.resource);
103111
}

org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/package-info.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
/**
33
*
44
* Package providing integration of
5-
* <a href="http://www.hibernate.org">Hibernate3</a>
5+
* <a href="http://www.hibernate.org">Hibernate 3.x</a>
66
* with Spring concepts.
7-
*
7+
*
88
* <p>Contains SessionFactory helper classes, a template plus callback
99
* for Hibernate access, and an implementation of Spring's transaction SPI
1010
* for local Hibernate transactions.
11-
*
11+
*
1212
* <p><b>This package supports Hibernate 3.x only.</b>
13-
* See the org.springframework.orm.hibernate package for Hibernate 2.1 support.
13+
* See the <code>org.springframework.orm.hibernate4</code> package for Hibernate 4.x support.
1414
*
1515
*/
1616
package org.springframework.orm.hibernate3;

org.springframework.orm/src/main/java/org/springframework/orm/hibernate4/package-info.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
/**
33
*
44
* Package providing integration of
5-
* <a href="http://www.hibernate.org">Hibernate 4.0</a>
5+
* <a href="http://www.hibernate.org">Hibernate 4.x</a>
66
* with Spring concepts.
7-
*
7+
*
88
* <p>Contains an implementation of Spring's transaction SPI for local Hibernate transactions.
9-
* This package is intentionally rather minimal, relying on native Hibernate builder APIs
10-
* for building a SessionFactory (for example in an @Bean method in a @Configuration class).
9+
* This package is intentionally rather minimal, with no template classes or the like,
10+
* in order to follow native Hibernate recommendations as closely as possible.
1111
*
1212
* <p><b>This package supports Hibernate 4.x only.</b>
13-
* See the org.springframework.orm.hibernate3 package for Hibernate 3.x support.
13+
* See the <code>org.springframework.orm.hibernate3</code> package for Hibernate 3.x support.
1414
*
1515
*/
1616
package org.springframework.orm.hibernate4;

0 commit comments

Comments
 (0)